{-# LANGUAGE CPP #-}
module Effectful.Process.Typed.Dynamic
(
TypedProcess (..),
runTypedProcess,
ProcessConfig,
StreamSpec,
StreamType (..),
Process,
P.proc,
P.shell,
P.setStdin,
P.setStdout,
P.setStderr,
P.setWorkingDir,
P.setWorkingDirInherit,
P.setEnv,
P.setEnvInherit,
P.setCloseFds,
P.setCreateGroup,
P.setDelegateCtlc,
P.setDetachConsole,
P.setCreateNewConsole,
P.setNewSession,
#if !WINDOWS
P.setChildGroup,
P.setChildGroupInherit,
P.setChildUser,
P.setChildUserInherit,
#endif
P.inherit,
P.nullStream,
P.closed,
P.byteStringInput,
P.byteStringOutput,
P.createPipe,
P.useHandleOpen,
P.useHandleClose,
P.mkStreamSpec,
P.mkPipeStreamSpec,
runProcess,
readProcess,
readProcessStdout,
readProcessStderr,
readProcessInterleaved,
withProcessWait,
withProcessTerm,
startProcess,
stopProcess,
runProcess_,
readProcess_,
readProcessStdout_,
readProcessStderr_,
readProcessInterleaved_,
withProcessWait_,
withProcessTerm_,
waitExitCode,
P.waitExitCodeSTM,
getExitCode,
P.getExitCodeSTM,
checkExitCode,
P.checkExitCodeSTM,
P.getStdin,
P.getStdout,
P.getStderr,
P.ExitCodeException (..),
P.ByteStringOutputException (..),
P.ExitCode (..),
P.StdStream (..),
P.unsafeProcessHandle,
)
where
import Control.Monad.IO.Class (MonadIO (liftIO))
import Data.ByteString.Lazy qualified as BSL
import Effectful
( Dispatch (Dynamic),
DispatchOf,
Eff,
Effect,
IOE,
type (:>),
)
import Effectful.Dispatch.Dynamic (interpret, localSeqUnliftIO, send)
import Effectful.Dynamic.Utils (ShowEffect (showEffectCons))
import GHC.Stack (HasCallStack)
import System.Exit (ExitCode)
import System.Process.Typed
( Process,
ProcessConfig,
StreamSpec,
StreamType (STInput, STOutput),
)
import System.Process.Typed qualified as P
import System.Process.Typed qualified as TP
data TypedProcess :: Effect where
RunProcess :: ProcessConfig stdin stdout stderr -> TypedProcess m ExitCode
ReadProcess ::
ProcessConfig stdin stdoutIgnored stderrIgnored ->
TypedProcess m (ExitCode, BSL.ByteString, BSL.ByteString)
ReadProcessStdout ::
ProcessConfig stdin stdoutIgnored stderr ->
TypedProcess m (ExitCode, BSL.ByteString)
ReadProcessStderr ::
ProcessConfig stdin stdoutIgnored stderrIgnored ->
TypedProcess m (ExitCode, BSL.ByteString)
ReadProcessInterleaved ::
ProcessConfig stdin stdoutIgnored stderrIgnored ->
TypedProcess m (ExitCode, BSL.ByteString)
WithProcessWait ::
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> m a) ->
TypedProcess m a
WithProcessTerm ::
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> m a) ->
TypedProcess m a
StartProcess ::
ProcessConfig stdin stdout stderr ->
TypedProcess m (Process stdin stdout stderr)
StopProcess :: Process stdin stdout stderr -> TypedProcess m ()
RunProcess_ :: ProcessConfig stdin stdout stderr -> TypedProcess m ()
ReadProcess_ ::
ProcessConfig stdin stdoutIgnored stderrIgnored ->
TypedProcess m (BSL.ByteString, BSL.ByteString)
ReadProcessStdout_ ::
ProcessConfig stdin stdoutIgnored stderr ->
TypedProcess m BSL.ByteString
ReadProcessStderr_ ::
ProcessConfig stdin stdout stderrIgnored ->
TypedProcess m BSL.ByteString
ReadProcessInterleaved_ ::
ProcessConfig stdin stdoutIgnored stderrIgnored ->
TypedProcess m BSL.ByteString
WithProcessWait_ ::
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> m a) ->
TypedProcess m a
WithProcessTerm_ ::
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> m a) ->
TypedProcess m a
WaitExitCode :: Process stdin stdout stderr -> TypedProcess m ExitCode
GetExitCode :: Process stdin stdout stderr -> TypedProcess m (Maybe ExitCode)
CheckExitCode :: Process stdin stdout stderr -> TypedProcess m ()
type instance DispatchOf TypedProcess = Dynamic
instance ShowEffect TypedProcess where
showEffectCons :: forall (m :: * -> *) a. TypedProcess m a -> String
showEffectCons = \case
RunProcess ProcessConfig stdin stdout stderr
_ -> String
"RunProcess"
ReadProcess ProcessConfig stdin stdoutIgnored stderrIgnored
_ -> String
"ReadProcess"
ReadProcessStdout ProcessConfig stdin stdoutIgnored stderr
_ -> String
"ReadProcessStdout"
ReadProcessStderr ProcessConfig stdin stdoutIgnored stderrIgnored
_ -> String
"ReadProcessStderr"
ReadProcessInterleaved ProcessConfig stdin stdoutIgnored stderrIgnored
_ -> String
"ReadProcessInterleaved"
WithProcessWait ProcessConfig stdin stdout stderr
_ Process stdin stdout stderr -> m a
_ -> String
"WithProcessWait"
WithProcessTerm ProcessConfig stdin stdout stderr
_ Process stdin stdout stderr -> m a
_ -> String
"WithProcessTerm"
StartProcess ProcessConfig stdin stdout stderr
_ -> String
"StartProcess"
StopProcess Process stdin stdout stderr
_ -> String
"StopProcess"
RunProcess_ ProcessConfig stdin stdout stderr
_ -> String
"RunProcess_"
ReadProcess_ ProcessConfig stdin stdoutIgnored stderrIgnored
_ -> String
"ReadProcess_"
ReadProcessStdout_ ProcessConfig stdin stdoutIgnored stderr
_ -> String
"ReadProcessStdout_"
ReadProcessStderr_ ProcessConfig stdin stdout stderrIgnored
_ -> String
"ReadProcessStderr_"
ReadProcessInterleaved_ ProcessConfig stdin stdoutIgnored stderrIgnored
_ -> String
"ReadProcessInterleaved_"
WithProcessWait_ ProcessConfig stdin stdout stderr
_ Process stdin stdout stderr -> m a
_ -> String
"WithProcessWait_"
WithProcessTerm_ ProcessConfig stdin stdout stderr
_ Process stdin stdout stderr -> m a
_ -> String
"WithProcessTerm_"
WaitExitCode Process stdin stdout stderr
_ -> String
"WaitExitCode"
GetExitCode Process stdin stdout stderr
_ -> String
"GetExitCode"
CheckExitCode Process stdin stdout stderr
_ -> String
"CheckExitCode"
runTypedProcess ::
( HasCallStack,
IOE :> es
) =>
Eff (TypedProcess : es) a ->
Eff es a
runTypedProcess :: forall (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, IOE :> es) =>
Eff (TypedProcess : es) a -> Eff es a
runTypedProcess = EffectHandler TypedProcess es
-> Eff (TypedProcess : es) a -> Eff es a
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic) =>
EffectHandler e es -> Eff (e : es) a -> Eff es a
interpret (EffectHandler TypedProcess es
-> Eff (TypedProcess : es) a -> Eff es a)
-> EffectHandler TypedProcess es
-> Eff (TypedProcess : es) a
-> Eff es a
forall a b. (a -> b) -> a -> b
$ \LocalEnv localEs es
env -> \case
RunProcess ProcessConfig stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr -> IO ExitCode
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
ProcessConfig stdin stdout stderr -> m ExitCode
TP.runProcess ProcessConfig stdin stdout stderr
pc
ReadProcess ProcessConfig stdin stdoutIgnored stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderrIgnored
-> IO (ExitCode, ByteString, ByteString)
forall (m :: * -> *) stdin stdoutIgnored stderrIgnored.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderrIgnored
-> m (ExitCode, ByteString, ByteString)
TP.readProcess ProcessConfig stdin stdoutIgnored stderrIgnored
pc
ReadProcessStdout ProcessConfig stdin stdoutIgnored stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderr
-> IO (ExitCode, ByteString)
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr
-> m (ExitCode, ByteString)
TP.readProcessStdout ProcessConfig stdin stdoutIgnored stderr
pc
ReadProcessStderr ProcessConfig stdin stdoutIgnored stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderrIgnored
-> IO (ExitCode, ByteString)
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr
-> m (ExitCode, ByteString)
TP.readProcessStderr ProcessConfig stdin stdoutIgnored stderrIgnored
pc
ReadProcessInterleaved ProcessConfig stdin stdoutIgnored stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderrIgnored
-> IO (ExitCode, ByteString)
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr
-> m (ExitCode, ByteString)
TP.readProcessInterleaved ProcessConfig stdin stdoutIgnored stderrIgnored
pc
WithProcessWait ProcessConfig stdin stdout stderr
pc Process stdin stdout stderr -> Eff localEs a
onProcess -> LocalEnv localEs es
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall (es :: [(* -> *) -> * -> *])
(handlerEs :: [(* -> *) -> * -> *])
(localEs :: [(* -> *) -> * -> *]) a.
(HasCallStack, SharedSuffix es handlerEs, IOE :> es) =>
LocalEnv localEs handlerEs
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
localSeqUnliftIO LocalEnv localEs es
env (((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a)
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall a b. (a -> b) -> a -> b
$ \forall r. Eff localEs r -> IO r
runInIO ->
IO a -> IO a
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> IO a) -> IO a -> IO a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> IO a) -> IO a
forall (m :: * -> *) stdin stdout stderr a.
MonadUnliftIO m =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> m a
TP.withProcessWait ProcessConfig stdin stdout stderr
pc (Eff localEs a -> IO a
forall r. Eff localEs r -> IO r
runInIO (Eff localEs a -> IO a)
-> (Process stdin stdout stderr -> Eff localEs a)
-> Process stdin stdout stderr
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> Eff localEs a
onProcess)
WithProcessTerm ProcessConfig stdin stdout stderr
pc Process stdin stdout stderr -> Eff localEs a
onProcess -> LocalEnv localEs es
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall (es :: [(* -> *) -> * -> *])
(handlerEs :: [(* -> *) -> * -> *])
(localEs :: [(* -> *) -> * -> *]) a.
(HasCallStack, SharedSuffix es handlerEs, IOE :> es) =>
LocalEnv localEs handlerEs
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
localSeqUnliftIO LocalEnv localEs es
env (((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a)
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall a b. (a -> b) -> a -> b
$ \forall r. Eff localEs r -> IO r
runInIO ->
IO a -> IO a
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> IO a) -> IO a -> IO a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> IO a) -> IO a
forall (m :: * -> *) stdin stdout stderr a.
MonadUnliftIO m =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> m a
TP.withProcessTerm ProcessConfig stdin stdout stderr
pc (Eff localEs a -> IO a
forall r. Eff localEs r -> IO r
runInIO (Eff localEs a -> IO a)
-> (Process stdin stdout stderr -> Eff localEs a)
-> Process stdin stdout stderr
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> Eff localEs a
onProcess)
StartProcess ProcessConfig stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr
-> IO (Process stdin stdout stderr)
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
ProcessConfig stdin stdout stderr
-> m (Process stdin stdout stderr)
TP.startProcess ProcessConfig stdin stdout stderr
pc
StopProcess Process stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ Process stdin stdout stderr -> IO ()
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
Process stdin stdout stderr -> m ()
TP.stopProcess Process stdin stdout stderr
pc
RunProcess_ ProcessConfig stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr -> IO ()
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
ProcessConfig stdin stdout stderr -> m ()
TP.runProcess_ ProcessConfig stdin stdout stderr
pc
ReadProcess_ ProcessConfig stdin stdoutIgnored stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderrIgnored
-> IO (ByteString, ByteString)
forall (m :: * -> *) stdin stdoutIgnored stderrIgnored.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderrIgnored
-> m (ByteString, ByteString)
TP.readProcess_ ProcessConfig stdin stdoutIgnored stderrIgnored
pc
ReadProcessStdout_ ProcessConfig stdin stdoutIgnored stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderr -> IO ByteString
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr -> m ByteString
TP.readProcessStdout_ ProcessConfig stdin stdoutIgnored stderr
pc
ReadProcessStderr_ ProcessConfig stdin stdout stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderrIgnored -> IO ByteString
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr -> m ByteString
TP.readProcessStderr_ ProcessConfig stdin stdout stderrIgnored
pc
ReadProcessInterleaved_ ProcessConfig stdin stdoutIgnored stderrIgnored
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdoutIgnored stderrIgnored -> IO ByteString
forall (m :: * -> *) stdin stdoutIgnored stderr.
MonadIO m =>
ProcessConfig stdin stdoutIgnored stderr -> m ByteString
TP.readProcessInterleaved_ ProcessConfig stdin stdoutIgnored stderrIgnored
pc
WithProcessWait_ ProcessConfig stdin stdout stderr
pc Process stdin stdout stderr -> Eff localEs a
onProcess -> LocalEnv localEs es
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall (es :: [(* -> *) -> * -> *])
(handlerEs :: [(* -> *) -> * -> *])
(localEs :: [(* -> *) -> * -> *]) a.
(HasCallStack, SharedSuffix es handlerEs, IOE :> es) =>
LocalEnv localEs handlerEs
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
localSeqUnliftIO LocalEnv localEs es
env (((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a)
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall a b. (a -> b) -> a -> b
$ \forall r. Eff localEs r -> IO r
runInIO ->
IO a -> IO a
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> IO a) -> IO a -> IO a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> IO a) -> IO a
forall (m :: * -> *) stdin stdout stderr a.
MonadUnliftIO m =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> m a
TP.withProcessWait_ ProcessConfig stdin stdout stderr
pc (Eff localEs a -> IO a
forall r. Eff localEs r -> IO r
runInIO (Eff localEs a -> IO a)
-> (Process stdin stdout stderr -> Eff localEs a)
-> Process stdin stdout stderr
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> Eff localEs a
onProcess)
WithProcessTerm_ ProcessConfig stdin stdout stderr
pc Process stdin stdout stderr -> Eff localEs a
onProcess -> LocalEnv localEs es
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall (es :: [(* -> *) -> * -> *])
(handlerEs :: [(* -> *) -> * -> *])
(localEs :: [(* -> *) -> * -> *]) a.
(HasCallStack, SharedSuffix es handlerEs, IOE :> es) =>
LocalEnv localEs handlerEs
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
localSeqUnliftIO LocalEnv localEs es
env (((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a)
-> ((forall r. Eff localEs r -> IO r) -> IO a) -> Eff es a
forall a b. (a -> b) -> a -> b
$ \forall r. Eff localEs r -> IO r
runInIO ->
IO a -> IO a
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> IO a) -> IO a -> IO a
forall a b. (a -> b) -> a -> b
$ ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> IO a) -> IO a
forall (m :: * -> *) stdin stdout stderr a.
MonadUnliftIO m =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> m a
TP.withProcessTerm_ ProcessConfig stdin stdout stderr
pc (Eff localEs a -> IO a
forall r. Eff localEs r -> IO r
runInIO (Eff localEs a -> IO a)
-> (Process stdin stdout stderr -> Eff localEs a)
-> Process stdin stdout stderr
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> Eff localEs a
onProcess)
WaitExitCode Process stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ Process stdin stdout stderr -> IO ExitCode
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
Process stdin stdout stderr -> m ExitCode
TP.waitExitCode Process stdin stdout stderr
pc
GetExitCode Process stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ Process stdin stdout stderr -> IO (Maybe ExitCode)
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
Process stdin stdout stderr -> m (Maybe ExitCode)
TP.getExitCode Process stdin stdout stderr
pc
CheckExitCode Process stdin stdout stderr
pc -> IO a -> Eff es a
forall a. IO a -> Eff es a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Eff es a) -> IO a -> Eff es a
forall a b. (a -> b) -> a -> b
$ Process stdin stdout stderr -> IO ()
forall (m :: * -> *) stdin stdout stderr.
MonadIO m =>
Process stdin stdout stderr -> m ()
TP.checkExitCode Process stdin stdout stderr
pc
runProcess ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
Eff es ExitCode
runProcess :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr -> Eff es ExitCode
runProcess = TypedProcess (Eff es) ExitCode -> Eff es ExitCode
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) ExitCode -> Eff es ExitCode)
-> (ProcessConfig stdin stdout stderr
-> TypedProcess (Eff es) ExitCode)
-> ProcessConfig stdin stdout stderr
-> Eff es ExitCode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr -> TypedProcess (Eff es) ExitCode
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr -> TypedProcess m ExitCode
RunProcess
readProcess ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderrIgnored ->
Eff es (ExitCode, BSL.ByteString, BSL.ByteString)
readProcess :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored
stderrIgnored.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ExitCode, ByteString, ByteString)
readProcess = TypedProcess (Eff es) (ExitCode, ByteString, ByteString)
-> Eff es (ExitCode, ByteString, ByteString)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (ExitCode, ByteString, ByteString)
-> Eff es (ExitCode, ByteString, ByteString))
-> (ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString, ByteString))
-> ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ExitCode, ByteString, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString, ByteString)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (ExitCode, ByteString, ByteString)
ReadProcess
readProcessStdout ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderr ->
Eff es (ExitCode, BSL.ByteString)
readProcessStdout :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr
-> Eff es (ExitCode, ByteString)
readProcessStdout = TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString))
-> (ProcessConfig stdin stdoutIgnored stderr
-> TypedProcess (Eff es) (ExitCode, ByteString))
-> ProcessConfig stdin stdoutIgnored stderr
-> Eff es (ExitCode, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderr
-> TypedProcess (Eff es) (ExitCode, ByteString)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (ExitCode, ByteString)
ReadProcessStdout
readProcessStderr ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderrIgnored ->
Eff es (ExitCode, BSL.ByteString)
readProcessStderr :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr
-> Eff es (ExitCode, ByteString)
readProcessStderr = TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString))
-> (ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString))
-> ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ExitCode, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (ExitCode, ByteString)
ReadProcessStderr
readProcessInterleaved ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderrIgnored ->
Eff es (ExitCode, BSL.ByteString)
readProcessInterleaved :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr
-> Eff es (ExitCode, ByteString)
readProcessInterleaved = TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (ExitCode, ByteString)
-> Eff es (ExitCode, ByteString))
-> (ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString))
-> ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ExitCode, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ExitCode, ByteString)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (ExitCode, ByteString)
ReadProcessInterleaved
withProcessWait ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> Eff es a) ->
Eff es a
withProcessWait :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr a.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a) -> Eff es a
withProcessWait ProcessConfig stdin stdout stderr
pc = TypedProcess (Eff es) a -> Eff es a
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) a -> Eff es a)
-> ((Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a)
-> (Process stdin stdout stderr -> Eff es a)
-> Eff es a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a
forall stdin stdout stderr (m :: * -> *) a.
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> TypedProcess m a
WithProcessWait ProcessConfig stdin stdout stderr
pc
withProcessTerm ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> Eff es a) ->
Eff es a
withProcessTerm :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr a.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a) -> Eff es a
withProcessTerm ProcessConfig stdin stdout stderr
pc = TypedProcess (Eff es) a -> Eff es a
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) a -> Eff es a)
-> ((Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a)
-> (Process stdin stdout stderr -> Eff es a)
-> Eff es a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a
forall stdin stdout stderr (m :: * -> *) a.
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> TypedProcess m a
WithProcessTerm ProcessConfig stdin stdout stderr
pc
startProcess ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
Eff es (Process stdin stdout stderr)
startProcess :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr
-> Eff es (Process stdin stdout stderr)
startProcess = TypedProcess (Eff es) (Process stdin stdout stderr)
-> Eff es (Process stdin stdout stderr)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (Process stdin stdout stderr)
-> Eff es (Process stdin stdout stderr))
-> (ProcessConfig stdin stdout stderr
-> TypedProcess (Eff es) (Process stdin stdout stderr))
-> ProcessConfig stdin stdout stderr
-> Eff es (Process stdin stdout stderr)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr
-> TypedProcess (Eff es) (Process stdin stdout stderr)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (Process stdin stdout stderr)
StartProcess
stopProcess ::
( HasCallStack,
TypedProcess :> es
) =>
Process stdin stdout stderr ->
Eff es ()
stopProcess :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
Process stdin stdout stderr -> Eff es ()
stopProcess = TypedProcess (Eff es) () -> Eff es ()
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) () -> Eff es ())
-> (Process stdin stdout stderr -> TypedProcess (Eff es) ())
-> Process stdin stdout stderr
-> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> TypedProcess (Eff es) ()
forall stdin stdout stderr (m :: * -> *).
Process stdin stdout stderr -> TypedProcess m ()
StopProcess
runProcess_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
Eff es ()
runProcess_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr -> Eff es ()
runProcess_ = TypedProcess (Eff es) () -> Eff es ()
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) () -> Eff es ())
-> (ProcessConfig stdin stdout stderr -> TypedProcess (Eff es) ())
-> ProcessConfig stdin stdout stderr
-> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr -> TypedProcess (Eff es) ()
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr -> TypedProcess m ()
RunProcess_
readProcess_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderrIgnored ->
Eff es (BSL.ByteString, BSL.ByteString)
readProcess_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored
stderrIgnored.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ByteString, ByteString)
readProcess_ = TypedProcess (Eff es) (ByteString, ByteString)
-> Eff es (ByteString, ByteString)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (ByteString, ByteString)
-> Eff es (ByteString, ByteString))
-> (ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ByteString, ByteString))
-> ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es (ByteString, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) (ByteString, ByteString)
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr
-> TypedProcess m (ByteString, ByteString)
ReadProcess_
readProcessStdout_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderr ->
Eff es BSL.ByteString
readProcessStdout_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr -> Eff es ByteString
readProcessStdout_ = TypedProcess (Eff es) ByteString -> Eff es ByteString
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) ByteString -> Eff es ByteString)
-> (ProcessConfig stdin stdoutIgnored stderr
-> TypedProcess (Eff es) ByteString)
-> ProcessConfig stdin stdoutIgnored stderr
-> Eff es ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderr
-> TypedProcess (Eff es) ByteString
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr -> TypedProcess m ByteString
ReadProcessStdout_
readProcessStderr_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderrIgnored ->
Eff es BSL.ByteString
readProcessStderr_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr -> Eff es ByteString
readProcessStderr_ = TypedProcess (Eff es) ByteString -> Eff es ByteString
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) ByteString -> Eff es ByteString)
-> (ProcessConfig stdin stdout stderrIgnored
-> TypedProcess (Eff es) ByteString)
-> ProcessConfig stdin stdout stderrIgnored
-> Eff es ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderrIgnored
-> TypedProcess (Eff es) ByteString
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr -> TypedProcess m ByteString
ReadProcessStderr_
readProcessInterleaved_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdoutIgnored stderrIgnored ->
Eff es BSL.ByteString
readProcessInterleaved_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdoutIgnored stderr.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdoutIgnored stderr -> Eff es ByteString
readProcessInterleaved_ = TypedProcess (Eff es) ByteString -> Eff es ByteString
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) ByteString -> Eff es ByteString)
-> (ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) ByteString)
-> ProcessConfig stdin stdoutIgnored stderrIgnored
-> Eff es ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdoutIgnored stderrIgnored
-> TypedProcess (Eff es) ByteString
forall stdin stdout stderr (m :: * -> *).
ProcessConfig stdin stdout stderr -> TypedProcess m ByteString
ReadProcessInterleaved_
withProcessWait_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> Eff es a) ->
Eff es a
withProcessWait_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr a.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a) -> Eff es a
withProcessWait_ ProcessConfig stdin stdout stderr
pc = TypedProcess (Eff es) a -> Eff es a
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) a -> Eff es a)
-> ((Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a)
-> (Process stdin stdout stderr -> Eff es a)
-> Eff es a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a
forall stdin stdout stderr (m :: * -> *) a.
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> TypedProcess m a
WithProcessWait_ ProcessConfig stdin stdout stderr
pc
withProcessTerm_ ::
( HasCallStack,
TypedProcess :> es
) =>
ProcessConfig stdin stdout stderr ->
(Process stdin stdout stderr -> Eff es a) ->
Eff es a
withProcessTerm_ :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr a.
(HasCallStack, TypedProcess :> es) =>
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a) -> Eff es a
withProcessTerm_ ProcessConfig stdin stdout stderr
pc = TypedProcess (Eff es) a -> Eff es a
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) a -> Eff es a)
-> ((Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a)
-> (Process stdin stdout stderr -> Eff es a)
-> Eff es a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> Eff es a)
-> TypedProcess (Eff es) a
forall stdin stdout stderr (m :: * -> *) a.
ProcessConfig stdin stdout stderr
-> (Process stdin stdout stderr -> m a) -> TypedProcess m a
WithProcessTerm_ ProcessConfig stdin stdout stderr
pc
waitExitCode ::
( HasCallStack,
TypedProcess :> es
) =>
Process stdin stdout stderr ->
Eff es ExitCode
waitExitCode :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
Process stdin stdout stderr -> Eff es ExitCode
waitExitCode = TypedProcess (Eff es) ExitCode -> Eff es ExitCode
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) ExitCode -> Eff es ExitCode)
-> (Process stdin stdout stderr -> TypedProcess (Eff es) ExitCode)
-> Process stdin stdout stderr
-> Eff es ExitCode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> TypedProcess (Eff es) ExitCode
forall stdin stdout stderr (m :: * -> *).
Process stdin stdout stderr -> TypedProcess m ExitCode
WaitExitCode
getExitCode ::
( HasCallStack,
TypedProcess :> es
) =>
Process stdin stdout stderr ->
Eff es (Maybe ExitCode)
getExitCode :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
Process stdin stdout stderr -> Eff es (Maybe ExitCode)
getExitCode = TypedProcess (Eff es) (Maybe ExitCode) -> Eff es (Maybe ExitCode)
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) (Maybe ExitCode) -> Eff es (Maybe ExitCode))
-> (Process stdin stdout stderr
-> TypedProcess (Eff es) (Maybe ExitCode))
-> Process stdin stdout stderr
-> Eff es (Maybe ExitCode)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr
-> TypedProcess (Eff es) (Maybe ExitCode)
forall stdin stdout stderr (m :: * -> *).
Process stdin stdout stderr -> TypedProcess m (Maybe ExitCode)
GetExitCode
checkExitCode ::
( HasCallStack,
TypedProcess :> es
) =>
Process stdin stdout stderr ->
Eff es ()
checkExitCode :: forall (es :: [(* -> *) -> * -> *]) stdin stdout stderr.
(HasCallStack, TypedProcess :> es) =>
Process stdin stdout stderr -> Eff es ()
checkExitCode = TypedProcess (Eff es) () -> Eff es ()
forall (e :: (* -> *) -> * -> *) (es :: [(* -> *) -> * -> *]) a.
(HasCallStack, DispatchOf e ~ 'Dynamic, e :> es) =>
e (Eff es) a -> Eff es a
send (TypedProcess (Eff es) () -> Eff es ())
-> (Process stdin stdout stderr -> TypedProcess (Eff es) ())
-> Process stdin stdout stderr
-> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Process stdin stdout stderr -> TypedProcess (Eff es) ()
forall stdin stdout stderr (m :: * -> *).
Process stdin stdout stderr -> TypedProcess m ()
CheckExitCode