On 25 May 2010 12:02, Magicloud Magiclouds
<magicloud.magiclo...@gmail.com> wrote:
> U is for UTF8 module. And I will try the modules you mentioned.
> Although I thought Haskell IO is lazy enough....

If you're only streaming data, it probably would be.  However, you
seem to keep some of it in memory, which is what the problem is.  You
might be able to fix this by doing "main = readFile filename >>= liftM
separateOutput >>= mapM_ foo".  However, it depends on what
separateOutput does.

Also, consider using when (from Control.Monad) instead of your if statement.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to