[m-dev.] diff: remove old code.

Fergus Henderson fjh at cs.mu.oz.au
Mon May 19 20:29:46 AEST 1997


Tyson Richard DOWD, you wrote:
> 
> Remove support for term_to_type and type_to_term implemented as special
> preds.  Remove support for one-cell and one-or-two-cell type_infos (now
> shared-one-or-two-cell type_infos). Move definitions that were in
> mercury_builtin.m back to where they belong.
> 
> This code has been removed because it is no longer used, and was no
> longer being maintained but was still quite complex.

> +	io__write_string("\t--type-info {default, shared-one-or-two-cell}\n"),
> +	io__write_string("\t--type-info-convention {default, shared-one-or-two-cell}\n"),
>  	io__write_string("\t(This option is not for general use.)\n"),
>  	io__write_string("\t\tUse the specified format for the automatically generated\n"),
> +	io__write_string("\t\ttype_info structures. Only one option, shared-one-or-two-cell,\n"),
> +	io__write_string("\t\tis presently available.\n"),

Hmm, doesn't seem much point in having such an option.
I suggest that you leave the above documentation in, but comment it out
(unless/until we add a new type-info representation).

Is that documented in doc/user_guide.texi?
If so, you should also update it there.

> Index: compiler/polymorphism.m

> +% Wed add an extra argument for each type variable:

s/Wed/We/

> +:- pred term__term_to_type(term, T).
> +:- mode term__term_to_type(in, out) is semidet.
> +
> +:- pred term__det_term_to_type(term, T).
> +:- mode term__det_term_to_type(in, out) is det.
> +
> +:- pred term__type_to_term(T, term).
> +:- mode term__type_to_term(in, out) is det.

Documentation?

At very least keep the documentation from mercury_builtin.m:

        % The following three predicates can convert values of any
	% type to the type `term' and back again.

But you should add "(almost)" before the "any".

Otherwise that looks good.  Please address the points above and then
commit it.

Zoltan mentioned that it might also be a good idea to try enabling
the `--warn-interface-imports' option now.  (Previously it was disabled
because of too many spurious warnings about e.g. `import_module list'
not being needed.)

-- 
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