[m-rev.] for post-commit review: step 2 of eliminating type_info/1's argument

Mark Brown mark at cs.mu.OZ.AU
Mon Sep 26 14:12:06 AEST 2005


On 22-Sep-2005, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> This is step 2 of eliminating the arguments of the type_ctor_info, type_info,
> base_typeclass_info and typeclass_info type constructors. This step changes
> the arity of those type constructors from 1 to 0, and starts generating
> references to them again. Due to bootstrapping issues, we can't delete the
> zero_type_ctor_info, zero_type_info, zero_base_typeclass_info and
> zero_typeclass_info types yet; that will be step 3.

This looks okay.  Just one question:

> Index: library/private_builtin.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/library/private_builtin.m,v
> retrieving revision 1.143
> diff -u -b -r1.143 private_builtin.m
> --- library/private_builtin.m	19 Sep 2005 07:26:30 -0000	1.143
> +++ library/private_builtin.m	19 Sep 2005 13:01:54 -0000
> @@ -312,8 +295,18 @@
>      % used for copying type_info/1 and typeclass_info/1 types.
>      % XXX Document me better
>      %
> -:- type sample_type_info ---> sample_type_info(type_info(int)).
> -:- type sample_typeclass_info ---> sample_typeclass_info(typeclass_info(int)).
> +:- type sample_type_info
> +    ---> sample_type_info(old_type_info(int)).
> +:- type sample_typeclass_info
> +    ---> sample_typeclass_info(old_typeclass_info(int)).
> +:- type old_type_info(T)
> +    ---> old_type_info(old_type_ctor_info(T)).
> +:- type old_type_ctor_info(T)
> +    ---> old_type_ctor_info(int).
> +:- type old_typeclass_info(T)
> +    ---> old_typeclass_info(old_base_typeclass_info(T)).
> +:- type old_base_typeclass_info(_)
> +    ---> old_typeclass_info(int).

Would it be okay to just have

	:- type sample_type_info
		--->	sample_type_info(type_info).

and similarly for sample_typeclass_info?  In fact, are these types really
neeed at all?

Cheers,
Mark.

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