[Haskell-beginners] Processing a list of files the Haskell way

Michael Schober Micha-Schober at web.de
Wed Mar 14 11:44:53 CET 2012


On 03/13/2012 07:47 PM, Chaddaï Fouché wrote:
> Is there a problem with the solution I gave you ?
No and yes. No in the sense that it most certainly did solve the open 
files problem. Yes in the sense that it still consumed a huge amount of 
memory and, more important to me, left me feeling that I was certainly 
doing something conceptually wrong. That was the reason for my repost, 
since I wanted to learn the 'right' (or at least more suitable) concept.

> An "experienced" Haskell programmer would probably reuse some of the
> "streaming" solutions on Hackage, combine it with md5 and a map :
This seems to be the 'Haskell-way' solution I was looking for. I'm still 
in the progress of digging through a lot of material I found ([1-3], 
links below for other interested readers), but I think that this will be 
very helpful in the future with similar projects as well.

I have yet to test the code you send me last time, but I will give some 
feedback of it as soon as I get the chance.

Thank you very much!
Michael

References:
[1] The original conduit article I found:
http://www.yesodweb.com/book/conduit
[2] Conduits seem to be a development progress originating from 
enumerators/iteratee. Therefore, it seems to be a good idea to read up 
on those prior:
http://www.yesodweb.com/book/enumerator
[3] There's also an article in The Monad.Reader, issue 16 about Iteratee:
http://themonadreader.wordpress.com/2010/05/12/issue-16/



More information about the Beginners mailing list