Proposal: Improved error message of "Error in array index"
Simon Marlow
simonmar at microsoft.com
Wed Nov 9 06:40:39 EST 2005
On 09 November 2005 11:40, Simon Marlow wrote:
> On 09 November 2005 10:18, Ketil Malde wrote:
>
>> Simon Marlow wrote:
>>
>>> Hmm yes, this is indeed rather unhelpful. I can explain why it
>>> happens, though. The compiler has lifted out the error case into a
>>> top-level binding:
>>>
>>> x = error "Error in array index"
>>>
>>>
>> Would the compiler be less agressive with this if I turn off
>> optimization? I usually use optimization with profiling as well,
>> but could of course turn it off if it would result in more useful
>> stack backtraces.
>
> Possible... but not guaranteed. I think the simplifier does limited
> forms of let-floating even without -O.
Oh, and that code is in a library, so turning off -O won't help there.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list