Generalized types of (.&&.) and (.||.)

This commit is contained in:
Gabriel Gonzalez 2015-08-09 17:13:01 -07:00
parent a6225e6e5b
commit cffe0ef573

View file

@ -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