Yes, main conduit package is pretty much everything you would need to start.
The idea is that you organize your workflow in Conduit
s. Take some elements in - push some elements out. On the basic level you can go pretty far just by using await
and yield
. Just use them in a monad, like this:
idConduit =
do mElt <- await
case mElt of
Nothing -> return ()
Just element ->
do yield element
idConduit
Then you put them between Sink
and Source
like mySink $= myConduit1 $= myConduit2 $$ mySource
and you are done.
If you want to read files with them, try attoparsec-conduit
as well.