cardano-crypto-class-2.1.1.0: Type classes abstracting over cryptography primitives for Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Crypto.MEqOrd

Synopsis

Documentation

class MEq m a where #

Monadic flavor of Eq, for things that can only be compared in a monadic context. This is needed because we cannot have a sound Eq instance on mlocked memory types.

Methods

equalsM :: a -> a -> m Bool #

Instances

Instances details
(MonadST m, MonadSodium m) => MEq m (SignKeyDSIGNM Ed25519DSIGNM) # 
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519ML

(Monad m, MEq m (SignKeyDSIGNM d)) => MEq m (SignKeyKES (SimpleKES d t)) # 
Instance details

Defined in Cardano.Crypto.KES.Simple

Methods

equalsM :: SignKeyKES (SimpleKES d t) -> SignKeyKES (SimpleKES d t) -> m Bool #

(MonadSodium m, MonadST m, KnownNat n) => MEq m (MLockedSizedBytes n) # 
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

(Applicative m, Eq a) => MEq m (PureMEq a) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: PureMEq a -> PureMEq a -> m Bool #

(MonadSodium m, MonadST m, KnownNat n) => MEq m (MLockedSeed n) # 
Instance details

Defined in Cardano.Crypto.MLockedSeed

Methods

equalsM :: MLockedSeed n -> MLockedSeed n -> m Bool #

(Applicative m, MEq m a) => MEq m (Maybe a) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: Maybe a -> Maybe a -> m Bool #

(Applicative m, MEq m a, MEq m b) => MEq m (Either a b) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: Either a b -> Either a b -> m Bool #

(Applicative m, MEq m a, MEq m b) => MEq m (a, b) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: (a, b) -> (a, b) -> m Bool #

(Applicative m, MEq m a, MEq m b, MEq m c) => MEq m (a, b, c) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: (a, b, c) -> (a, b, c) -> m Bool #

(Applicative m, MEq m a, MEq m b, MEq m c, MEq m d) => MEq m (a, b, c, d) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: (a, b, c, d) -> (a, b, c, d) -> m Bool #

nequalsM :: (Functor m, MEq m a) => a -> a -> m Bool #

(==!) :: MEq m a => a -> a -> m Bool infix 4 #

Infix version of equalsM

(!=!) :: (Functor m, MEq m a) => a -> a -> m Bool infix 4 #

Infix version of nequalsM

newtype PureMEq a #

Helper newtype, useful for defining MEq in terms of Eq for types that have sound Eq instances, using DerivingVia. An Applicative context must be provided for such instances to work, so this will generally require StandaloneDeriving as well.

Ex.: deriving via PureEq Int instance Applicative m => MEq m Int

Constructors

PureMEq a 

Instances

Instances details
(Applicative m, Eq a) => MEq m (PureMEq a) # 
Instance details

Defined in Cardano.Crypto.MEqOrd

Methods

equalsM :: PureMEq a -> PureMEq a -> m Bool #