[Haskell-cafe] Adding Ord constraint to instance Monad Set?

S. Alexander Jacobson haskell at alexjacobson.com
Thu Apr 1 16:17:51 EST 2004

On Wed, 31 Mar 2004, Tomasz Zielonka wrote:
> You can try to define a different version of Monad using multiparameter
> type classes, something like:
>     class M m a b where
> 	(>>>=) :: m a -> (a -> m b) -> m b

I don't think this works.  GHC can't deduce
context for (>>>).  I don't understand why, but
I've tried a variety of permutations of
constraint declarations (m b needs to be a Monad
as well...).


S. Alexander Jacobson                  mailto:me at alexjacobson.com
tel:917-770-6565                       http://alexjacobson.com

More information about the Haskell-Cafe mailing list