
22 Mar
2013
22 Mar
'13
12:31 p.m.
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?