Alex, would it be a solution if you defined > data RetVal b a = Result a | Exception b in this case you could say > instance Monad (RetVal b) where > return = Result > Result x >>= f = f x > Exception x >>= f = Exception x Hope that helps -Peter
- How to do Exceptions in Haskell (I think) S. Alexander Jacobson
- Re: How to do Exceptions in Haskell (I think) Peter Thiemann
- Re: How to do Exceptions in Haskell (I think) Ralf Hinze
