| Copyright | (c) Andrey Mulik 2019 |
|---|---|
| License | BSD-style |
| Maintainer | work.a.mulik@gmail.com |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Control.Exception.SDP
Contents
Description
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.
ErrorCallandAssertionFailedmeans that the function is partially defined or missused (if some arguments shouldn't be passed).UnreachableExceptionmeans 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).
Constructors
| UnreachableException String |
Instances
| Eq UnreachableException Source # | |
Defined in Control.Exception.SDP Methods (==) :: UnreachableException -> UnreachableException -> Bool # (/=) :: UnreachableException -> UnreachableException -> Bool # | |
| Show UnreachableException Source # | |
Defined in Control.Exception.SDP Methods showsPrec :: Int -> UnreachableException -> ShowS # show :: UnreachableException -> String # showList :: [UnreachableException] -> ShowS # | |
| Exception UnreachableException Source # | |
Defined in Control.Exception.SDP Methods toException :: UnreachableException -> SomeException # fromException :: SomeException -> Maybe UnreachableException # | |
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.
Constructors
| UnacceptableExpansion String | |
| UndefinedValue String | |
| UnexpectedRank String | |
| IndexUnderflow String | |
| IndexOverflow String | |
| EmptyRange String |
Instances
| Eq IndexException Source # | |
Defined in Control.Exception.SDP Methods (==) :: IndexException -> IndexException -> Bool # (/=) :: IndexException -> IndexException -> Bool # | |
| Show IndexException Source # | |
Defined in Control.Exception.SDP Methods showsPrec :: Int -> IndexException -> ShowS # show :: IndexException -> String # showList :: [IndexException] -> ShowS # | |
| Exception IndexException Source # | |
Defined in Control.Exception.SDP Methods toException :: IndexException -> SomeException # | |