shelly 0.4 → 0.4.1
raw patch · 2 files changed
+9/−6 lines, 2 files
Files
- Shelly.hs +8/−5
- shelly.cabal +1/−1
Shelly.hs view
@@ -39,7 +39,7 @@ , exit, errorExit, terror -- * Utilities.- , (<$>), (<$$>), grep, whenM, canonic+ , (<$>), (<$$>), grep, whenM, unlessM, canonic , catchany, catch_sh, catchany_sh , MemTime(..), time , RunFailed(..)@@ -47,8 +47,8 @@ , (|<>), (<>|) -- * convert between Text and FilePath , toTextUnsafe, toTextWarn, fromText- -- * Re-export for your con- , liftIO, when+ -- * Re-exported for your convenience+ , liftIO, when, unless ) where import Prelude hiding ( catch, readFile, FilePath )@@ -320,8 +320,11 @@ -- | A monadic-conditional version of the "when" guard. whenM :: Monad m => m Bool -> m () -> m ()-whenM c a = do res <- c- when res a+whenM c a = c >>= \res -> when res a++-- | A monadic-conditional version of the "unless" guard.+unlessM :: Monad m => m Bool -> m () -> m ()+unlessM c a = c >>= \res -> unless res a -- | Does a path point to an existing filesystem object? test_e :: FilePath -> ShIO Bool
shelly.cabal view
@@ -1,6 +1,6 @@ Name: shelly -Version: 0.4+Version: 0.4.1 Synopsis: shell-like (systems) programming in Haskell Description: Shelly is a package provides a single module for convenient