cardano-ledger-core-1.21.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.Huddle.Gen

Synopsis

MonadGen

CBORGen

Term generators

data Term Source #

A general CBOR term, which can be used to serialise or deserialise arbitrary CBOR terms for interoperability or debugging. This type is essentially a direct reflection of the CBOR abstract syntax tree as a Haskell data type.

The Term type also comes with a Serialise instance, so you can easily use decode :: Decoder Term to directly decode any arbitrary CBOR value into Haskell with ease, and likewise with encode.

Since: cborg-0.2.0.0

Instances

Instances details
EncCBOR Term 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORTermEncoding Source #

Read Term 
Instance details

Defined in Codec.CBOR.Term

Show Term 
Instance details

Defined in Codec.CBOR.Term

Methods

showsPrecIntTermShowS #

showTermString #

showList ∷ [Term] → ShowS #

Eq Term 
Instance details

Defined in Codec.CBOR.Term

Methods

(==)TermTermBool #

(/=)TermTermBool #

Ord Term 
Instance details

Defined in Codec.CBOR.Term

Methods

compareTermTermOrdering #

(<)TermTermBool #

(<=)TermTermBool #

(>)TermTermBool #

(>=)TermTermBool #

maxTermTermTerm #

minTermTermTerm #

data WrappedTerm Source #

Constructors

S Term

Single term

P Term Term

Pair term

G [WrappedTerm]

Group term

genRule ∷ ∀ (rule ∷ Symbol) era. HuddleRule rule era ⇒ CBORGen Term Source #

A function for generating a term from a rule. The HuddleRule constraint ensures that the rule is actually defined in that era.

genMapTermMonadGen m ⇒ [(Term, Term)] → m Term Source #

Lifted generators

arbitrary ∷ ∀ a m. (MonadGen m, Arbitrary a) ⇒ m a Source #

scaleMonadGen m ⇒ (IntInt) → m a → m a Source #

shuffleMonadGen m ⇒ [a] → m [a] Source #

Antigen