cardano-crypto-tests-2.2.0.0: Tests for cardano-crypto-class and -praos
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Crypto.EqST

Synopsis

Documentation

class EqST a where Source #

Monadic flavor of Eq, for things that can only be compared in a monadic context that satisfies MonadST. This is needed because we cannot have a sound Eq instance on mlocked memory types, but we do need to compare them for equality in tests.

Methods

equalsMMonadST m ⇒ a → a → m Bool Source #

Instances

Instances details
EqST (SignKeyDSIGNM Ed25519DSIGN) Source # 
Instance details

Defined in Test.Crypto.EqST

EqST (SignKeyDSIGNM d) ⇒ EqST (SignKeyKES (CompactSingleKES d)) Source # 
Instance details

Defined in Test.Crypto.KES

(EqST (SignKeyKES d), Eq (VerKeyKES d), KnownNat (SeedSizeKES d)) ⇒ EqST (SignKeyKES (CompactSumKES h d)) Source # 
Instance details

Defined in Test.Crypto.KES

EqST (SignKeyKES (MockKES t)) Source # 
Instance details

Defined in Test.Crypto.KES

Methods

equalsMMonadST m ⇒ SignKeyKES (MockKES t) → SignKeyKES (MockKES t) → m Bool Source #

EqST (SignKeyDSIGNM d) ⇒ EqST (SignKeyKES (SimpleKES d t)) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ SignKeyKES (SimpleKES d t) → SignKeyKES (SimpleKES d t) → m Bool Source #

EqST (SignKeyDSIGNM d) ⇒ EqST (SignKeyKES (SingleKES d)) Source # 
Instance details

Defined in Test.Crypto.KES

Methods

equalsMMonadST m ⇒ SignKeyKES (SingleKES d) → SignKeyKES (SingleKES d) → m Bool Source #

(EqST (SignKeyKES d), Eq (VerKeyKES d), KnownNat (SeedSizeKES d)) ⇒ EqST (SignKeyKES (SumKES h d)) Source # 
Instance details

Defined in Test.Crypto.KES

Methods

equalsMMonadST m ⇒ SignKeyKES (SumKES h d) → SignKeyKES (SumKES h d) → m Bool Source #

KnownNat n ⇒ EqST (MLockedSizedBytes n) Source # 
Instance details

Defined in Test.Crypto.EqST

KnownNat n ⇒ EqST (MLockedSeed n) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ MLockedSeed n → MLockedSeed n → m Bool Source #

Eq a ⇒ EqST (PureEqST a) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ PureEqST a → PureEqST a → m Bool Source #

EqST a ⇒ EqST (Maybe a) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ Maybe a → Maybe a → m Bool Source #

(EqST a, EqST b) ⇒ EqST (Either a b) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ Either a b → Either a b → m Bool Source #

(EqST a, EqST b) ⇒ EqST (a, b) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ (a, b) → (a, b) → m Bool Source #

(EqST a, EqST b, EqST c) ⇒ EqST (a, b, c) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ (a, b, c) → (a, b, c) → m Bool Source #

(EqST a, EqST b, EqST c, EqST d) ⇒ EqST (a, b, c, d) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ (a, b, c, d) → (a, b, c, d) → m Bool Source #

nequalsM ∷ (MonadST m, EqST a) ⇒ a → a → m Bool Source #

(==!) ∷ (MonadST m, EqST a) ⇒ a → a → m Bool infix 4 Source #

Infix version of equalsM

(!=!) ∷ (MonadST m, EqST a) ⇒ a → a → m Bool infix 4 Source #

Infix version of nequalsM

newtype PureEqST a Source #

Helper newtype, useful for defining EqST 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 => EqST m Int

Constructors

PureEqST a 

Instances

Instances details
Eq a ⇒ EqST (PureEqST a) Source # 
Instance details

Defined in Test.Crypto.EqST

Methods

equalsMMonadST m ⇒ PureEqST a → PureEqST a → m Bool Source #