An assertion that fails in the Maybe monad
Moduleerrors-2.3.0Haskell98
Control.Error.Safe
This module extends the safe library's functions with corresponding
versions compatible with Either and ExceptT, and also provides a few
Maybe-compatible functions missing from safe.
I suffix the Either-compatible functions with Err and prefix the
ExceptT-compatible functions with try.
Note that this library re-exports the Maybe compatible functions from
safe in the Control.Error module, so they are not provided here.
The 'Z'-suffixed functions generalize the Maybe functions to also work
with anything that implements MonadPlus, including:
Contents
Synopsis
- value assertMay
- value rightMay
- value tailErr
- value initErr
- value headErr
- value lastErr
- value minimumErr
- value maximumErr
- value foldr1Err
- value foldl1Err
- value foldl1Err'
- value atErr
- value readErr
- value assertErr
- value justErr
- value tryTail
- value tryInit
- value tryHead
- value tryLast
- value tryMinimum
- value tryMaximum
- value tryFoldr1
- value tryFoldl1
- value tryFoldl1'
- value tryAt
- value tryRead
- value tryAssert
- value tryJust
- value tryRight
- value tailZ
- value initZ
- value headZ
- value lastZ
- value minimumZ
- value maximumZ
- value foldr1Z
- value foldl1Z
- value foldl1Z'
- value atZ
- value readZ
- value assertZ
- value justZ
- value rightZ
- Packageerrors-2.3.0
- Exports43
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceSafe.hs
Maybe-compatible functions
A fromRight that fails in the Maybe monad
Either-compatible functions
A foldl1' that fails in the Either monad
An assertion that fails in the Either monad
A fromJust that fails in the Either monad
ExceptT-compatible functions
A foldl1' that fails in the ExceptT monad
An assertion that fails in the ExceptT monad
A fromJust that fails in the ExceptT monad
A fromRight that fails in the ExceptT monad
MonadPlus-compatible functions
A foldl1' that fails using mzero
An assertion that fails using mzero
A fromJust that fails using mzero
A fromRight that fails using mzero