[Haskell-cafe] Conduit and foldLines
K.Bleijenberg at lijbrandt.nl
Mon Sep 7 10:04:55 UTC 2015
My goal is to parse a big text-file line by line using the same parser for
I am new to Conduit and I've read this
After adding import Control.Monad.Trans.Resource for runResourceT and
adding rankNTypes, I got it working.
Code in www.tbsoftware.nl/TestConduit/TestConduit7.hs
I don't understand what is going on in myFunc. Does CL.fold fold over the
already read lines?
I wonder whether CL.fold loads the whole file in memory?
if I change
count <- CL.fold (\count t -> count + T.length t) 0 to
count <- CL.fold (\count t -> T.length t) 0
nothing changes in the output. If count is always zero, why using a fold?
How can I get the 'current line' in myFunc?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe