Add a missing Path coercion

This commit is contained in:
John Wiegley 2018-04-16 10:12:15 -07:00
parent 9d378d61d1
commit 5711f96743

View file

@ -174,6 +174,7 @@ instance (Framed e m, MonadVar m, MonadFile m)
=> FromValue Path m (NValueNF m) where
fromValueMay = \case
Fix (NVPath p) -> pure $ Just (Path p)
Fix (NVStr s _) -> pure $ Just (Path (Text.unpack s))
_ -> pure Nothing
fromValue = fromValueMay >=> \case
Just b -> pure b