Curious behaviour of irrefutable pattern.

Bernie Pope bjpop at csse.unimelb.edu.au
Fri Dec 22 04:16:22 EST 2006


On 22/12/2006, at 7:14 PM, Simon Peyton-Jones wrote:

> | I take it, then, that the answer to the question of "under what
> | circumstances does the (error -> non-termination) transformation
> | happen?" is that GHC can choose among different bottoms that are
> | present in the program.  It can't, however, willy-nilly convert my
> | error calls to bottom.  (Or something more precise along the same
> | lines.)
>
> Yes, that's right, good point.

I've been following this thread with interest.
But now I don't understand what the conclusion is.

I thought Simon's earlier example showed that the semantics of
GHC does not distinguish between an infinite loop and a call to error.
Otherwise the strictness optimisation would be unsound.

Mike, what do you mean by "willy nilly convert my error calls to  
bottom"?

Cheers,
Bernie.


More information about the Glasgow-haskell-users mailing list