Hi -Following indications in http://www.haskell.org/pipermail/haskell/2006-February/017547.html I've wrapped all the functions in Control.Exception so that they can be used with any monad constructed using the common state transformers and based (ultimately) on IO.
I'd suggest something like this could be incorporated into Haskell' perhaps as a replacement for Control.Exception.
This also relates to http://hackage.haskell.org/trac/haskell-prime/ticket/110 but I don't know how to attach a file to a ticket therefore I've just enclosed it with this email.
(In the discussion following Oleg's original post my experience implementing the generalised exception functions showed that getUnliftIO :: m(m a -> IO a) mentioned in a later post proved to be a red herring since StateT can't support this operation yet it *can* support all the exception ops in a sensible way.)
So far, I've only tested catch, catchJust, throwM using a (StateT s IO) monad, so I can't be absolutely sure that I've got the semantics for the other monads correct, but at least they all compile.... :-)
Regards, Brian.
Exception.hs
Description: Binary data
_______________________________________________ Haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell
