cardano-ledger-core-1.16.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Core.Binary.RoundTrip

Synopsis

Documentation

class UnliftRules era (EraRules era) ⇒ RuleListEra era Source #

Associated Types

type EraRules era ∷ [Symbol] Source #

data EraRuleProof era (rs ∷ [Symbol]) where Source #

Constructors

EraRuleProofEmptyEraRuleProof era '[] 
EraRuleProofHead ∷ (Show (EraRuleFailure r era), Eq (EraRuleFailure r era), EncCBOR (EraRuleFailure r era), DecCBOR (EraRuleFailure r era), Arbitrary (EraRuleFailure r era), EraRuleFailure r era ~ PredicateFailure (EraRule r era)) ⇒ Proxy r → EraRuleProof era xs → EraRuleProof era (r ': xs) 

Spec

roundTripEraSpec ∷ ∀ era t. (Era era, Show t, Eq t, EncCBOR t, DecCBOR t, Arbitrary t, HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripEraExpectation

roundTripAnnEraSpec ∷ ∀ era t. (Era era, Show t, Eq t, ToCBOR t, DecCBOR (Annotator t), Arbitrary t, HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripAnnEraExpectation

roundTripEraTypeSpec ∷ ∀ era t. (Era era, Show (t era), Eq (t era), EncCBOR (t era), DecCBOR (t era), Arbitrary (t era), HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripEraTypeExpectation

roundTripAnnEraTypeSpec ∷ ∀ era t. (Era era, Show (t era), Eq (t era), ToCBOR (t era), DecCBOR (Annotator (t era)), Arbitrary (t era), HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripAnnEraTypeExpectation

roundTripShareEraSpec ∷ ∀ era t. (Era era, Show t, Eq t, EncCBOR t, DecShareCBOR t, Arbitrary t, HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripShareEraExpectation

roundTripShareEraTypeSpec ∷ ∀ era t. (Era era, Show (t era), Eq (t era), EncCBOR (t era), DecShareCBOR (t era), Arbitrary (t era), HasCallStack) ⇒ Spec Source #

QuickCheck property spec that uses roundTripShareEraTypeExpectation

Expectation

roundTripEraExpectation ∷ ∀ era t. (Era era, Show t, Eq t, EncCBOR t, DecCBOR t, HasCallStack) ⇒ t → Expectation Source #

Roundtrip CBOR testing for types and type families that implement EncCBOR/DecCBOR. Requires TypeApplication of an @era

roundTripEraTypeExpectation ∷ ∀ era t. (Era era, Show (t era), Eq (t era), EncCBOR (t era), DecCBOR (t era), HasCallStack) ⇒ t era → Expectation Source #

Roundtrip CBOR testing for types that implement EncCBOR/DecCBOR. Unlike roundTripEraExpectation, this function can't be used with type families, but the types of this function are unambiguous.

roundTripAnnEraExpectation ∷ ∀ era t. (Era era, Show t, Eq t, ToCBOR t, DecCBOR (Annotator t), HasCallStack) ⇒ t → Expectation Source #

Similar to roundTripEraExpectation, but for Annotator decoders. Note the constraint ToCBOR vs EncCBOR, this is due to the requirement for memoized types to be already fully encoded.

roundTripAnnEraTypeExpectation ∷ ∀ era t. (Era era, Show (t era), Eq (t era), ToCBOR (t era), DecCBOR (Annotator (t era)), HasCallStack) ⇒ t era → Expectation Source #

Same as roundTripAnnEraExpectation, but is not suitable for type families.

roundTripShareEraExpectation ∷ ∀ era t. (Era era, Show t, Eq t, EncCBOR t, DecShareCBOR t, HasCallStack) ⇒ t → Expectation Source #

Roundtrip CBOR testing for types and type families that implement EncCBOR/DecShareCBOR. Requires TypeApplication of an @era

roundTripShareEraTypeExpectation ∷ ∀ era t. (Era era, Show (t era), Eq (t era), EncCBOR (t era), DecShareCBOR (t era), HasCallStack) ⇒ t era → Expectation Source #

Roundtrip CBOR testing for types that implement EncCBOR/DecShareCBOR. Unlike roundTripShareEraExpectation, this function can't be used with type families, but the types of this function are unambiguous.

roundTripCoreEraTypesSpec ∷ ∀ era. (EraTx era, Arbitrary (Tx era), Arbitrary (TxBody era), Arbitrary (TxOut era), Arbitrary (TxCert era), Arbitrary (TxWits era), Arbitrary (TxAuxData era), Arbitrary (Value era), Arbitrary (CompactForm (Value era)), Arbitrary (Script era), Arbitrary (PParams era), Arbitrary (PParamsUpdate era), HasCallStack) ⇒ Spec Source #

CBOR RoundTrip spec for all the core types and type families that are parametrized on era.