[m-dev.] diff: fix bug with simplify.m & existential types

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 5 17:42:23 AEST 1998

On 05-Aug-1998, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> > 	% The predicate has_type/2 is basically an existentially typed
> > 	% inverse to the function type_of/1.  It constrains the type
> > 	% of the first argument to be the type represented by the
> > 	% second argument.
> > 	%
> > 	% Warning: support for existential types is still experimental.
> > 	%
> > :- some [T] pred has_type(T::unused, type_info::in) is det.
> Yuck! Should that actually be legal?

Sure, it's not only legal, it's actually quite useful -- see the changes
to the standard library that I posted recently.  Without that sort of
thing, the only way of doing certain things involves using unsafe type
casts and the like.

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        |     -- the last words of T. S. Garp.

More information about the developers mailing list