[Haskell-cafe] Inverting a Monad

Miguel Mitrofanov miguelimo38 at yandex.ru
Wed Feb 6 06:50:46 EST 2008


>> Such as Identity?
>>
>
> Well in:
>
> inv :: (Monad m, ...) => m a -> m ()
> inv m = ...
>
> I don't mind that there are more constraints on 'm' than just Monad

class Monad m => MonadInv m where inv :: m a -> m ()

With this constraint you certainly can have your "inv".


More information about the Haskell-Cafe mailing list