
26 Jun
2005
26 Jun
'05
6:40 p.m.
Lennart Augustsson
There are, of course, type systems where my program works fine. O'Haskell is an example of a language with such a type system. In O'Haskell the Either type is defined like this:
data Left a = Left a data Right a = Right a data Either a b > Left a, Right b
which means that Either is really a union of the Left and Right types. Now my program type checks. :)
foo :: Either a b -> Either () b foo (Left _) = Left () foo x@(Right _) = x
And it has type checked in various type systems for quite a while, but not in System F. But System F is not the end all of type systems.
OK. I happily yield. Jon Cast