Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Throwing and catching exceptions. Internal QuickCheck module.
- type AnException = SomeException
- tryEvaluate :: a -> IO (Either AnException a)
- tryEvaluateIO :: IO a -> IO (Either AnException a)
- isInterrupt :: AnException -> Bool
- discard :: a
- isDiscard :: AnException -> Bool
- finally :: IO a -> IO b -> IO a
Documentation
type AnException = SomeException Source
tryEvaluate :: a -> IO (Either AnException a) Source
tryEvaluateIO :: IO a -> IO (Either AnException a) Source
isInterrupt :: AnException -> Bool Source
Test if an exception was a ^C
.
QuickCheck won't try to shrink an interrupted test case.
A special exception that makes QuickCheck discard the test case.
Normally you should use ==>
, but if for some reason this isn't
possible (e.g. you are deep inside a generator), use discard
instead.
isDiscard :: AnException -> Bool Source