[m-dev.] diff: type_name/1 et al
Fergus Henderson
fjh at cs.mu.oz.au
Fri Apr 25 20:41:16 AEST 1997
Tyson Richard DOWD, you wrote:
>
> ... if you want the type_name, you either
> - want to be as high up the equivalence chain as you can,
> to get the most information about the type.
> - want the canonical type, so you get the most basic information
> about the type.
Agreed. The difficulty with the first alternative is that (a) it would be
difficult to specify exactly what you really mean by "as high up the
equivalence chain as possible", because the very notion of the
type of a variable is not well-defined if you want to take equivalence
type distinctions into account --- only the canonical type of a variable
is well-defined; and (b) it would be difficult to implement, because the
currently the type checker works by expanding equivalence types first up
and (c) requiring implementations to support this might be overly constraining,
because it might prevent certain optimizations. On the other hand, if
we make it cc_multi, we give implementations maximum freedom to return
a result that is as useful as possible without needing to preserve
equivalence types while type checking, and without constraining
optimizations.
--
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