Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Cardano.Ledger.Generic.Same
Contents
Description
A Proof parameterized equality test, that records the sameness
of
individual record fields, this way it is possible to know where the
equality failed.
Synopsis
- extendLabel ∷ String → [(String, Maybe x)] → [(String, Maybe x)]
- notEq ∷ Doc a → Doc a → Doc a
- eqByShow ∷ (Eq t, Show t) ⇒ t → t → Maybe PDoc
- eqVia ∷ Eq t ⇒ (t → PDoc) → t → t → Maybe PDoc
- class Same era t where
- sameUTxO ∷ Proof era → UTxO era → UTxO era → Maybe PDoc
- samePPUP ∷ Proof era → ShelleyGovState era → ShelleyGovState era → Maybe PDoc
- sameStashedAVVMAddresses ∷ Proof era → StashedAVVMAddresses era → StashedAVVMAddresses era → Maybe PDoc
- data SomeDepend where
- sameWithDependency ∷ [SomeDepend] → [(String, Maybe PDoc)]
- samePParams ∷ Proof era → PParams era → PParams era → Maybe PDoc
- samePParamsUpdate ∷ Proof era → PParamsUpdate era → PParamsUpdate era → Maybe PDoc
- sameTxOut ∷ Proof era → TxOut era → TxOut era → Maybe PDoc
- sameLedgerFail ∷ Proof era → ApplyTxError era → ApplyTxError era → Maybe PDoc
- sameTransCtx ∷ Proof era → TranslationContext era → TranslationContext era → Maybe PDoc
- sameCertState ∷ ∀ era. Reflect era ⇒ CertState era → CertState era → Maybe PDoc
- sameShelleyTxWits ∷ ∀ era. Reflect era ⇒ Proof era → ShelleyTxWits era → ShelleyTxWits era → [(String, Maybe PDoc)]
- sameAlonzoTxWits ∷ ∀ era. (Reflect era, AlonzoEraScript era) ⇒ Proof era → AlonzoTxWits era → AlonzoTxWits era → [(String, Maybe PDoc)]
- sameTxWits ∷ Proof era → TxWits era → TxWits era → [(String, Maybe PDoc)]
- sameShelleyTxBody ∷ Proof ShelleyEra → TxBody ShelleyEra → TxBody ShelleyEra → [(String, Maybe PDoc)]
- sameAllegraTxBody ∷ Proof AllegraEra → TxBody AllegraEra → TxBody AllegraEra → [(String, Maybe PDoc)]
- sameMaryTxBody ∷ Proof MaryEra → TxBody MaryEra → TxBody MaryEra → [(String, Maybe PDoc)]
- sameAlonzoTxBody ∷ Proof AlonzoEra → TxBody AlonzoEra → TxBody AlonzoEra → [(String, Maybe PDoc)]
- sameBabbageTxBody ∷ Proof BabbageEra → TxBody BabbageEra → TxBody BabbageEra → [(String, Maybe PDoc)]
- sameConwayTxBody ∷ Proof ConwayEra → TxBody ConwayEra → TxBody ConwayEra → [(String, Maybe PDoc)]
- sameTxBody ∷ Proof era → TxBody era → TxBody era → [(String, Maybe PDoc)]
- sameShelleyTx ∷ (Reflect era, TxWits era ~ ShelleyTxWits era) ⇒ Proof era → ShelleyTx era → ShelleyTx era → [(String, Maybe PDoc)]
- sameAlonzoTx ∷ (Reflect era, AlonzoEraScript era, TxWits era ~ AlonzoTxWits era) ⇒ Proof era → AlonzoTx era → AlonzoTx era → [(String, Maybe PDoc)]
- sameTx ∷ Proof era → Tx era → Tx era → [(String, Maybe PDoc)]
- ints ∷ [Int]
- sameShelleyTxSeq ∷ (Reflect era, Tx era ~ ShelleyTx era, SafeToHash (TxWits era)) ⇒ Proof era → ShelleyTxSeq era → ShelleyTxSeq era → [(String, Maybe PDoc)]
- sameAlonzoTxSeq ∷ (AlonzoEraTx era, SafeToHash (TxWits era)) ⇒ Proof era → AlonzoTxSeq era → AlonzoTxSeq era → [(String, Maybe PDoc)]
- sameTxSeq ∷ Proof era → TxSeq era → TxSeq era → [(String, Maybe PDoc)]
Documentation
extendLabel ∷ String → [(String, Maybe x)] → [(String, Maybe x)] Source #
Relabel by appending s
to the front of the path
eqByShow ∷ (Eq t, Show t) ⇒ t → t → Maybe PDoc Source #
Compare for equality, and display difference using show
eqVia ∷ Eq t ⇒ (t → PDoc) → t → t → Maybe PDoc Source #
Compare for equality, and display differences using pcf
class Same era t where Source #
The Same class is similar to Eq but returns descriptions (paths and non-matching components) for each difference in a large structure.
Instances
samePPUP ∷ Proof era → ShelleyGovState era → ShelleyGovState era → Maybe PDoc Source #
sameStashedAVVMAddresses ∷ Proof era → StashedAVVMAddresses era → StashedAVVMAddresses era → Maybe PDoc Source #
data SomeDepend where Source #
sameWithDependency ∷ [SomeDepend] → [(String, Maybe PDoc)] Source #
If x occurs in y then a difference in x forces a difference in y, so only return the information on x if it has differences.
samePParamsUpdate ∷ Proof era → PParamsUpdate era → PParamsUpdate era → Maybe PDoc Source #
sameLedgerFail ∷ Proof era → ApplyTxError era → ApplyTxError era → Maybe PDoc Source #
sameTransCtx ∷ Proof era → TranslationContext era → TranslationContext era → Maybe PDoc Source #
sameShelleyTxWits ∷ ∀ era. Reflect era ⇒ Proof era → ShelleyTxWits era → ShelleyTxWits era → [(String, Maybe PDoc)] Source #
sameAlonzoTxWits ∷ ∀ era. (Reflect era, AlonzoEraScript era) ⇒ Proof era → AlonzoTxWits era → AlonzoTxWits era → [(String, Maybe PDoc)] Source #
sameShelleyTxBody ∷ Proof ShelleyEra → TxBody ShelleyEra → TxBody ShelleyEra → [(String, Maybe PDoc)] Source #
sameAllegraTxBody ∷ Proof AllegraEra → TxBody AllegraEra → TxBody AllegraEra → [(String, Maybe PDoc)] Source #
sameAlonzoTxBody ∷ Proof AlonzoEra → TxBody AlonzoEra → TxBody AlonzoEra → [(String, Maybe PDoc)] Source #
sameBabbageTxBody ∷ Proof BabbageEra → TxBody BabbageEra → TxBody BabbageEra → [(String, Maybe PDoc)] Source #
sameConwayTxBody ∷ Proof ConwayEra → TxBody ConwayEra → TxBody ConwayEra → [(String, Maybe PDoc)] Source #
sameShelleyTx ∷ (Reflect era, TxWits era ~ ShelleyTxWits era) ⇒ Proof era → ShelleyTx era → ShelleyTx era → [(String, Maybe PDoc)] Source #
sameAlonzoTx ∷ (Reflect era, AlonzoEraScript era, TxWits era ~ AlonzoTxWits era) ⇒ Proof era → AlonzoTx era → AlonzoTx era → [(String, Maybe PDoc)] Source #
sameShelleyTxSeq ∷ (Reflect era, Tx era ~ ShelleyTx era, SafeToHash (TxWits era)) ⇒ Proof era → ShelleyTxSeq era → ShelleyTxSeq era → [(String, Maybe PDoc)] Source #
sameAlonzoTxSeq ∷ (AlonzoEraTx era, SafeToHash (TxWits era)) ⇒ Proof era → AlonzoTxSeq era → AlonzoTxSeq era → [(String, Maybe PDoc)] Source #
Orphan instances
Terse (PParamsUpdate AllegraEra) Source # | |
Methods | |
Terse (PParamsUpdate AlonzoEra) Source # | |
Terse (PParamsUpdate BabbageEra) Source # | |
Methods | |
Terse (PParamsUpdate ConwayEra) Source # | |
Terse (PParamsUpdate MaryEra) Source # | |
Terse (PParamsUpdate ShelleyEra) Source # | |
Methods | |
Terse (KeyHash 'Genesis) Source # | |