[m-dev.] Foreign type compare and unification
Peter Schachte
schachte at cs.mu.OZ.AU
Wed May 22 13:07:26 AEST 2002
On Tue, May 21, 2002 at 04:10:22PM +1000, Mark Brown wrote:
> :- generic_instance printable(T) where [
> (to_doc(X) = pprint__to_doc(X))
> ].
>
> This would _not_ imply that all types are members of the typeclass.
So every type that wants to be printable would need an instance
declaration? And every type that wants to allow term comparison? Or
functor and arg? In-in mode Unification?
> And there's the rub: if we had
> dynamic typeclass casts, then we could implement this whole example without
> using generic/derived instances at all.
But you get no compile-time class checking.
--
Peter Schachte A nation that continues year after year to spend
schachte at cs.mu.OZ.AU more money on military defense than on programs
www.cs.mu.oz.au/~schachte/ of social uplift is approaching spiritual doom.
Phone: +61 3 8344 9166 -- Martin Luther King, Jr.
--------------------------------------------------------------------------
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