[Haskell-cafe] Still stacking monad transformers

Reid Barton rwbarton at math.harvard.edu
Sun Oct 12 14:59:06 EDT 2008


On Sun, Oct 12, 2008 at 06:08:22PM +0100, Andrew Coppin wrote:
> Now I'm trying to run two computations, starting from _the same state_,  
> and combine the two resulting lists. The trouble is, I am literally  
> losing the will to live trying to comprehend the whinings of the type  
> checker. The operation I'm trying to perform is perfectly simple; I  
> don't understand why this has to be so damned *difficult*! >_<

It's not difficult: the operation is called

mplus :: MyMonad a -> MyMonad a -> MyMonad a

and already exists (assuming the author of ListT has not forgotten to
write a MonadPlus instance).

Regards,
Reid Barton


More information about the Haskell-Cafe mailing list