Command 0.0.1 → 0.0.2
raw patch · 2 files changed
+27/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ System.Command: (->>>) :: Monad m => m ExitCode -> m a -> m ()
+ System.Command: (<<<-) :: Monad m => m a -> m ExitCode -> m ()
Files
- Command.cabal +1/−1
- System/Command.hs +26/−2
Command.cabal view
@@ -1,5 +1,5 @@ Name: Command-Version: 0.0.1+Version: 0.0.2 License: BSD3 License-File: LICENSE Author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>
System/Command.hs view
@@ -31,7 +31,9 @@ , exitFailure , exitSuccess , (->>)+, (->>>) , (<<-)+, (<<<-) , runExitCodes -- * Process completion , waitForProcess@@ -153,7 +155,7 @@ -- | Runs the first action. ----- Only if the result is successful, run the second action.+-- Only if the result is successful, run the second action returning its result. (->>) :: Monad m => m ExitCode@@ -163,10 +165,21 @@ do a' <- a if isSuccess a' then b else return a' +-- | Runs the first action.+--+-- Only if the result is successful, run the second action returning no result.+(->>>) ::+ Monad m =>+ m ExitCode+ -> m a+ -> m ()+a ->>> b =+ do a' <- a+ if isSuccess a' then b >> return () else return () -- | Runs the second action. ----- Only if the result is successful, run the first action.+-- Only if the result is successful, run the first action returning its result. (<<-) :: Monad m => m ExitCode@@ -174,6 +187,17 @@ -> m ExitCode (<<-) = flip (->>)++-- | Runs the second action.+--+-- Only if the result is successful, run the first action returning no result.+(<<<-) ::+ Monad m =>+ m a+ -> m ExitCode+ -> m ()+(<<<-) =+ flip (->>>) -- | Run the structure of actions stopping at the first failure. runExitCodes ::