GHC's error messages are too verbose?

Simon Peyton-Jones simonpj at microsoft.com
Mon Apr 16 09:18:53 EDT 2007


Two thoughts on this error-message thread.

1. It'd be easy to add a flag to trim the number of levels of context you get.   It'd mean yet another flag though.

2.  Bryan got a rather long chunk of program text. GHC tries to trim the size of program chunks by printing "..." after a certain "depth".  But this depth mechanism isn't working well for Bryan's example.  This should not be at all hard to fix -- it look as it may be to do with do-notation.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org] On
| Behalf Of Neil Mitchell
| Sent: 14 April 2007 11:40
| To: Bryan O'Sullivan
| Cc: glasgow-haskell-users at haskell.org
| Subject: Re: GHC's error messages are too verbose?
|
| Hi
|
| > I've long wondered why GHC issues such prolix error messages when it
| > runs into a problem.
|
| I am primarily a Hugs user, compiling and running only with GHC once
| the code works, and only if I really need the speed - which is quite
| rare. but I've been hacking a project in GHCi recently (requiring
| template haskell), and I found the GHC error messages way too verbose.
|
| > Compilers for other languages seem content with as little as one line of
| > output per error (which I am not advocating), or a few lines of source
| > with the problem highlighted, but I rarely see more.  Hugs also tends
| > towards the terse side, but I've never found this to be a problem.
|
| The most important thing in an error message for me is the line
| number. Next I want to see the type of error - syntax, type, instance
| etc. Then I want to see just a few lexemes of context so I can find
| where to start looking. If after all that I didn't figure out where
| the error was, I'd want more context - but I rarely want it with Hugs.
|
| I much prefer the Hugs error messages, although this may be experience
| with Hugs, rather than an issue with GHC.
|
| Thanks
|
| Neil
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list