Whilst playing with overlapping instances in the November 99 release,
I got a lot of messages of the form:

ERROR "../prop/Buff2.lhs" (line 44): Overlapping instances for class "Pinned"
*** This instance   : Pinned a
*** Overlaps with   : Pinned a
*** Common instance : Pinned c

Would it be possible to also print the line number of the instance it
overlaps with?  Looking at the code (static.c, line 2954), it looks as
though all we need is the filename and line of the instance it
conflicts with.  

The instance is in hd(ins).
The line number is in inst(hd(ins)).line.

Unfortunately, the filename (or module identifier) isn't stored in strInst
(easily fixed) and the existing error-message framework (errors.h) isn't
really setup for printing two sites at which the error occurs.

[Incidentally, the last Hugs-GHC user-interface API I saw (was it
called HEP?) has the same problem that error messages can only point
to one error site.  You might want to fix that at the same time.]


-- 
Alastair Reid        [EMAIL PROTECTED]        http://www2.cs.utah.edu/~reid/

Reply via email to