diff options
Diffstat (limited to 'src/Process/Shell.hs')
-rw-r--r-- | src/Process/Shell.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Process/Shell.hs b/src/Process/Shell.hs index 904b70f..ffebad5 100644 --- a/src/Process/Shell.hs +++ b/src/Process/Shell.hs @@ -51,6 +51,9 @@ instance (MonadIO m, Outputable a) => Processable m a where instance (MonadIO m, Outputable stdout, Outputable stderr) => Processable m (stdout, stderr) where sh_ = ((\(Script stripNL s) -> fmap (\(out, err) -> (fromLBS (stripNL out), fromLBS (stripNL err))) (liftIO (readProcess_ (fromString s)))) =<<) +instance (MonadIO m) => Processable m ExitCode where + sh_ = ((\(Script _ s) -> liftIO (runProcess (fromString s))) =<<) + instance (MonadIO m, Outputable stdout, Outputable stderr) => Processable m (ExitCode, stdout, stderr) where sh_ = ((\(Script stripNL s) -> fmap (\(exitCode, out, err) -> (exitCode, fromLBS (stripNL out), fromLBS (stripNL err))) (liftIO (readProcess (fromString s)))) =<<) |