Dear GHC-Santas,



I also have a wish list and one of the things I would
like to aks for is a change in error messages generated
by ghc(-4.04 in this case). In my opinion this would
make it easier to locate the cause of an error.

I shall use a contrived code example to illustrate
what I mean:

> module Example( example ) where

> example :: Eq a => a -> a
> example a
>   | (b == b) && (a == a) = a
>   where b = error []

Example.lhs:5:
    Ambiguous type variable(s) `a'
        in the constraint `Eq a'
        arising from use of `==' at Example.lhs:5

I think this message could be improved by adding some more
information:
 1) Mention the name(s) of the variable(s) with type `a'
    which caused the error (There are two variables
    used in line 5 and the use of only one of them causes
    the error);
 2) Mention which instance of `==' in line 5 caused
    the error (There are two such things in line 5
    each with a constraint of the form `Eq a.' One
    only causes the error).

It is my experience that as code fragments become larger
(and constraints are very loose,) the search space for
potential errors gets large at a very rapid speed. Any
additional information to prune this search space will
make the problem of locating actual errors signifficantly
more easy.

Please note that this is not at all the highest point on
my wish list. I only mention it because I think it would
improve using ghc. In other words: Feel free to ignore.


Regards,


Marc van Dongen
_______________________________________________________
     Marc van Dongen, CS Dept | phone:   +353 21 903578
University College Cork, NUIC | Fax:     +353 21 903113
  College Road, Cork, Ireland | Email: [EMAIL PROTECTED]

Reply via email to