Curious behaviour of irrefutable pattern.

Mike Gunter m at ryangunter.com
Thu Dec 21 13:56:24 EST 2006


> In general, GHC (like every other compiler that does strictness analysis) feels free to change non-termination into a call to 'error' and vice versa.

Under what circumstances does the (error -> non-termination)
transformation happen?  I'd be unhappy if (head "") put me into an
infinite loop instead of giving me an error message.

Do you mean if I have both an infinite loop and an error call, then I
might get only the loop?

thanks
-m


More information about the Glasgow-haskell-users mailing list