[m-dev.] diff: pass typeclass-info args to C code

David Glen JEFFERY dgj at cs.mu.OZ.AU
Fri Aug 21 11:44:48 AEST 1998

On 20-Aug-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 20-Aug-1998, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> > Hi,
> > 
> > Can someone please review this. (Tyse?).
> > 
> > ------------------------------------------------------------------------
> > 
> > Estimated hours taken: 1
> > 
> > compiler/polymorphism.m:
> > 	When adding C variables for the type_info variables to pragma_c_code,
> > 	do not add type-infos for those that are constrained, but instead add
> > 	a variable for the typeclass-info.
> > 
> > 	Also print out a per-pred progress message during polymorphism.
> The change is fine, although as I pointed out to you in person, the
> naming convention allows collisions in generated names.  However, as
> you pointed out to me, the current system allows such things too, and
> doesn't work properly anyway, so it's not a big problem, but should
> be fixed by someone at some stage in the future.

Actually, now that I think about it, the existing system doesn't have this
problem at all. (For those who are wondering, the problem is that the name
produced for a typeclass-info is:

So... constraints like:
	class1(T1, T2) and class1_T1(T2)

would produce the same name. Perhaps a more liberal use of double underscore
will fix this? Ideas?

love and cuddles,
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
PhD student,                    |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.

More information about the developers mailing list