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

Cardano.Ledger.BaseTypes

Synopsis

Documentation

newtype EpochInterval Source #

Constructors

EpochInterval 

Instances

Instances details
FromJSON EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

DecCBOR EpochInterval 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochInterval 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

ToPlutusData EpochInterval Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ EpochInterval → () #

Generic EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochInterval = D1 ('MetaData "EpochInterval" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))
Show EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochInterval = D1 ('MetaData "EpochInterval" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

newtype EpochSize Source #

Constructors

EpochSize 

Fields

Instances

Instances details
FromJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ EpochSize → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochSize → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochSize] → Size Source #

DecCBOR EpochSize 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochSize 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ EpochSize → () #

Enum EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Methods

from ∷ EpochSize → Rep EpochSize x #

to ∷ Rep EpochSize x → EpochSize #

Show EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → EpochSize → ShowS #

show ∷ EpochSize → String #

showList ∷ [EpochSize] → ShowS #

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ EpochSize → EpochSize → Bool #

(/=) ∷ EpochSize → EpochSize → Bool #

Ord EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype EpochNo Source #

An epoch, i.e. the number of the epoch.

Constructors

EpochNo 

Fields

Instances

Instances details
FromJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ EpochNo → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochNo → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochNo] → Size Source #

DecCBOR EpochNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ EpochNo → () #

Enum EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Methods

from ∷ EpochNo → Rep EpochNo x #

to ∷ Rep EpochNo x → EpochNo #

Show EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → EpochNo → ShowS #

show ∷ EpochNo → String #

showList ∷ [EpochNo] → ShowS #

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ EpochNo → EpochNo → Bool #

(/=) ∷ EpochNo → EpochNo → Bool #

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ EpochNo → EpochNo → Ordering #

(<) ∷ EpochNo → EpochNo → Bool #

(<=) ∷ EpochNo → EpochNo → Bool #

(>) ∷ EpochNo → EpochNo → Bool #

(>=) ∷ EpochNo → EpochNo → Bool #

max ∷ EpochNo → EpochNo → EpochNo #

min ∷ EpochNo → EpochNo → EpochNo #

NoThunks EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Serialise EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data WithOrigin t Source #

Constructors

Origin 
At !t 

Instances

Instances details
Functor WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fmap ∷ (a → b) → WithOrigin a → WithOrigin b #

(<$) ∷ a → WithOrigin b → WithOrigin a #

Foldable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fold ∷ Monoid m ⇒ WithOrigin m → m #

foldMap ∷ Monoid m ⇒ (a → m) → WithOrigin a → m #

foldMap' ∷ Monoid m ⇒ (a → m) → WithOrigin a → m #

foldr ∷ (a → b → b) → b → WithOrigin a → b #

foldr' ∷ (a → b → b) → b → WithOrigin a → b #

foldl ∷ (b → a → b) → b → WithOrigin a → b #

foldl' ∷ (b → a → b) → b → WithOrigin a → b #

foldr1 ∷ (a → a → a) → WithOrigin a → a #

foldl1 ∷ (a → a → a) → WithOrigin a → a #

toList ∷ WithOrigin a → [a] #

null ∷ WithOrigin a → Bool #

length ∷ WithOrigin a → Int #

elem ∷ Eq a ⇒ a → WithOrigin a → Bool #

maximum ∷ Ord a ⇒ WithOrigin a → a #

minimum ∷ Ord a ⇒ WithOrigin a → a #

sum ∷ Num a ⇒ WithOrigin a → a #

product ∷ Num a ⇒ WithOrigin a → a #

Traversable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

traverse ∷ Applicative f ⇒ (a → f b) → WithOrigin a → f (WithOrigin b) #

sequenceA ∷ Applicative f ⇒ WithOrigin (f a) → f (WithOrigin a) #

mapM ∷ Monad m ⇒ (a → m b) → WithOrigin a → m (WithOrigin b) #

sequence ∷ Monad m ⇒ WithOrigin (m a) → m (WithOrigin a) #

FromJSON a ⇒ FromJSON (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON a ⇒ ToJSON (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

(Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

(Serialise t, Typeable t) ⇒ ToCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ WithOrigin t → Encoding Source #

encodedSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy (WithOrigin t) → Size Source #

encodedListSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy [WithOrigin t] → Size Source #

(Serialise t, Typeable t) ⇒ DecCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

Serialise t ⇒ EncCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData a ⇒ NFData (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ WithOrigin a → () #

Bounded t ⇒ Bounded (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Generic (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) = D1 ('MetaData "WithOrigin" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t)))

Methods

from ∷ WithOrigin t → Rep (WithOrigin t) x #

to ∷ Rep (WithOrigin t) x → WithOrigin t #

Show t ⇒ Show (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → WithOrigin t → ShowS #

show ∷ WithOrigin t → String #

showList ∷ [WithOrigin t] → ShowS #

Eq t ⇒ Eq (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ WithOrigin t → WithOrigin t → Bool #

(/=) ∷ WithOrigin t → WithOrigin t → Bool #

Ord t ⇒ Ord (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ WithOrigin t → WithOrigin t → Ordering #

(<) ∷ WithOrigin t → WithOrigin t → Bool #

(<=) ∷ WithOrigin t → WithOrigin t → Bool #

(>) ∷ WithOrigin t → WithOrigin t → Bool #

(>=) ∷ WithOrigin t → WithOrigin t → Bool #

max ∷ WithOrigin t → WithOrigin t → WithOrigin t #

min ∷ WithOrigin t → WithOrigin t → WithOrigin t #

NoThunks t ⇒ NoThunks (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Serialise t ⇒ Serialise (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) = D1 ('MetaData "WithOrigin" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t)))

newtype SlotNo Source #

The 0-based index for the Ouroboros time slot.

Constructors

SlotNo 

Fields

Instances

Instances details
FromJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ SlotNo → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotNo → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SlotNo] → Size Source #

DecCBOR SlotNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR SlotNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ SlotNo → Encoding Source #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ SlotNo → () #

Bounded SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Methods

from ∷ SlotNo → Rep SlotNo x #

to ∷ Rep SlotNo x → SlotNo #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(+) ∷ SlotNo → SlotNo → SlotNo #

(-) ∷ SlotNo → SlotNo → SlotNo #

(*) ∷ SlotNo → SlotNo → SlotNo #

negate ∷ SlotNo → SlotNo #

abs ∷ SlotNo → SlotNo #

signum ∷ SlotNo → SlotNo #

fromInteger ∷ Integer → SlotNo #

Show SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → SlotNo → ShowS #

show ∷ SlotNo → String #

showList ∷ [SlotNo] → ShowS #

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ SlotNo → SlotNo → Bool #

(/=) ∷ SlotNo → SlotNo → Bool #

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ SlotNo → SlotNo → Ordering #

(<) ∷ SlotNo → SlotNo → Bool #

(<=) ∷ SlotNo → SlotNo → Bool #

(>) ∷ SlotNo → SlotNo → Bool #

(>=) ∷ SlotNo → SlotNo → Bool #

max ∷ SlotNo → SlotNo → SlotNo #

min ∷ SlotNo → SlotNo → SlotNo #

NoThunks SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Serialise SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.2.0-de51ccd7f9d033c6a902b200af6065f8682d7b529d54d5834d432bcd23351d49" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

binOpEpochNo ∷ (Word64 → Word64 → Word64) → EpochNo → EpochNo → EpochNo Source #

Convenience function for doing binary operations on two EpochNos

addEpochInterval ∷ EpochNo → EpochInterval → EpochNo Source #

Add a EpochInterval (a positive change) to an EpochNo to get a new EpochNo

data ProtVer Source #

Constructors

ProtVer 

Fields

Instances

Instances details
FromJSON ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBOR ∷ ProtVer → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtVer → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ProtVer] → Size Source #

DecCBOR ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBORGroup ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBORGroup ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToPlutusData ProtVer Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ ProtVer → () #

Generic ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)))

Methods

from ∷ ProtVer → Rep ProtVer x #

to ∷ Rep ProtVer x → ProtVer #

Show ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → ProtVer → ShowS #

show ∷ ProtVer → String #

showList ∷ [ProtVer] → ShowS #

Eq ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ ProtVer → ProtVer → Bool #

(/=) ∷ ProtVer → ProtVer → Bool #

Ord ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ ProtVer → ProtVer → Ordering #

(<) ∷ ProtVer → ProtVer → Bool #

(<=) ∷ ProtVer → ProtVer → Bool #

(>) ∷ ProtVer → ProtVer → Bool #

(>=) ∷ ProtVer → ProtVer → Bool #

max ∷ ProtVer → ProtVer → ProtVer #

min ∷ ProtVer → ProtVer → ProtVer #

NoThunks ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)))

decodeProtVer ∷ Era era ⇒ Decoder s ProtVer Source #

Decoder for ProtVer that only accepts versions where the major fits in the bounds of what's allowed for the provided Era.

Note - Thanks to the Ledger rules, only the current major protocol version and the very next major protocol version from the current one will be accepted by the Ledger anywhere in the block, regardless that this decoder allows a broader range.

type FixedPoint = Digits34 Source #

(==>) ∷ Bool → Bool → Bool infix 1 Source #

(⭒) ∷ Nonce → Nonce → Nonce Source #

Evolve the nonce

data Network Source #

Constructors

Testnet 
Mainnet 

Instances

Instances details
FromJSON Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBOR ∷ Network → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy Network → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Network] → Size Source #

DecCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Default Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

def ∷ Network Source #

NFData Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Network → () #

Bounded Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Network 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Network = D1 ('MetaData "Network" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Testnet" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Mainnet" 'PrefixI 'False) (U1 ∷ Type → Type))

Methods

from ∷ Network → Rep Network x #

to ∷ Rep Network x → Network #

Show Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Network → ShowS #

show ∷ Network → String #

showList ∷ [Network] → ShowS #

Eq Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Network → Network → Bool #

(/=) ∷ Network → Network → Bool #

Ord Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Network → Network → Ordering #

(<) ∷ Network → Network → Bool #

(<=) ∷ Network → Network → Bool #

(>) ∷ Network → Network → Bool #

(>=) ∷ Network → Network → Bool #

max ∷ Network → Network → Network #

min ∷ Network → Network → Network #

NoThunks Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Network = D1 ('MetaData "Network" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Testnet" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Mainnet" 'PrefixI 'False) (U1 ∷ Type → Type))

data Nonce Source #

Evolving nonce type.

Constructors

Nonce !(Hash Blake2b_256 Nonce) 
NeutralNonce

Identity element

Instances

Instances details
FromJSON Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Nonce → Encoding Source #

ToPlutusData Nonce Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Nonce → () #

Generic Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 ∷ Type → Type))

Methods

from ∷ Nonce → Rep Nonce x #

to ∷ Rep Nonce x → Nonce #

Show Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Nonce → ShowS #

show ∷ Nonce → String #

showList ∷ [Nonce] → ShowS #

Eq Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Nonce → Nonce → Bool #

(/=) ∷ Nonce → Nonce → Bool #

Ord Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Nonce → Nonce → Ordering #

(<) ∷ Nonce → Nonce → Bool #

(<=) ∷ Nonce → Nonce → Bool #

(>) ∷ Nonce → Nonce → Bool #

(>=) ∷ Nonce → Nonce → Bool #

max ∷ Nonce → Nonce → Nonce #

min ∷ Nonce → Nonce → Nonce #

NoThunks Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 ∷ Type → Type))

newtype Seed Source #

Seed to the verifiable random function.

Constructors

Seed (Hash Blake2b_256 Seed) 

Instances

Instances details
SignableRepresentation Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Seed → Encoding Source #

Generic Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Seed 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Seed = D1 ('MetaData "Seed" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Seed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash Blake2b_256 Seed))))

Methods

from ∷ Seed → Rep Seed x #

to ∷ Rep Seed x → Seed #

Show Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Seed → ShowS #

show ∷ Seed → String #

showList ∷ [Seed] → ShowS #

Eq Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Seed → Seed → Bool #

(/=) ∷ Seed → Seed → Bool #

Ord Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Seed → Seed → Ordering #

(<) ∷ Seed → Seed → Bool #

(<=) ∷ Seed → Seed → Bool #

(>) ∷ Seed → Seed → Bool #

(>=) ∷ Seed → Seed → Bool #

max ∷ Seed → Seed → Seed #

min ∷ Seed → Seed → Seed #

NoThunks Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Seed = D1 ('MetaData "Seed" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Seed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash Blake2b_256 Seed))))

data UnitInterval Source #

Type to represent a value in the unit interval [0; 1]

Instances

Instances details
FromJSON UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToPlutusData UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

Default UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ UnitInterval → () #

Bounded UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep UnitInterval 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

data PositiveUnitInterval Source #

Type to represent a value in the unit interval (0; 1]

Instances

Instances details
FromJSON PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ PositiveUnitInterval → () #

Bounded PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep PositiveUnitInterval 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

data PositiveInterval Source #

Type to represent a value in the interval (0; +∞)

Instances

Instances details
FromJSON PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToPlutusData PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ PositiveInterval → () #

Bounded PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep PositiveInterval 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

data NonNegativeInterval Source #

Type to represent a value in the interval [0; +∞)

Instances

Instances details
FromJSON NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToPlutusData NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ NonNegativeInterval → () #

Bounded NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep NonNegativeInterval 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

newtype Inclusive a Source #

Constructors

Inclusive 

Fields

Instances

Instances details
FromJSON a ⇒ FromJSON (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON a ⇒ ToJSON (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR a ⇒ DecCBOR (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR a ⇒ EncCBOR (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Inclusive a → Encoding Source #

NFData a ⇒ NFData (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Inclusive a → () #

Generic a ⇒ Generic (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (Inclusive a) 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Inclusive a) = Rep a

Methods

from ∷ Inclusive a → Rep (Inclusive a) x #

to ∷ Rep (Inclusive a) x → Inclusive a #

Show a ⇒ Show (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Inclusive a → ShowS #

show ∷ Inclusive a → String #

showList ∷ [Inclusive a] → ShowS #

Eq a ⇒ Eq (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Inclusive a → Inclusive a → Bool #

(/=) ∷ Inclusive a → Inclusive a → Bool #

Ord a ⇒ Ord (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Inclusive a → Inclusive a → Ordering #

(<) ∷ Inclusive a → Inclusive a → Bool #

(<=) ∷ Inclusive a → Inclusive a → Bool #

(>) ∷ Inclusive a → Inclusive a → Bool #

(>=) ∷ Inclusive a → Inclusive a → Bool #

max ∷ Inclusive a → Inclusive a → Inclusive a #

min ∷ Inclusive a → Inclusive a → Inclusive a #

NoThunks a ⇒ NoThunks (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Inclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Inclusive a) = Rep a

newtype Exclusive a Source #

Constructors

Exclusive 

Fields

Instances

Instances details
FromJSON a ⇒ FromJSON (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON a ⇒ ToJSON (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR a ⇒ DecCBOR (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR a ⇒ EncCBOR (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Exclusive a → Encoding Source #

NFData a ⇒ NFData (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Exclusive a → () #

Generic a ⇒ Generic (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (Exclusive a) 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Exclusive a) = Rep a

Methods

from ∷ Exclusive a → Rep (Exclusive a) x #

to ∷ Rep (Exclusive a) x → Exclusive a #

Show a ⇒ Show (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Exclusive a → ShowS #

show ∷ Exclusive a → String #

showList ∷ [Exclusive a] → ShowS #

Eq a ⇒ Eq (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Exclusive a → Exclusive a → Bool #

(/=) ∷ Exclusive a → Exclusive a → Bool #

Ord a ⇒ Ord (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Exclusive a → Exclusive a → Ordering #

(<) ∷ Exclusive a → Exclusive a → Bool #

(<=) ∷ Exclusive a → Exclusive a → Bool #

(>) ∷ Exclusive a → Exclusive a → Bool #

(>=) ∷ Exclusive a → Exclusive a → Bool #

max ∷ Exclusive a → Exclusive a → Exclusive a #

min ∷ Exclusive a → Exclusive a → Exclusive a #

NoThunks a ⇒ NoThunks (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Exclusive a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Exclusive a) = Rep a

class Bounded r ⇒ BoundedRational r where Source #

Type clases that allows conversion between Rational and some form of bounded rational type. Bounds can be restricted by both the Bounded type class and underlyng representation.

maybe True (\br -> minBound <= br && br <= maxBound) . boundRational

Roundtrip properties must hold:

\r -> maybe True ((r ==) . unboundRational) (boundRational r)
\br -> Just br == boundRational (unboundRational br)

Methods

boundRational ∷ Rational → Maybe r Source #

Returns Nothing when supplied value is not within bounds or when precision is too high to be represented by the underlying type

Example

Expand
>>> :set -XTypeApplications
>>> import Data.Ratio
>>> boundRational @UnitInterval $ 2 % 3
Just (2 % 3)
>>> boundRational @UnitInterval (-0.5)
Nothing
>>> boundRational @UnitInterval (1.5)
Nothing
>>> boundRational @UnitInterval 0
Just (0 % 1)
>>> boundRational @PositiveUnitInterval 0
Nothing

unboundRational ∷ r → Rational Source #

Promote bounded rational type into the unbounded Rational.

invalidKey ∷ (Typeable a, MonadFail m) ⇒ Word → m a Source #

Report an error when a numeric key of the type constructor doesn't match.

mkNonceFromOutputVRF ∷ OutputVRF v → Nonce Source #

Make a nonce from the VRF output bytes

mkNonceFromNumber ∷ Word64 → Nonce Source #

Make a nonce from a number.

data Url Source #

Instances

Instances details
FromJSON Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Url → Encoding Source #

NFData Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Url → () #

Generic Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Url 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Url = D1 ('MetaData "Url" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Url" 'PrefixI 'True) (S1 ('MetaSel ('Just "urlToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Methods

from ∷ Url → Rep Url x #

to ∷ Rep Url x → Url #

Show Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Url → ShowS #

show ∷ Url → String #

showList ∷ [Url] → ShowS #

Eq Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Url → Url → Bool #

(/=) ∷ Url → Url → Bool #

Ord Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Url → Url → Ordering #

(<) ∷ Url → Url → Bool #

(<=) ∷ Url → Url → Bool #

(>) ∷ Url → Url → Bool #

(>=) ∷ Url → Url → Bool #

max ∷ Url → Url → Url #

min ∷ Url → Url → Url #

NoThunks Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Url = D1 ('MetaData "Url" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Url" 'PrefixI 'True) (S1 ('MetaSel ('Just "urlToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

textToUrl ∷ MonadFail m ⇒ Int → Text → m Url Source #

Turn a Text into a Url, fail if the Text has more than n Bytes

data DnsName Source #

Instances

Instances details
FromJSON DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ DnsName → () #

Generic DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep DnsName 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep DnsName = D1 ('MetaData "DnsName" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "DnsName" 'PrefixI 'True) (S1 ('MetaSel ('Just "dnsToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Methods

from ∷ DnsName → Rep DnsName x #

to ∷ Rep DnsName x → DnsName #

Show DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → DnsName → ShowS #

show ∷ DnsName → String #

showList ∷ [DnsName] → ShowS #

Eq DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ DnsName → DnsName → Bool #

(/=) ∷ DnsName → DnsName → Bool #

Ord DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ DnsName → DnsName → Ordering #

(<) ∷ DnsName → DnsName → Bool #

(<=) ∷ DnsName → DnsName → Bool #

(>) ∷ DnsName → DnsName → Bool #

(>=) ∷ DnsName → DnsName → Bool #

max ∷ DnsName → DnsName → DnsName #

min ∷ DnsName → DnsName → DnsName #

NoThunks DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep DnsName = D1 ('MetaData "DnsName" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "DnsName" 'PrefixI 'True) (S1 ('MetaSel ('Just "dnsToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

textToDns ∷ MonadFail m ⇒ Int → Text → m DnsName Source #

Turn a Text into a DnsName, fail if the Text has more than n Bytes

newtype Port Source #

Constructors

Port 

Fields

Instances

Instances details
FromJSON Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Port → Encoding Source #

NFData Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Port → () #

Generic Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Port 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Port = D1 ('MetaData "Port" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "portToWord16") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

Methods

from ∷ Port → Rep Port x #

to ∷ Rep Port x → Port #

Num Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(+) ∷ Port → Port → Port #

(-) ∷ Port → Port → Port #

(*) ∷ Port → Port → Port #

negate ∷ Port → Port #

abs ∷ Port → Port #

signum ∷ Port → Port #

fromInteger ∷ Integer → Port #

Show Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Port → ShowS #

show ∷ Port → String #

showList ∷ [Port] → ShowS #

Eq Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Port → Port → Bool #

(/=) ∷ Port → Port → Bool #

Ord Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Port → Port → Ordering #

(<) ∷ Port → Port → Bool #

(<=) ∷ Port → Port → Bool #

(>) ∷ Port → Port → Bool #

(>=) ∷ Port → Port → Bool #

max ∷ Port → Port → Port #

min ∷ Port → Port → Port #

NoThunks Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Port = D1 ('MetaData "Port" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "portToWord16") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

newtype Milliseconds32 Source #

A non-negative duration in milliseconds using 32 bits, yielding a maxBound of ~49.7 days.

Constructors

Milliseconds32 

Instances

Instances details
FromJSON Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToPlutusData Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.Plutus.ToPlutusData

NFData Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Milliseconds32 → () #

Bounded Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Milliseconds32 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Milliseconds32 = D1 ('MetaData "Milliseconds32" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Milliseconds32" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMilliseconds32") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))
Num Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Milliseconds32 Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Milliseconds32 = D1 ('MetaData "Milliseconds32" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "Milliseconds32" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMilliseconds32") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

data ActiveSlotCoeff Source #

Instances

Instances details
FromCBOR ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ ActiveSlotCoeff → () #

Generic ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ActiveSlotCoeff 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ActiveSlotCoeff = D1 ('MetaData "ActiveSlotCoeff" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "ActiveSlotCoeff" 'PrefixI 'True) (S1 ('MetaSel ('Just "unActiveSlotVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval) :*: S1 ('MetaSel ('Just "unActiveSlotLog") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)))
Show ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ActiveSlotCoeff = D1 ('MetaData "ActiveSlotCoeff" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "ActiveSlotCoeff" 'PrefixI 'True) (S1 ('MetaSel ('Just "unActiveSlotVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval) :*: S1 ('MetaSel ('Just "unActiveSlotLog") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)))

newtype BlocksMade Source #

Number of blocks which have been created by stake pools in the current epoch.

Constructors

BlocksMade 

Instances

Instances details
FromJSON BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Default BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

def ∷ BlocksMade Source #

NFData BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ BlocksMade → () #

Generic BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep BlocksMade 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep BlocksMade = D1 ('MetaData "BlocksMade" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "BlocksMade" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlocksMade") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'StakePool) Natural))))
Show BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ BlocksMade → BlocksMade → Bool #

(/=) ∷ BlocksMade → BlocksMade → Bool #

NoThunks BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep BlocksMade = D1 ('MetaData "BlocksMade" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "BlocksMade" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlocksMade") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'StakePool) Natural))))

Indices

newtype TxIx Source #

Transaction index.

Constructors

TxIx 

Fields

Instances

Instances details
ToJSON TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ TxIx → Encoding Source #

NFData TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ TxIx → () #

Bounded TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

minBound ∷ TxIx #

maxBound ∷ TxIx #

Enum TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

succ ∷ TxIx → TxIx #

pred ∷ TxIx → TxIx #

toEnum ∷ Int → TxIx #

fromEnum ∷ TxIx → Int #

enumFrom ∷ TxIx → [TxIx] #

enumFromThen ∷ TxIx → TxIx → [TxIx] #

enumFromTo ∷ TxIx → TxIx → [TxIx] #

enumFromThenTo ∷ TxIx → TxIx → TxIx → [TxIx] #

Generic TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep TxIx 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep TxIx = D1 ('MetaData "TxIx" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "TxIx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

Methods

from ∷ TxIx → Rep TxIx x #

to ∷ Rep TxIx x → TxIx #

Show TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → TxIx → ShowS #

show ∷ TxIx → String #

showList ∷ [TxIx] → ShowS #

Eq TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ TxIx → TxIx → Bool #

(/=) ∷ TxIx → TxIx → Bool #

Ord TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ TxIx → TxIx → Ordering #

(<) ∷ TxIx → TxIx → Bool #

(<=) ∷ TxIx → TxIx → Bool #

(>) ∷ TxIx → TxIx → Bool #

(>=) ∷ TxIx → TxIx → Bool #

max ∷ TxIx → TxIx → TxIx #

min ∷ TxIx → TxIx → TxIx #

MemPack TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Random TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

randomR ∷ RandomGen g ⇒ (TxIx, TxIx) → g → (TxIx, g) Source #

random ∷ RandomGen g ⇒ g → (TxIx, g) Source #

randomRs ∷ RandomGen g ⇒ (TxIx, TxIx) → g → [TxIx] Source #

randoms ∷ RandomGen g ⇒ g → [TxIx] Source #

Uniform TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

uniformM ∷ StatefulGen g m ⇒ g → m TxIx Source #

UniformRange TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

uniformRM ∷ StatefulGen g m ⇒ (TxIx, TxIx) → g → m TxIx Source #

isInRange ∷ (TxIx, TxIx) → TxIx → Bool Source #

type Rep TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep TxIx = D1 ('MetaData "TxIx" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'True) (C1 ('MetaCons "TxIx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

mkTxIxPartial ∷ HasCallStack ⇒ Integer → TxIx Source #

Construct a TxIx from an arbitrary precision Integer. Throws an error for values out of range. Make sure to use it only for testing.

newtype CertIx Source #

Certificate index. There is mkCertIxPartial that can be used for testing when constructing from other integral types that are larger than Word16

Constructors

CertIx 

Fields

Instances

Instances details
ToJSON CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ CertIx → Encoding Source #

NFData CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ CertIx → () #

Bounded CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Show CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → CertIx → ShowS #

show ∷ CertIx → String #

showList ∷ [CertIx] → ShowS #

Eq CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ CertIx → CertIx → Bool #

(/=) ∷ CertIx → CertIx → Bool #

Ord CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ CertIx → CertIx → Ordering #

(<) ∷ CertIx → CertIx → Bool #

(<=) ∷ CertIx → CertIx → Bool #

(>) ∷ CertIx → CertIx → Bool #

(>=) ∷ CertIx → CertIx → Bool #

max ∷ CertIx → CertIx → CertIx #

min ∷ CertIx → CertIx → CertIx #

NoThunks CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Random CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

randomR ∷ RandomGen g ⇒ (CertIx, CertIx) → g → (CertIx, g) Source #

random ∷ RandomGen g ⇒ g → (CertIx, g) Source #

randomRs ∷ RandomGen g ⇒ (CertIx, CertIx) → g → [CertIx] Source #

randoms ∷ RandomGen g ⇒ g → [CertIx] Source #

Uniform CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

uniformM ∷ StatefulGen g m ⇒ g → m CertIx Source #

UniformRange CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

uniformRM ∷ StatefulGen g m ⇒ (CertIx, CertIx) → g → m CertIx Source #

isInRange ∷ (CertIx, CertIx) → CertIx → Bool Source #

mkCertIxPartial ∷ HasCallStack ⇒ Integer → CertIx Source #

Construct a CertIx from an arbitrary precision Integer. Throws an error for values out of range. Make sure to use it only for testing.

data Anchor Source #

Constructors

Anchor 

Instances

Instances details
FromJSON Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Anchor → Encoding Source #

ToKeyValuePairs Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ Anchor → [kv] Source #

Default Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

def ∷ Anchor Source #

NFData Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Anchor → () #

Generic Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Anchor 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Anchor = D1 ('MetaData "Anchor" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Anchor" 'PrefixI 'True) (S1 ('MetaSel ('Just "anchorUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Url) :*: S1 ('MetaSel ('Just "anchorDataHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SafeHash AnchorData))))

Methods

from ∷ Anchor → Rep Anchor x #

to ∷ Rep Anchor x → Anchor #

Show Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Anchor → ShowS #

show ∷ Anchor → String #

showList ∷ [Anchor] → ShowS #

Eq Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Anchor → Anchor → Bool #

(/=) ∷ Anchor → Anchor → Bool #

Ord Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Anchor → Anchor → Ordering #

(<) ∷ Anchor → Anchor → Bool #

(<=) ∷ Anchor → Anchor → Bool #

(>) ∷ Anchor → Anchor → Bool #

(>=) ∷ Anchor → Anchor → Bool #

max ∷ Anchor → Anchor → Anchor #

min ∷ Anchor → Anchor → Anchor #

NoThunks Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Anchor = D1 ('MetaData "Anchor" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Anchor" 'PrefixI 'True) (S1 ('MetaSel ('Just "anchorUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Url) :*: S1 ('MetaSel ('Just "anchorDataHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SafeHash AnchorData))))

STS Base

data Globals Source #

Constructors

Globals 

Fields

Instances

Instances details
NFData Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Globals → () #

Generic Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Globals 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

from ∷ Globals → Rep Globals x #

to ∷ Rep Globals x → Globals #

Show Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Globals → ShowS #

show ∷ Globals → String #

showList ∷ [Globals] → ShowS #

NoThunks Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

epochInfoPure ∷ Globals → EpochInfo Identity Source #

Pure epoch info via throw. Note that this should only be used when we can guarantee the validity of the translation; in particular, the EpochInfo used here should never be applied to user-supplied input.

data Relation Source #

Relationship descriptor for the expectation in the Mismatch type.

Constructors

RelEQ

Equal

RelLT

Less then

RelGT

Greater then

RelLTEQ

Less then or equal

RelGTEQ

Greater then or equal

RelSubset

Is subset of

data Mismatch (r ∷ Relation) a Source #

This is intended to help clarify supplied and expected values reported by predicate-failures in all eras.

Constructors

Mismatch 

Fields

Instances

Instances details
FromJSON a ⇒ FromJSON (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON a ⇒ ToJSON (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

(DecCBOR a, Typeable r) ⇒ DecCBOR (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

decCBOR ∷ Decoder s (Mismatch r a) Source #

dropCBOR ∷ Proxy (Mismatch r a) → Decoder s () Source #

label ∷ Proxy (Mismatch r a) → Text Source #

EncCBOR a ⇒ EncCBOR (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBOR ∷ Mismatch r a → Encoding Source #

(Typeable r, DecCBOR a) ⇒ DecCBORGroup (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

decCBORGroup ∷ Decoder s (Mismatch r a) Source #

EncCBOR a ⇒ EncCBORGroup (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData a ⇒ NFData (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf ∷ Mismatch r a → () #

Generic (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (Mismatch r a) 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Mismatch r a) = D1 ('MetaData "Mismatch" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Mismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "mismatchSupplied") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "mismatchExpected") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

Methods

from ∷ Mismatch r a → Rep (Mismatch r a) x #

to ∷ Rep (Mismatch r a) x → Mismatch r a #

(Typeable r, Show a) ⇒ Show (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrec ∷ Int → Mismatch r a → ShowS #

show ∷ Mismatch r a → String #

showList ∷ [Mismatch r a] → ShowS #

Eq a ⇒ Eq (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==) ∷ Mismatch r a → Mismatch r a → Bool #

(/=) ∷ Mismatch r a → Mismatch r a → Bool #

Ord a ⇒ Ord (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compare ∷ Mismatch r a → Mismatch r a → Ordering #

(<) ∷ Mismatch r a → Mismatch r a → Bool #

(<=) ∷ Mismatch r a → Mismatch r a → Bool #

(>) ∷ Mismatch r a → Mismatch r a → Bool #

(>=) ∷ Mismatch r a → Mismatch r a → Bool #

max ∷ Mismatch r a → Mismatch r a → Mismatch r a #

min ∷ Mismatch r a → Mismatch r a → Mismatch r a #

NoThunks a ⇒ NoThunks (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Mismatch r a) = D1 ('MetaData "Mismatch" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.23.0.0-inplace" 'False) (C1 ('MetaCons "Mismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "mismatchSupplied") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "mismatchExpected") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

swapMismatch ∷ ∀ (r ∷ Relation) a. Mismatch r a → (a, a) Source #

Convert a Mismatch to a tuple that has "supplied" and "expected" swapped places

unswapMismatch ∷ ∀ a (r ∷ Relation). (a, a) → Mismatch r a Source #

Convert a tuple that has "supplied" and "expected" swapped places to a Mismatch type.

Injection

class Inject t s where Source #

Methods

inject ∷ t → s Source #

Instances

Instances details
Inject Coin DeltaCoin Source # 
Instance details

Defined in Cardano.Ledger.Coin

Methods

inject ∷ Coin → DeltaCoin Source #

Inject a a Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

inject ∷ a → a Source #

Aeson helpers

class ToKeyValuePairs a where Source #

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ a → [kv] Source #

Instances

Instances details
ToKeyValuePairs Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ Anchor → [kv] Source #

ToKeyValuePairs Ptr Source # 
Instance details

Defined in Cardano.Ledger.Credential

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ Ptr → [kv] Source #

ToKeyValuePairs Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ Reward → [kv] Source #

ToKeyValuePairs InstantaneousRewards Source # 
Instance details

Defined in Cardano.Ledger.State.CertState

ToKeyValuePairs ChainAccountState Source # 
Instance details

Defined in Cardano.Ledger.State.ChainAccount

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ ChainAccountState → [kv] Source #

ToKeyValuePairs IndividualPoolStake Source # 
Instance details

Defined in Cardano.Ledger.State.PoolDistr

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ IndividualPoolStake → [kv] Source #

ToKeyValuePairs GoSnapShot Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ GoSnapShot → [kv] Source #

ToKeyValuePairs MarkSnapShot Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ MarkSnapShot → [kv] Source #

ToKeyValuePairs SetSnapShot Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ SetSnapShot → [kv] Source #

ToKeyValuePairs SnapShot Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ SnapShot → [kv] Source #

ToKeyValuePairs StakePoolSnapShot Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ StakePoolSnapShot → [kv] Source #

EraPParams era ⇒ ToKeyValuePairs (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ PParams era → [kv] Source #

EraPParams era ⇒ ToKeyValuePairs (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ PParamsUpdate era → [kv] Source #

ToKeyValuePairs (NoGenesis era) Source # 
Instance details

Defined in Cardano.Ledger.Genesis

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ NoGenesis era → [kv] Source #

ToJSON (Accounts era) ⇒ ToKeyValuePairs (DState era) Source # 
Instance details

Defined in Cardano.Ledger.State.CertState

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ DState era → [kv] Source #

ToKeyValuePairs (PState era) Source # 
Instance details

Defined in Cardano.Ledger.State.CertState

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ PState era → [kv] Source #

ToKeyValuePairs (SnapShots era) Source # 
Instance details

Defined in Cardano.Ledger.State.SnapShots

Methods

toKeyValuePairs ∷ KeyValue e kv ⇒ SnapShots era → [kv] Source #

kindObjectValue ∷ Text → [Pair] → Value Source #

Helper function for a common pattern of creating objects