[m-dev.] for review: bug fix for existential_rtti.m

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 15 23:10:19 AEDT 2000


On 15-Feb-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 15-Feb-2000, Zoltan wrote:
> > 
> > I strongly suspect that all finding and fixing all those additional places
> > will be only be at least half as much work as making typeinfo a builtin
> > type, but that this work will need to be redone when we do make typeinfo a
> > builtin type.
> 
> What do you mean by "making typeinfo a builtin type"?

I discussed this in person with Zoltan.
>From that discussion, I think there are several different
aspects to making typeinfo a builtin type:

	1. delete the (T) from type_info and base_type_info types
	   in private_builtin, and modify polymorphism.m (etc.)
	   accordingly
	
	2. delete the type_info/1 constructor from private_builtin.m
	   and instead use a new builtin cons_id

and	3. make the type_info and type_ctor_info types builtin types
	   (i.e. not defined in Mercury code, like `int').

Likewise we could do the same 3 steps for typeclass_infos and
base_typeclass_infos, except that we can't easily do step 1,
because the type parameter in typeclass_infos is used to represent
the constraint that the typeclass_info is for, and some parts of the
compiler source code (e.g. higher_order.m; see `cvs log -N -r1.148
compiler/polymorphism.m' for details) need that information.

The change to use type_util__real_vars instead of type_util__vars
could only be avoided if we did step 1 for both type_infos
and typeclass_infos, and as noted above, doing step 1 for
typeclass_infos is not easy.

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