shelly 0.14.1 → 0.14.2
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~unix-compat
Dependency ranges changed: unix-compat
Files
- Shelly.hs +4/−4
- shelly.cabal +2/−2
Shelly.hs view
@@ -285,23 +285,23 @@ run_sudo cmd args = Sudo $ run "/usr/bin/sudo" (cmd:args) -} --- | Catch an exception in the Sh monad.+-- | Same as a normal 'catch' but specialized for the Sh monad. catch_sh :: (Exception e) => Sh a -> (e -> Sh a) -> Sh a catch_sh action handle = do ref <- ask liftIO $ catch (runSh action ref) (\e -> runSh (handle e) ref) --- | Catch an exception in the Sh monad.+-- | Same as a normal 'finally' but specialized for the 'Sh' monad. finally_sh :: Sh a -> Sh b -> Sh a finally_sh action handle = do ref <- ask liftIO $ finally (runSh action ref) (runSh handle ref) --- | You need this when using 'catches_sh'.+-- | You need to wrap exception handlers with this when using 'catches_sh'. data ShellyHandler a = forall e . Exception e => ShellyHandler (e -> Sh a) --- | Catch multiple exceptions in the Sh monad.+-- | Same as a normal 'catches', but specialized for the 'Sh' monad. catches_sh :: Sh a -> [ShellyHandler a] -> Sh a catches_sh action handlers = do ref <- ask
shelly.cabal view
@@ -1,6 +1,6 @@ Name: shelly -Version: 0.14.1+Version: 0.14.2 Synopsis: shell-like (systems) programming in Haskell Description: Shelly provides convenient systems programming in Haskell,@@ -52,7 +52,7 @@ ghc-options: -Wall Build-depends: base >= 4 && < 5, time, directory, text, mtl, process- , unix-compat < 0.4+ , unix-compat < 0.5 , system-filepath < 0.5 , system-fileio < 0.4 , bytestring