polysemy-process-0.12.1.0: Polysemy effects for system processes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Process.Interpreter.SystemProcess

Description

 
Synopsis

Documentation

type SysProcConf = ProcessConfig () () () Source #

Convenience alias for a vanilla ProcessConfig, which will usually be transformed by interpreters to use Handles.

type PipesProcess = Process Handle Handle Handle Source #

Convenience alias for the Process type used by native interpreters.

handleSystemProcessWithProcess :: forall r r0 a. Members [Stop SystemProcessError, Embed IO] r => Process Handle Handle Handle -> SystemProcess (Sem r0) a -> Sem r a Source #

Handle SystemProcess with a concrete Process with connected pipes.

interpretSystemProcessNative :: forall param r. Members [Resource, Embed IO] r => (param -> Sem r (Either Text SysProcConf)) -> InterpreterFor (Scoped param (SystemProcess !! SystemProcessError) !! SystemProcessScopeError) r Source #

Interpret SystemProcess as a scoped Process that's started wherever withSystemProcess is called and terminated when the wrapped action finishes. This variant is for parameterized scopes, allowing the consumer to supply a value of type param to create the process config.

interpretSystemProcessNative_ :: forall r. Members [Resource, Embed IO] r => SysProcConf -> InterpreterFor (Scoped_ (SystemProcess !! SystemProcessError) !! SystemProcessScopeError) r Source #

Interpret SystemProcess as a scoped Process that's started wherever withSystemProcess is called and terminated when the wrapped action finishes. This variant takes a static SysProcConf.

interpretSystemProcessWithProcessOpaque :: forall i o e r. Member (Embed IO) r => Process i o e -> InterpreterFor (SystemProcess !! SystemProcessError) r Source #

Interpret SystemProcess with a concrete Process with no connection to stdio.

interpretSystemProcessNativeOpaqueSingle :: forall i o e r. Members [Resource, Embed IO] r => ProcessConfig i o e -> InterpreterFor (SystemProcess !! SystemProcessError) r Source #

Interpret SystemProcess as a single global Process that's started immediately.

interpretSystemProcessNativeOpaque :: forall i o e r. Members [Resource, Embed IO] r => ProcessConfig i o e -> InterpreterFor (Scoped_ (SystemProcess !! SystemProcessError)) r Source #

Interpret SystemProcess as a scoped Process that's started wherever withSystemProcess is called and terminated when the wrapped action finishes.