
6 Feb
2008
6 Feb
'08
6:20 p.m.
G'day all.
On Feb 6, 2008 12:45 PM, Felipe Lessa
I guess your parser is a monad transformer, so *maybe* the solution is to require MonadError from the inner monad.
Quoting Bas van Dijk
Indeed my parser 'P t m a' is a monad transformer. I will try out requiring 'm' to have a 'MonadError' constraint and see how far I come with that.
I've occasionally found this useful: class (Monad m) => MonadNegate m where mtrue :: m () mfalse :: m () mnot :: m a -> m () mtrue = return () mfalse = fail "False" Cheers, Andrew Bromage