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

ajb at spamcop.net ajb at spamcop.net
Thu Jan 10 19:28:26 EST 2008

G'day all.

Quoting Luke Palmer <lrpalmer at gmail.com>:

> What do you mean by "black hole" here?

A "black hole" is what happens when evalation of something recursively
depends on its own evaluation in such a way that no useful work can be
done.  An example is:

     let omega = omega + 1 in omega

In previous GHCs, that triggered am error which used the phrase "black
hole".  Now, I think it just consumes the heap and/or stack.  On my
2005-era Hugs, it causes a seg fault.

Most examples of black holes aren't so blatant.  In all cases, they
are genuine bugs in the program (i.e. the program is incorrect), but
programs containing bugs like this are not even expressible in a
strict language.  So I claim this is a class of (admittedly rare) bug
that is only a problem because of laziness.

Andrew Bromage

More information about the Haskell-Cafe mailing list