I don't know if it makes sense. You've written down some syntax, but it's not clear to me what you intend by it.
The instance decls remind me somewhat of the generalisation described towards the end of a paper Ralf Hinze and I wrote, "Generic type classes". There we describe why instance decls of the form instance (forall a. Eq a => Eq (f a)) => Eq (Rose f a) where.. might be useful. Simon | -----Original Message----- | From: Ashley Yakeley [mailto:[EMAIL PROTECTED]] | Sent: 16 February 2002 10:48 | To: Haskell List | Subject: foralls in class assertions | | | It would be nice to be able to put foralls in class assertions. For | instance: | | class HasIdentity a where | { | identity :: a; | }; | | class Composable a b ab | a b -> ab where | { | compose :: a -> b -> ab; | }; | | class | ( | forall a. HasIdentity (m a a), | forall a b c. Composable (m b c) (m a b) (m a c) | ) => | Category m; | | instance | ( | forall a. HasIdentity (m a a), | forall a b c. Composable (m b c) (m a b) (m a c) | ) => | Category m; | | Or even allow the foralls their own context: | | foo :: (forall a. (C a b) => D a c) => T b c; | | Does this make sense? Would it have unpleasant consequences? | | | -- | Ashley Yakeley, Seattle WA | | _______________________________________________ | Haskell mailing list | [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell | _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell