[m-rev.] for review: better error messages for overloaded types
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Aug 6 17:26:38 AEST 2001
On 03-Aug-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> BTW, this is the first change to introduce the use of typeclasses
> into the compiler.
The compiler proper, yes. The library has had typeclasses for a while.
> Don't forget to update *.err_exp* in tests/invalid and *.exp* in
> tests/warnings to reflect any changes to the warning/error messages.
There are no changes required. These error messages were not being tested.
My diff has the first test case of this code.
> For consistency with other error messages,
> the types should be intended two spaces more than the "variable ... has
> overloaded type" message, rather than just one space more.
> Also the closing '}' should be intended at the same level as the "variable
> ... has overloaded type" message, rather than one space more.
>
> i.e. it should be
>
> overloading.m:050: variable `StartMap0' has overloaded type {
> overloading.m:050: (pred (tree234:tree234(V_V_1, V_V_2))),
> overloading.m:050: (tree234:tree234(K, V))
> overloading.m:050: },
>
>
> Otherwise that looks fine. Please post a relative diff.
I have followed your other suggestions, but I am not sure about what should be
done here. I think the code that prints the first line of the error message
(which I did not change) is already wrong, because it has two spaces, not one.
It seems the rest of this module does not follow the convention. Fixing just
this error message while leaving the rest as they are looks wrong, but I don't
want to convert the whole module (mercury_to_mercury.m was enough, thank you),
and in any case any general fix to the error messages ought to entail using
error_util anyway.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list