cryptonite-0.27: Cryptography Primitives sink
License BSD-style
Maintainer Vincent Hanquez <vincent@snarc.org>
Stability Stable
Portability Excellent
Safe Haskell None
Language Haskell2010

Crypto.Error

Description

Synopsis

Documentation

data CryptoError Source #

Enumeration of all possible errors that can be found in this library

Instances

Instances details
Enum CryptoError Source #
Instance details

Defined in Crypto.Error.Types

Eq CryptoError Source #
Instance details

Defined in Crypto.Error.Types

Data CryptoError Source #
Instance details

Defined in Crypto.Error.Types

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> CryptoError -> c CryptoError Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c CryptoError Source #

toConstr :: CryptoError -> Constr Source #

dataTypeOf :: CryptoError -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c CryptoError ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c CryptoError ) Source #

gmapT :: ( forall b. Data b => b -> b) -> CryptoError -> CryptoError Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> CryptoError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> CryptoError -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> CryptoError -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> CryptoError -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> CryptoError -> m CryptoError Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> CryptoError -> m CryptoError Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> CryptoError -> m CryptoError Source #

Show CryptoError Source #
Instance details

Defined in Crypto.Error.Types

Exception CryptoError Source #
Instance details

Defined in Crypto.Error.Types

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 computation
  • CryptoFailed : The computation failed, and contains the cryptographic error associated

Instances

Instances details
Monad CryptoFailable Source #
Instance details

Defined in Crypto.Error.Types

Functor CryptoFailable Source #
Instance details

Defined in Crypto.Error.Types

Applicative CryptoFailable Source #
Instance details

Defined in Crypto.Error.Types

MonadFailure CryptoFailable Source #
Instance details

Defined in Crypto.Error.Types

Eq a => Eq ( CryptoFailable a) Source #
Instance details

Defined in Crypto.Error.Types

Show a => Show ( CryptoFailable a) Source #
Instance details

Defined in Crypto.Error.Types

type Failure CryptoFailable Source #
Instance details

Defined in Crypto.Error.Types

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