[Haskell-beginners] SOLVED - Stack overflow, but hard to understand

Michael Mossey mpm at alumni.caltech.edu
Wed Oct 21 15:46:55 EDT 2009

Magnus Therning wrote:
> Just out of curiosity, did you verify that all three files were
> completely *read*, as opposed to all three opened, but only the first
> line of the first file being read?
> /M

Actually, no I didn't verify that, in this example. I was thinking about my 
other program in which I used mapM over the characters of the file onto a 
Rand monad. That one definitely read all the characters of the 
file---certain processing routines were called about 30,000 times 
(according to the profiler). This makes sense to me now, because I was 
asking for the state out the other side of the mapM.


More information about the Beginners mailing list