| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Polysemy.Process.Effect.ProcessOutput
Description
Synopsis
- data OutputPipe
- data ProcessOutput (p :: OutputPipe) a :: Effect where
- Chunk :: ByteString -> ByteString -> ProcessOutput p a m ([a], ByteString)
- chunk :: forall p a r. Member (ProcessOutput p a) r => ByteString -> ByteString -> Sem r ([a], ByteString)
Documentation
data OutputPipe Source #
Kind tag for selecting the ProcessOutput handler for stdout/stderr.
Instances
| Show OutputPipe Source # | |
Defined in Polysemy.Process.Effect.ProcessOutput Methods showsPrec :: Int -> OutputPipe -> ShowS # show :: OutputPipe -> String # showList :: [OutputPipe] -> ShowS # | |
| Eq OutputPipe Source # | |
Defined in Polysemy.Process.Effect.ProcessOutput | |
data ProcessOutput (p :: OutputPipe) a :: Effect where Source #
This effect is used by the effect Process to accumulate and decode chunks of ByteStrings, for
example using a parser.
The interpreter may be stateful or stateless, since the constructor Chunk is expected to be called with both the
accumulated unprocessed output as well as the new chunk.
Constructors
| Chunk | Add a chunk of output to the accumulator, returning any number of successfully parsed values and the leftover output. |
Fields
| |
chunk :: forall p a r. Member (ProcessOutput p a) r => ByteString -> ByteString -> Sem r ([a], ByteString) Source #
Add a chunk of output to the accumulator, returning any number of successfully parsed values and the leftover output.