[m-dev.] diff: typeclasses
Fergus Henderson
fjh at cs.mu.oz.au
Sun Nov 23 06:59:04 AEDT 1997
David Glen JEFFERY, you wrote:
> compiler/base_typeclass_info.m: (New File)
> Produce one base_typeclass_infos for each instance declaration.
s/infos/info/
> +++ bytecode.m 1997/08/26 05:06:56
>
> + % XXX FIX THIS
> +output_cons_id(base_typeclass_info_const(_, _, _)) -->
> + output_byte(8).
> +
Probably you should insert a call to error/1 here.
> +++ call_gen.m
> +call_gen__generate_class_method_call(_OuterCodeModel, TCVar, Num, Args, Types,
I think `MethodNum' would be a better name than `Num'.
> + % XXX This assumes compact args!!!
> + % XXX This assumes compact args!!!
> + % XXX This assumes compact args!!!
> +:- pred call_gen__generate_class_method_call2(code_model, var, int, list(var),
Rather than repeating the XXX comment tree times, it would be better to
change the code to check whether args_method is compact_args, and if
not call error/1.
Also please s/call2/call_2/g, for consistency with the naming
conventions used elsewhere in the Mercury compiler.
> Index: compiler/notes/compiler_design.html
You need to document what the new files (e.g. check_typeclass.m,
base_typeclassinfo.m, etc.) do here. Please do that sometime soon,
it makes it easier to read the diff if we can understand the design
changes first.
--
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