RE: improving error messages

2006-10-30 Thread Simon Peyton-Jones
| as you may remember, in GHC survey awkward error messages was named as
| one of most serious GHC drawbacks. i propose to start collecting
| examples of bad error messages together with what we want to see in
| these cases. as first contribution, i've added this text as
| http://hackage.haskell.org/trac/ghc/ticket/956

Thank you!  It'll be very useful to have such a collection.  

Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: improving error messages

2000-03-31 Thread George Russell

(Sent to glasgow-haskell-users rather than haskell, as it is GHC-specific.)

If we were writing a C library rather than a Haskell library, we could make
"head" a macro which included an appropriate message referring to __FILE__
and __LINE__.  The equivalent in Glasgow Haskell would be to make head inline,
and include a primHaskellFile (and if possible, though I doubt it, primHaskellLine)
which got replaced at a late stage by the actual name of the current module.  This
would be useful for locating other error messages as well.  For example I have
a debug action which (if debugging is turned on) prints out messages to a file;
if we had a primHaskellFile I could make this debug message automatically refer
to the calling module, which would be nice.