[m-dev.] for review: MR_TypeInfo cleanup, part 1
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Mar 24 20:51:03 AEDT 2000
On 22-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
library/std_util.m:
> - case MR_TYPECTOR_REP_EQUIV_VAR:
> case MR_TYPECTOR_REP_EQUIV_GROUND:
> case MR_TYPECTOR_REP_EQUIV:
...
> + case MR_TYPECTOR_REP_EQUIV_VAR:
> + fatal_error(""ML_get_functor_info: MR_TYPECTOR_REP_EQUIV_VAR"");
It would be helpful to have a comment here explaining
why this case is not supposed to occur.
What does MR_TYPECTOR_REP_EQUIV_VAR represent?
The definition of that enum in runtime/mercury_type_info.h
does not document what the different alternatives are supposed
to mean.
> case MR_TYPECTOR_REP_EQUIV_VAR:
> /*
> ** The current version of the RTTI gives all equivalence types
> ** the EQUIV type_ctor_rep, not EQUIV_VAR.
> */
> fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
Ah, I see it is documented here.
It would be nice to have the same documentation at the
other places that call fatal_error() for MR_TYPECTOR_REP_EQUIV_VAR.
BTW, is that documentation correct?
Doesn't the current version sometimes give EQUIV_GROUND
rather than EQUIV?
> + /*
> + ** ML_type_params_vector_to_list:
> + **
> + ** Copy `arity' type_infos from the `arg_type_infos' vector, which starts
> + ** at index 1, onto the heap in a list.
I suggest s/heap/Mercury heap/
--
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list