logo       

Re[2]: the impossible happened: msg#00106

lang.haskell.glasgow.bugs

Subject: Re[2]: the impossible happened

Hello Tomasz,

Monday, May 23, 2005, 1:49:03 PM, you wrote:

TZ> It seems that there are not that many uses of fromJust in GHC's sources.
TZ> I guess that removing them or at least making them report a source
TZ> location in case of failure (for example using a CPP macro like in
TZ> darcs) would be an good task for a wannabe GHC hacker. Unfortunately,
TZ> I can't volunteer at this moment.

imho, addition of filename/linenumber to all standard function
failures ("head []" and so on) will be VERY useful. only last days i
goes thorough searching two such errors - one with "maximum" and
second also with "maximum" :) i have luck to use this function only in
several places, so my debugging was nearly straightforward, but
addition of linenumber to error message would be very helpful - just
like message about pattern matching failure give us the immediate
place of problem

also it will be cool to have ability to add such annotations to my own
functions, smthg like:

head (x:xs) = x
head [] = superError "head []"

which will print: "Error: head [] in Module.hs:155"


--
Best regards,
Bulat mailto:bulatz@xxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise