Add exception related functionality.
parent
425617110d
commit
86cf1df6bd
|
@ -20,6 +20,7 @@ library
|
||||||
build-depends: base >= 4.7 && < 5,
|
build-depends: base >= 4.7 && < 5,
|
||||||
bytestring == 0.10.8.1,
|
bytestring == 0.10.8.1,
|
||||||
either == 4.4.1.1,
|
either == 4.4.1.1,
|
||||||
|
exceptions == 0.8.3,
|
||||||
free == 4.12.4,
|
free == 4.12.4,
|
||||||
mtl == 2.2.1,
|
mtl == 2.2.1,
|
||||||
text == 1.2.2.2,
|
text == 1.2.2.2,
|
||||||
|
|
|
@ -33,6 +33,22 @@ import Control.Monad as X
|
||||||
, guard
|
, guard
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import Control.Monad.Catch as X
|
||||||
|
( Exception
|
||||||
|
, Exception(displayException)
|
||||||
|
, Exception(fromException)
|
||||||
|
, Exception(toException)
|
||||||
|
, Handler, Handler(Handler)
|
||||||
|
, MonadCatch, catch
|
||||||
|
, MonadMask, mask, uninterruptibleMask
|
||||||
|
, MonadThrow, throwM
|
||||||
|
, SomeException, SomeException(SomeException)
|
||||||
|
, bracket
|
||||||
|
, finally
|
||||||
|
, handle
|
||||||
|
, try
|
||||||
|
)
|
||||||
|
|
||||||
import Control.Monad.Except as X
|
import Control.Monad.Except as X
|
||||||
-- Note runExceptT is not actually a type declaration within the ExceptT
|
-- Note runExceptT is not actually a type declaration within the ExceptT
|
||||||
-- newtype but writing as follows for consistency's sake.
|
-- newtype but writing as follows for consistency's sake.
|
||||||
|
|
Loading…
Reference in New Issue