Henning Thielemann | 22 Mar 17:31 2013

Making monads from transformed monads

In a library I want to give a base monad and allow the user to choose a 
monad transformer. However, the Monad.Trans.Class from transformers is 
not strong enough, because it cannot warrant that a transformed monad is 
a monads itself.

I have appended a module that implements a class with methods 'point' 
and 'bind' that correspond to 'return' and '>>='. A backward-compatible 
solution would be to add the class as subclass of current 
Monad.Trans.Class. This is how I implemented my proof-of-concept. A 
cleaner solution for the long run would be to add the methods 'point' 
and 'bind' directly to the current Monad.Trans.Class.

Is there any interest in that extension or modification?
Attachment (MonadTrans.hs): text/x-haskell, 1343 bytes
Libraries mailing list
Libraries <at> haskell.org