[Haskell-beginners] Using Iteratees to write to a file
Richard Wallace
rwallace at thewallacepack.net
Sat Mar 19 09:01:46 CET 2011
Hello everyone,
I've been reading "Iteratee: Teaching an Old Fold New Tricks" from the
Monad Reader Issue 16 and am having a problem figuring out how to use
the streamToFile function. Specifically, I can't figure out how to
feed the Iteratee data to write to the file. If I run
ghci> runIter $ streamToFile "/tmp/stream"
Then the file is created but not populated with any data - which is
natural since I didn't give it any data. I have no clue how to give
it data though. I'd really appreciate it if someone could show me how
to write "Hello world!" or something else equally mundane to get me
going. I've been banging my head on this for hours now.
Thanks,
Rich
More information about the Beginners
mailing list