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

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Aug 21 10:51:53 AEST 1998


> > 	TypeclassInfo_for_<fully-qualified classname>_<arity>__<var1>_<var2>
> 
> Nope.  What about
> TypeclassInfo_for_class1_2__T1_T2_T3
> 
> is that
> 	class1(T1_T2, T3)
> or
> 	class1(T1, T2_T3)

If type var names are not allowed to have __ inside of them, or if any
__'s are converted to ___'s, the following scheme is guaranteed to work:

TypeclassInfo_for_<arity>_<fully-qualified classname>__<var1>__<var2>

The arity is unambiguous, and one can uniquely determine where the class name
ends by counting __'s from the back.

Zoltan.



More information about the developers mailing list