Safe Haskell | None |
---|---|
Language | Haskell98 |
Reading from the process.
- run :: Segment r -> IO r
- text :: (r ~ (), m ~ IO) => ConduitM Text Text m r -> Segment r
- bytes :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r
- conduit :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r
- conduitEither :: (a ~ ByteString, m ~ IO) => ConduitM a (Either ByteString ByteString) m r -> Segment r
- shell :: String -> Segment ()
- proc :: String -> [String] -> Segment ()
- ($|) :: Segment () -> Segment b -> Segment b
- data Segment r
- data ProcessException
- class ToChunk a where
- toChunk :: a -> Either ByteString ByteString
- tryS :: Exception e => Segment r -> Segment (Either e r)
Running scripts
Conduit types
text :: (r ~ (), m ~ IO) => ConduitM Text Text m r -> Segment r Source
Work on the stream as Text
values from UTF-8.
bytes :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r Source
Lift a conduit into a segment.
General conduits
conduit :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r Source
Lift a conduit into a segment.
conduitEither :: (a ~ ByteString, m ~ IO) => ConduitM a (Either ByteString ByteString) m r -> Segment r Source
Lift a conduit into a segment, which can yield stderr.
Running processes
($|) :: Segment () -> Segment b -> Segment b infixl 0 Source
Fuse two segments (either processes or conduits).
A pipeable segment. Either a conduit or a process.
Alternative Segment | |
Monad Segment | |
Functor Segment | |
Applicative Segment | |
MonadIO Segment | |
(~) * r () => ProcessType (Segment r) |
data ProcessException Source
Process running exception.
Used to allow outputting stdout or stderr.
toChunk :: a -> Either ByteString ByteString Source