From cffe0ef57375b639522425f819a582d11e05f6fa Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Sun, 9 Aug 2015 17:13:01 -0700 Subject: [PATCH] Generalized types of `(.&&.)` and `(.||.)` --- src/Turtle/Prelude.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Turtle/Prelude.hs b/src/Turtle/Prelude.hs index bdb8fe0..26f3b76 100644 --- a/src/Turtle/Prelude.hs +++ b/src/Turtle/Prelude.hs @@ -812,7 +812,7 @@ infixr 2 .&&., .||. Runs the second command only if the first one returns `ExitSuccess` -} -(.&&.) :: IO ExitCode -> IO ExitCode -> IO ExitCode +(.&&.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode cmd1 .&&. cmd2 = do r <- cmd1 case r of @@ -823,7 +823,7 @@ cmd1 .&&. cmd2 = do Run the second command only if the first one returns `ExitFailure` -} -(.||.) :: IO ExitCode -> IO ExitCode -> IO ExitCode +(.||.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode cmd1 .||. cmd2 = do r <- cmd1 case r of