[Haskell-cafe] mistake in Gentle Introduction

Simon Marlow simonmar at microsoft.com
Thu Sep 22 07:01:17 EDT 2005


On 22 September 2005 10:21, Tomasz Zielonka wrote:

> On 9/22/05, Simon Marlow <simonmar at microsoft.com> wrote:
> 
> 	On 22 September 2005 10:05, Christian Maeder wrote:
> 	> The error message on this is really poor: parse error on input
> 	> `length'
> 	>
> 	> An addition like "expecting '('" might be more helpful.
> 
> 	Not easy to do - some significant work on Happy would be
required (or
> 	rewriting GHC's parser, which is even more unlikely).
> 
> 	However we *would* like to do some simple error recovery in the
> 	parser at some point.  The main reason for doing this is to get
> 	better results from checking partially complete modules in
Visual
> Haskell or hIDE. 
> 
> 
> How about using the parser made by Arthur Baars, trading speed for
> better error messages? Maybe even the speed issue could be solved.

Personally I'm not keen on that tradeoff currently - the GHC survey
indicated that more people were concerned about the speed of GHC than
the quality of the error messages.

Also bear in mind that Arthur's parser is slower by 10% when compiling
the libraries - that's optimised compilation with -split-objs, which is
a lot of time not spent parsing.  I bet it's a much higher percentage of
unoptimised compilation, and it would hurt GHCi (and Visual Haskell)
users even more.  Numbers please!

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list