[Haskell-cafe] Re: Why purely in haskell?

Niko Korhonen niko.korhonen at gmail.com
Fri Jan 11 09:22:34 EST 2008

jerzy.karczmarczuk at info.unicaen.fr wrote:
> Niko Korhonen writes:
> ...
>> Although it could be argued that laziness is the cause of some very 
>> obscure bugs... <g> Niko
> Example, PLEASE.
> Jerzy Karczmarczuk

Write any piece of code that processes data from hard disk in a 
non-trivial manner, uses buffering with IOUArray or does pretty much 
anything IO heavy. You're bound to hit into a few laziness-related 
stack/heap overflows before you get it right. Sometimes finding the 
space leak can be really, really hard and causes the amount of 
strictness annotations in your code to explode. Hence the notion that 
the art of optimizing Haskell programs is akin to black magic and is 
fully understood only by a handful of some of the best minds in the 

For some concrete examples see my posts on randomR and IOUArray on this 


More information about the Haskell-Cafe mailing list