License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | Stable |
Portability | Excellent |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- data CryptoError
- data CryptoFailable a
- throwCryptoErrorIO :: CryptoFailable a -> IO a
- throwCryptoError :: CryptoFailable a -> a
- onCryptoFailure :: (CryptoError -> r) -> (a -> r) -> CryptoFailable a -> r
- eitherCryptoError :: CryptoFailable a -> Either CryptoError a
- maybeCryptoError :: CryptoFailable a -> Maybe a
Documentation
data CryptoError Source
Enumeration of all possible errors that can be found in this library
data CryptoFailable a Source
A simple Either like type to represent a computation that can fail
2 possibles values are:
CryptoPassed
: The computation succeeded, and contains the result of the computationCryptoFailed
: The computation failed, and contains the cryptographic error associated
Monad CryptoFailable | |
Functor CryptoFailable | |
Applicative CryptoFailable | |
Eq a => Eq (CryptoFailable a) | |
Show a => Show (CryptoFailable a) |
throwCryptoErrorIO :: CryptoFailable a -> IO a Source
Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed value
throwCryptoError :: CryptoFailable a -> a Source
Same as throwCryptoErrorIO
but throw the error asynchronously.
onCryptoFailure :: (CryptoError -> r) -> (a -> r) -> CryptoFailable a -> r Source
Simple either
like combinator for CryptoFailable type
eitherCryptoError :: CryptoFailable a -> Either CryptoError a Source
Transform a CryptoFailable to an Either
maybeCryptoError :: CryptoFailable a -> Maybe a Source
Transform a CryptoFailable to a Maybe