cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Constrained.SpecClass

Description

Code which defines a class that encapsulates what it means to be a Spec Eventually this will repace the most of the tests in Spec.hs

Documentation

class Arbitrary t ⇒ HasRep t where Source #

Methods

hasRepRep era t Source #

Instances

Instances details
HasRep Word64 Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Methods

hasRepRep era Word64 Source #

HasRep Coin Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Methods

hasRepRep era Coin Source #

HasRep DeltaCoin Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Methods

hasRepRep era DeltaCoin Source #

HasRep Int Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Methods

hasRepRep era Int Source #

class (Monoid spec, LiftT spec) ⇒ Specification spec t | spec → t where Source #

Associated Types

type Count spec ∷ Type Source #

type Generators spec ∷ Type Source #

type Reps spec ∷ Type Source #

type Lenses spec ∷ Type Source #

Methods

runS ∷ t → spec → Bool Source #

genS ∷ [String] → Count spec → Generators spec → Reps spec → Lenses spec → Gen spec Source #

sizeForS ∷ spec → Size Source #

genFromS ∷ [String] → IntGenerators spec → spec → Gen t Source #

Instances

Instances details
Specification Size Int Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count Size Source #

type Generators Size Source #

type Reps Size Source #

type Lenses Size Source #

Methods

runSIntSizeBool Source #

genS ∷ [String] → Count SizeGenerators SizeReps SizeLenses SizeGen Size Source #

sizeForSSizeSize Source #

genFromS ∷ [String] → IntGenerators SizeSizeGen Int Source #

(Era era, HasRep a, Adds a) ⇒ Specification (ElemSpec era a) [a] Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (ElemSpec era a) Source #

type Generators (ElemSpec era a) Source #

type Reps (ElemSpec era a) Source #

type Lenses (ElemSpec era a) Source #

Methods

runS ∷ [a] → ElemSpec era a → Bool Source #

genS ∷ [String] → Count (ElemSpec era a) → Generators (ElemSpec era a) → Reps (ElemSpec era a) → Lenses (ElemSpec era a) → Gen (ElemSpec era a) Source #

sizeForSElemSpec era a → Size Source #

genFromS ∷ [String] → IntGenerators (ElemSpec era a) → ElemSpec era a → Gen [a] Source #

(Era era, HasRep a, Adds a) ⇒ Specification (ListSpec era a) [a] Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (ListSpec era a) Source #

type Generators (ListSpec era a) Source #

type Reps (ListSpec era a) Source #

type Lenses (ListSpec era a) Source #

Methods

runS ∷ [a] → ListSpec era a → Bool Source #

genS ∷ [String] → Count (ListSpec era a) → Generators (ListSpec era a) → Reps (ListSpec era a) → Lenses (ListSpec era a) → Gen (ListSpec era a) Source #

sizeForSListSpec era a → Size Source #

genFromS ∷ [String] → IntGenerators (ListSpec era a) → ListSpec era a → Gen [a] Source #

(Era era, Ord dom, HasRep dom) ⇒ Specification (RelSpec era dom) (Set dom) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (RelSpec era dom) Source #

type Generators (RelSpec era dom) Source #

type Reps (RelSpec era dom) Source #

type Lenses (RelSpec era dom) Source #

Methods

runSSet dom → RelSpec era dom → Bool Source #

genS ∷ [String] → Count (RelSpec era dom) → Generators (RelSpec era dom) → Reps (RelSpec era dom) → Lenses (RelSpec era dom) → Gen (RelSpec era dom) Source #

sizeForSRelSpec era dom → Size Source #

genFromS ∷ [String] → IntGenerators (RelSpec era dom) → RelSpec era dom → Gen (Set dom) Source #

(Era era, Adds rng, Ord rng) ⇒ Specification (RngSpec era rng) [rng] Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (RngSpec era rng) Source #

type Generators (RngSpec era rng) Source #

type Reps (RngSpec era rng) Source #

type Lenses (RngSpec era rng) Source #

Methods

runS ∷ [rng] → RngSpec era rng → Bool Source #

genS ∷ [String] → Count (RngSpec era rng) → Generators (RngSpec era rng) → Reps (RngSpec era rng) → Lenses (RngSpec era rng) → Gen (RngSpec era rng) Source #

sizeForSRngSpec era rng → Size Source #

genFromS ∷ [String] → IntGenerators (RngSpec era rng) → RngSpec era rng → Gen [rng] Source #

(Era era, Ord a, HasRep a) ⇒ Specification (SetSpec era a) (Set a) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (SetSpec era a) Source #

type Generators (SetSpec era a) Source #

type Reps (SetSpec era a) Source #

type Lenses (SetSpec era a) Source #

Methods

runSSet a → SetSpec era a → Bool Source #

genS ∷ [String] → Count (SetSpec era a) → Generators (SetSpec era a) → Reps (SetSpec era a) → Lenses (SetSpec era a) → Gen (SetSpec era a) Source #

sizeForSSetSpec era a → Size Source #

genFromS ∷ [String] → IntGenerators (SetSpec era a) → SetSpec era a → Gen (Set a) Source #

(Era era, Ord dom, Ord rng, Adds rng) ⇒ Specification (MapSpec era dom rng) (Map dom rng) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (MapSpec era dom rng) Source #

type Generators (MapSpec era dom rng) Source #

type Reps (MapSpec era dom rng) Source #

type Lenses (MapSpec era dom rng) Source #

Methods

runSMap dom rng → MapSpec era dom rng → Bool Source #

genS ∷ [String] → Count (MapSpec era dom rng) → Generators (MapSpec era dom rng) → Reps (MapSpec era dom rng) → Lenses (MapSpec era dom rng) → Gen (MapSpec era dom rng) Source #

sizeForSMapSpec era dom rng → Size Source #

genFromS ∷ [String] → IntGenerators (MapSpec era dom rng) → MapSpec era dom rng → Gen (Map dom rng) Source #

(Era era, Ord dom, Eq rng, HasRep dom, HasRep rng) ⇒ Specification (PairSpec era dom rng) (Map dom rng) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.SpecClass

Associated Types

type Count (PairSpec era dom rng) Source #

type Generators (PairSpec era dom rng) Source #

type Reps (PairSpec era dom rng) Source #

type Lenses (PairSpec era dom rng) Source #

Methods

runSMap dom rng → PairSpec era dom rng → Bool Source #

genS ∷ [String] → Count (PairSpec era dom rng) → Generators (PairSpec era dom rng) → Reps (PairSpec era dom rng) → Lenses (PairSpec era dom rng) → Gen (PairSpec era dom rng) Source #

sizeForSPairSpec era dom rng → Size Source #

genFromS ∷ [String] → IntGenerators (PairSpec era dom rng) → PairSpec era dom rng → Gen (Map dom rng) Source #

testSound ∷ ∀ spec t. Specification spec t ⇒ Lenses spec → Reps spec → Count spec → Generators spec → Gen Bool Source #

mainIO () Source #