Tue, 9 Oct 2001 10:50:19 +1300, Tom Pledger [EMAIL PROTECTED] pisze:
I'm curious about this impossibility.
- Is it well known? If so, would someone please refer me to a paper
or posting which explains it?
I don't know. I'm not even sure if some clever encoding couldn't
express it,
Thanks for the further explanation, Marcin. If I understand
correctly, you're talking about explicitly named algebraic types, not
just unions where the type is an anonymous reflection of the structure
as in:
Var (foo :: Int, bar :: Char)
-- in the style of A Polymorphic Type System for
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