[Haskell-beginners] How to create a monad instance

Marco De Oliveira deolivem at gmail.com
Fri Dec 11 19:17:38 EST 2009


Hi,

Is it possible to create an instance of Monad for IOException?
Each time a try I stay blocked by IO monad.

with the definition:

data IOException a = IOExceptionCons (IO (Exception a))

data Exception a = SuccessCons (Maybe Warning) a
                          | ErrorCons Error

data Warning = WarningCons1
                    | WarningCons2

data Error = ErrorCons1
                | ErrorCons2

Regards


More information about the Beginners mailing list