
6 Feb
2008
6 Feb
'08
9:21 a.m.
On Feb 6, 2008 12:51 PM, Bas van Dijk
I will try out requiring 'm' to have a 'MonadError' constraint and see how far I come with that.
I'm now trying to define 'inv' using 'catchError` but I can't get it to work. The following obviously doesn't work: import Control.Monad.Error inv :: MonadError e m => m a -> m () inv m = (m >> fail "") `catchError` \_ -> (return ()) Bas