Skip to content

Commit 7cfa712

Browse files
committed
Convert: inHaskMay: m refactor
1 parent 7d8e5b7 commit 7cfa712

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Nix/Convert.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ inHaskM f = toValue <=< f <=< fromValue
5959

6060
-- | Maybe transform Nix -> Hask. Run function. Convert Hask -> Nix.
6161
inHaskMay :: forall a1 a2 v b m . (Monad m, FromValue a1 m v, ToValue a2 m b) => (Maybe a1 -> a2) -> v -> m b
62-
inHaskMay f a =
63-
do
64-
v <- fromValueMay a
65-
toValue $ f v
62+
inHaskMay f = toValue . f <=< fromValueMay
6663

6764

6865
-- * FromValue

0 commit comments

Comments
 (0)