Generalized types of (.&&.)
and (.||.)
This commit is contained in:
parent
a6225e6e5b
commit
cffe0ef573
1 changed files with 2 additions and 2 deletions
|
@ -812,7 +812,7 @@ infixr 2 .&&., .||.
|
||||||
|
|
||||||
Runs the second command only if the first one returns `ExitSuccess`
|
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
|
cmd1 .&&. cmd2 = do
|
||||||
r <- cmd1
|
r <- cmd1
|
||||||
case r of
|
case r of
|
||||||
|
@ -823,7 +823,7 @@ cmd1 .&&. cmd2 = do
|
||||||
|
|
||||||
Run the second command only if the first one returns `ExitFailure`
|
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
|
cmd1 .||. cmd2 = do
|
||||||
r <- cmd1
|
r <- cmd1
|
||||||
case r of
|
case r of
|
||||||
|
|
Loading…
Reference in a new issue