Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > 2) allow to use type classes in type declarations like the types > itself. for example, allow the following: > > f :: Num a => a -> Int > write as > f :: Num -> Int > > and following: > > sequence :: Monad m => [m a] -> m [a] > write as > sequence :: [Monad a] -> Monad [a]
How would you distinguish the class contexts of (for instance) sequenceLift :: (Monad m, Monad r) => [m a] -> r [a] if it were to be written instead as simply sequenceLift :: [Monad a] -> Monad [a] And how would one add multiple class constraints to a single type variable, for instance in: f :: (Functor m, Monad m) => (a->b) -> m [a] -> m b ? Regards, Malcolm _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe