want better error msg with Class Read

Dean Herington heringto@cs.unc.edu
Thu, 7 Nov 2002 14:27:13 -0500 (EST)


On 7 Nov 2002, Alastair Reid wrote:

> > Why not just define your own function, much like `read`, that
> > produces a more suitable error message?
> 
> readsPrec (i.e., the class method) doesn't report how far it got when
> it reports failure.

Yes, that's true if no prefix is a valid parse.  In the case Johannes
gave--where there was a valid parse plus trailing garbage--one could,
using readsprec, report a better message.  But a general solution requires
significant changes as you said.

 -- Dean