Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Control.Exception.SDP - service module that provide some useful exceptions. Note that SDP.SafePrelude doesn't export this module.
Exports
module Control.Exception
Exceptions
data UnreachableException Source #
A UnreachableException
is used as an exception that should never be thrown.
ErrorCall
andAssertionFailed
means that the function is partially defined or missused (if some arguments shouldn't be passed).UnreachableException
means that some expression, by definition, cannot be reached (for example, a default value when initializing an array, if each value is guaranteed to be overwritten before use).
Instances
Eq UnreachableException Source # | |
Defined in Control.Exception.SDP (==) :: UnreachableException -> UnreachableException -> Bool # (/=) :: UnreachableException -> UnreachableException -> Bool # | |
Show UnreachableException Source # | |
Defined in Control.Exception.SDP showsPrec :: Int -> UnreachableException -> ShowS # show :: UnreachableException -> String # showList :: [UnreachableException] -> ShowS # | |
Exception UnreachableException Source # | |
data IndexException Source #
IndexException
replaces the less informative ArrayException
and has more
neutral names.
UnacceptableExpansion
- occurs if the desired range exceed the actual sizeUnexpectedRank
- occurs when trying to convert a list into a generalized index of inappropriate dimensionUndefinedValue
- occurs if the value is undefinedEmptyRange
- occurs if range is emptyIndexOverflow
- occurs if index overflows rangeIndexUnderflow
- occurs if index underflows range
Exception
constructors are specified in the order of definition, this is the
recommended check order.
If the error type may depend on the check order, it should be indicated in the documentation. For example: overflow is checked first, and then underflow. But if an overflow is detected, underflow may not be noticed.
UnacceptableExpansion String | |
UndefinedValue String | |
UnexpectedRank String | |
IndexUnderflow String | |
IndexOverflow String | |
EmptyRange String |
Instances
Eq IndexException Source # | |
Defined in Control.Exception.SDP (==) :: IndexException -> IndexException -> Bool # (/=) :: IndexException -> IndexException -> Bool # | |
Show IndexException Source # | |
Defined in Control.Exception.SDP showsPrec :: Int -> IndexException -> ShowS # show :: IndexException -> String # showList :: [IndexException] -> ShowS # | |
Exception IndexException Source # | |
Defined in Control.Exception.SDP |