patch applied (ghc): Introduce an 'ExceptionMonad' class.
Thomas Schilling
nominolo at googlemail.com
Mon Sep 15 06:08:49 EDT 2008
Sun Sep 14 10:21:54 PDT 2008 Thomas Schilling <nominolo at googlemail.com>
* Introduce an 'ExceptionMonad' class.
This monad provides variants of 'catch', 'bracket', and 'finally', so
exceptions can be handled in monads that wrap IO. The latter two
methods need to be part of the class definition, because GHC uses
'block' and 'unblock' which are used in the definition of those two
methods for the IO monad. A perhaps better class interface would
consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
default to 'id' like is done for non-GHC implementations of 'bracket'
and 'finally'.
M ./compiler/utils/Exception.hs +73
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080914172154-7c5c6-0005ffc797958c07d06689d90bffb3c2d7d749b4.gz
More information about the Cvs-ghc
mailing list