Brian Hulley wrote:
I've started work on a module to replace Control.Exception by
wrapping all the original Control.Exception functions in more general
monadic functions and using two type classes as follows:
class MonadIO m => MonadException m where
catch :: m a -> (Exception -> m a) -> m a
On Sunday 23 April 2006 02:19 pm, you wrote:
[snip some discussion]
> Perhaps something like:
>
> class MonadIO m => MonadIOE m where
> catch :: m a-> (Exception -> m a) -> m a
> throw
> catchDyn
> throwDyn
> -- etc
>
> instance MonadIOE m => StateT s m where ...
> instan
I've started work on a module to replace Control.Exception by wrapping all
the original Control.Exception functions in more general monadic functions
and using two type classes as follows:
class MonadIO m => MonadException m where
catch :: m a -> (Exception -> m a) -> m a
catchDyn :: Ty
Brian Hulley wrote:
instance MonadIOE m => StateT s m where ...
instance MonadIOE m => ReaderT r m where ...
instance MonadIOB m => ReaderT r m where ...
Ooops! ;-)
instance MonadIOE m => MonadIOE (StateT s m) where ...
instance MonadIOE m => MonadIOE (ReaderT r m) where ...
instance MonadIO
[EMAIL PROTECTED] wrote:
Robert Dockins wrote:
One additional (very unfortunate) point is that higher-order IO monad
combinators will not work on your monad, eg, the ones in
Control.Exception.
Although that is true in general, for many useful and interesting
cases (including ReaderT, the state
[EMAIL PROTECTED] wrote:
Robert Dockins wrote:
One additional (very unfortunate) point is that higher-order IO monad
combinators will not work on your monad, eg, the ones in
Control.Exception.
Although that is true in general, for many useful and interesting
cases (including ReaderT, the state