[m-dev.] Does dynamic_cast/2 preserve typeclass info?

Ralph Becket rbeck at microsoft.com
Fri Mar 2 04:53:03 AEDT 2001


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> 
> In the mean time, the only work around really is to not throw away the
> typeclass info in the first place.  That means don't use univ -- instead
> you can use your own existentially quantified type, e.g.
> 
> 	:- type my_univ ---> some [T] has_tc(T) => tc(T)
> 			;    some [T] has_tc2(T) => tc2(T)
> 			;    some [T] other(T).

Many thanks!
--------------------------------------------------------------------------
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