[m-rev.] Improved type error message

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 6 18:33:00 AEDT 2002


On 06-Feb-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> compiler/typecheck.m:
> 	Improved how actual/expected type errors are reported.

There should be a test case to test your change.

> Index: typecheck.m
...
>  write_var_type_stuff(T, type_stuff(VT, TVarSet, TBinding)) -->
> +	io__write_string(   "    (actual)   "),
>  	write_type_b(VT, TVarSet, TBinding),
> -	io__write_string("/"),
> +	io__write_string(",\n    (expected) "),

You should call `prog_out__write_context(Context)'
at the start of each line of output.

Also, do you think it would be better to use the word "inferred"
rather than "actual"?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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