
21 Dec
2006
21 Dec
'06
6:56 p.m.
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