Control.Monad.Morph includes
class MFunctor t where hoist :: Monad m => (forall a. ma -> na) -> tmb -> tnb
As far as I can tell, none of the included instances uses the Monad m restriction. How can I do that? Are there any valid instances that use the restriction (it's a little difficult for me to imagine how, given that hoist id = id )? What is the value of the constraint m , not n ?
functor haskell monads typeclass
dfeuer
source share