| If GHC had true existential typing, as opposed to just
| existential datatypes,
| you could reasonably code what I think you want like this:
|
| class A a where
| basicA :: Bool
| nextA :: a -> (EX a'. A a' => a')
| basicA = True
| nextA = id
Curiously enough, this thread intersects with the "higher-ranked
types" thread on the Haskell list. If I do implement the Odersky/Laufer
higher-ranked types inference mechanism, then I'll also allow
existentials
in arbitrary positions.
The elimination of "stupid" existential wrapper constructors
is discussed in a bit more detail in the paper Mark and I wrote
recently:
First class modules for Haskell
http://research.microsoft.com/~simonpj/papers/first-class-modules/index.
htm
Simon
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users