[m-dev.] for review: new typeclass method syntax

Fergus Henderson fjh at cs.mu.oz.au
Wed Jan 7 16:49:18 AEDT 1998


On 07-Jan-1998, David Glen JEFFERY <dgj at cs.mu.oz.au> wrote:
> 
> A few minor changes, including fixing the syntax of a typeclass declaration.
> The methods inside a typeclass declaration no longer have a ":-" at the start.
...
> --- make_hlds.m	1997/12/22 09:55:55	1.248
> +++ make_hlds.m	1998/01/05 03:37:08
...
> +		io__stderr_stream(StdErr),
> +		io__set_output_stream(StdErr, OldStream),
> +		prog_out__write_context(Context),
> +		io__write_string("Error: typeclass `"),
> +		prog_out__write_sym_name(Name),
> +		io__write_char('/'),
> +		io__write_int(ClassArity),
> +		io__write_string("' multiply defined.\n"),
> +		io__set_exit_status(1),
> +		io__set_output_stream(OldStream, _),

(1) You ought to print out the location of the previous definition.
(2) Any reason why you don't print this message out using the
    predicate multiple_def_error/5 which is defined in make_hlds.m?

Otherwise those changes look fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list