Monomorphism, monomorphism...

Carl R. Witty
09 Oct 2001 13:55:04 -0700

"Marcin 'Qrczak' Kowalczyk" <> writes:

> Since OO languages often use subtypes to emulate constructors of
> algebraic types, they need downcasts. In Haskell it's perhaps less
> needed but it's a pity that it's impossible to translate an OO scheme
> which makes use of downcasts into Haskell in an extensible way
> (algebraic types are "closed").

I agree.  The TREX paper from Mark Jones and Benedict Gaster (I hope I
have the names right) had both extensible records and extensible
variants (extensible variants being what you would need to implement
downcasts), but only the extensible records part of the paper was
implemented in Hugs.

Carl Witty