Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Consume input output :: * -> * -> *
- transform :: Transform input output -> Consume output sinkOutput -> Consume input sinkOutput
- count :: Consume input Int
- sum :: Num num => Consume num num
- head :: Consume input (Maybe input)
- list :: Consume input [input]
- reverseList :: Consume input [input]
- concat :: Monoid monoid => Consume monoid monoid
- fold :: Fold input output -> Consume input output
- foldInIO :: FoldM IO input output -> Consume input output
- writeBytesToFile :: FilePath -> Consume ByteString (Either IOException ())
- appendBytesToFile :: FilePath -> Consume ByteString (Either IOException ())
- deleteFiles :: Consume FilePath (Either IOException ())
- printBytes :: Consume ByteString ()
- printText :: Consume Text ()
- printString :: Consume String ()
- parseBytes :: Parser output -> Consume ByteString (Either Text output)
- parseText :: Parser output -> Consume Text (Either Text output)
Documentation
data Consume input output :: * -> * -> * #
Active consumer of input into output. Sort of like a reducer in Map/Reduce.
Automates the management of resources.
Profunctor Consume | |
Choice Consume | |
Functor (Consume input) | |
Applicative (Consume input) | |
transform :: Transform input output -> Consume output sinkOutput -> Consume input sinkOutput Source #
reverseList :: Consume input [input] Source #
A faster alternative to "list", which however constructs the list in the reverse order.
writeBytesToFile :: FilePath -> Consume ByteString (Either IOException ()) Source #
Overwrite a file.
- Exception-free
- Automatic resource management
appendBytesToFile :: FilePath -> Consume ByteString (Either IOException ()) Source #
Append to a file.
- Exception-free
- Automatic resource management
deleteFiles :: Consume FilePath (Either IOException ()) Source #
printBytes :: Consume ByteString () Source #
printString :: Consume String () Source #
parseBytes :: Parser output -> Consume ByteString (Either Text output) Source #