Hi Ashley,
Hugs currently restricts the way constrained existential types
may be formed, for entirely internal, technical reasons. We're
currently looking over the implementation to see if it's
possible to lift the restriction without rewriting substantial
parts of the type checker.
-- Joha
Parameterising Class Constraints in Existential Types
|
|
| Is this valid (extended) Haskell?
|
| --
| class MyClass a b where
| foo :: a -> b -> Int
|
| data Special = forall b. (MyClass Int b)=> MkSpecial b
| data General a = forall b. (MyClass a b)=> MkGeneral b
| --
|
| Hugs compla
Is this valid (extended) Haskell?
--
class MyClass a b where
foo :: a -> b -> Int
data Special = forall b. (MyClass Int b)=> MkSpecial b
data General a = forall b. (MyClass a b)=> MkGeneral b
--
Hugs complains about the 'General' line but has no problem with the
'Special' line...
--