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

Cardano.Ledger.BaseTypes

Synopsis

Documentation

addEpochIntervalEpochNoEpochIntervalEpochNo Source #

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

binOpEpochNo ∷ (Word64Word64Word64) → EpochNoEpochNoEpochNo Source #

Convenience function for doing binary operations on two EpochNos

newtype SlotNo Source #

The 0-based index for the Ourboros 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

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 SlotNoTypeType Source #

Methods

fromSlotNoRep SlotNo x Source #

toRep SlotNo x → SlotNo Source #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Show 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

toCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize 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

encCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize Source #

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

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfSlotNo → () Source #

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool Source #

(/=)SlotNoSlotNoBool Source #

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

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.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data WithOrigin t Source #

Constructors

Origin 
At !t 

Instances

Instances details
Foldable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

foldMonoid m ⇒ WithOrigin m → m Source #

foldMapMonoid m ⇒ (a → m) → WithOrigin a → m Source #

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

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

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

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

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

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

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

toListWithOrigin a → [a] Source #

nullWithOrigin a → Bool Source #

lengthWithOrigin a → Int Source #

elemEq a ⇒ a → WithOrigin a → Bool Source #

maximumOrd a ⇒ WithOrigin a → a Source #

minimumOrd a ⇒ WithOrigin a → a Source #

sumNum a ⇒ WithOrigin a → a Source #

productNum a ⇒ WithOrigin a → a Source #

Traversable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

traverseApplicative f ⇒ (a → f b) → WithOrigin a → f (WithOrigin b) Source #

sequenceAApplicative f ⇒ WithOrigin (f a) → f (WithOrigin a) Source #

mapMMonad m ⇒ (a → m b) → WithOrigin a → m (WithOrigin b) Source #

sequenceMonad m ⇒ WithOrigin (m a) → m (WithOrigin a) Source #

Functor WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

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

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

FromJSON a ⇒ FromJSON (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON a ⇒ ToJSON (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

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) ∷ TypeType Source #

Methods

fromWithOrigin t → Rep (WithOrigin t) x Source #

toRep (WithOrigin t) x → WithOrigin t Source #

Show t ⇒ Show (WithOrigin t) 
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

toCBORWithOrigin 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, Typeable t) ⇒ EncCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWithOrigin t → Encoding Source #

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

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

NFData a ⇒ NFData (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfWithOrigin a → () Source #

Eq t ⇒ Eq (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

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

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

Ord t ⇒ Ord (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

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.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t)))

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

Enum EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNoTypeType Source #

Methods

fromEpochNoRep EpochNo x Source #

toRep EpochNo x → EpochNo Source #

Show 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

toCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize 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

Methods

encCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize Source #

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

NFData EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochNo → () Source #

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool Source #

(/=)EpochNoEpochNoBool Source #

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

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.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

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

Enum EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSizeTypeType Source #

Show 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

toCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize 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

Methods

encCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize Source #

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

NFData EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochSize → () Source #

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

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.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

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

Generic EpochInterval 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochIntervalTypeType Source #

Show 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

rnfEpochInterval → () Source #

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.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'True) (C1 ('MetaCons "EpochInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

newtype BlockNo Source #

The 0-based index of the block in the blockchain. BlockNo is <= SlotNo and is only equal at slot N if there is a block for every slot where N <= SlotNo.

Constructors

BlockNo 

Fields

Instances

Instances details
FromJSON BlockNo 
Instance details

Defined in Cardano.Slotting.Block

ToJSON BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Bounded BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Associated Types

type Rep BlockNoTypeType Source #

Methods

fromBlockNoRep BlockNo x Source #

toRep BlockNo x → BlockNo Source #

Num BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo 
Instance details

Defined in Cardano.Slotting.Block

FromCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

ToCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

toCBORBlockNoEncoding Source #

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

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

DecCBOR BlockNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR BlockNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORBlockNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy BlockNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [BlockNo] → Size Source #

NFData BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

rnfBlockNo → () Source #

Eq BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==)BlockNoBlockNoBool Source #

(/=)BlockNoBlockNoBool Source #

Ord BlockNo 
Instance details

Defined in Cardano.Slotting.Block

NoThunks BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Serialise BlockNo 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.2.0.0-0946d62b78700d9878a93ee388d449762ab8456938621057b67928e156669e77" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

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

Generic ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ProtVerTypeType Source #

Methods

fromProtVerRep ProtVer x Source #

toRep ProtVer x → ProtVer Source #

Show 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

toCBORProtVerEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtVerSize 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

Methods

encCBORProtVerEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ProtVerSize Source #

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

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

rnfProtVer → () Source #

Eq ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)ProtVerProtVerBool Source #

(/=)ProtVerProtVerBool Source #

Ord ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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.16.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 Natural)))

type FixedPoint = Digits34 Source #

(==>)BoolBoolBool infix 1 Source #

(⭒)NonceNonceNonce 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

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 NetworkTypeType Source #

Methods

fromNetworkRep Network x Source #

toRep Network x → Network Source #

Show Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

DecCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORNetworkEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy NetworkSize Source #

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

Default Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

defNetwork Source #

NFData Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfNetwork → () Source #

Eq Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)NetworkNetworkBool Source #

(/=)NetworkNetworkBool Source #

Ord Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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.16.0.0-inplace" 'False) (C1 ('MetaCons "Testnet" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Mainnet" 'PrefixI 'False) (U1TypeType))

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

Generic Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep NonceTypeType Source #

Methods

fromNonceRep Nonce x Source #

toRep Nonce x → Nonce Source #

Show Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBORNonceEncoding Source #

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

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

DecCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORNonceEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy NonceSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Nonce] → Size Source #

NFData Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfNonce → () Source #

Eq Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)NonceNonceBool Source #

(/=)NonceNonceBool Source #

Ord Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareNonceNonceOrdering Source #

(<)NonceNonceBool Source #

(<=)NonceNonceBool Source #

(>)NonceNonceBool Source #

(>=)NonceNonceBool Source #

maxNonceNonceNonce Source #

minNonceNonceNonce Source #

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.16.0.0-inplace" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1TypeType))

newtype Seed Source #

Seed to the verifiable random function.

Constructors

Seed (Hash Blake2b_256 Seed) 

Instances

Instances details
Generic Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep SeedTypeType Source #

Methods

fromSeedRep Seed x Source #

toRep Seed x → Seed Source #

Show Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntSeedShowS Source #

showSeedString Source #

showList ∷ [Seed] → ShowS Source #

SignableRepresentation Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORSeedEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SeedSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Seed] → Size Source #

Eq Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)SeedSeedBool Source #

(/=)SeedSeedBool Source #

Ord Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareSeedSeedOrdering Source #

(<)SeedSeedBool Source #

(<=)SeedSeedBool Source #

(>)SeedSeedBool Source #

(>=)SeedSeedBool Source #

maxSeedSeedSeed Source #

minSeedSeedSeed Source #

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.16.0.0-inplace" 'True) (C1 ('MetaCons "Seed" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe 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

Bounded UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic UnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep UnitIntervalTypeType Source #

Show 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

rnfUnitInterval → () Source #

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

Bounded PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveUnitInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep PositiveUnitIntervalTypeType Source #

Show 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

rnfPositiveUnitInterval → () Source #

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

Bounded PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep PositiveIntervalTypeType Source #

Show 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

NFData PositiveInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfPositiveInterval → () Source #

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

Bounded NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic NonNegativeInterval Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep NonNegativeIntervalTypeType Source #

Show 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

rnfNonNegativeInterval → () Source #

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

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

boundRationalRationalMaybe 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.

integralToBounded ∷ ∀ i b m. (Integral i, Integral b, Bounded b, MonadFail m) ⇒ i → m b Source #

invalidKeyMonadFail m ⇒ Word → m a Source #

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

mkNonceFromOutputVRFOutputVRF v → Nonce Source #

Make a nonce from the VRF output bytes

mkNonceFromNumberWord64Nonce 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

Generic Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep UrlTypeType Source #

Methods

fromUrlRep Url x Source #

toRep Url x → Url Source #

Show Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntUrlShowS Source #

showUrlString Source #

showList ∷ [Url] → ShowS Source #

DecCBOR Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORUrlEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy UrlSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Url] → Size Source #

NFData Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfUrl → () Source #

Eq Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)UrlUrlBool Source #

(/=)UrlUrlBool Source #

Ord Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareUrlUrlOrdering Source #

(<)UrlUrlBool Source #

(<=)UrlUrlBool Source #

(>)UrlUrlBool Source #

(>=)UrlUrlBool Source #

maxUrlUrlUrl Source #

minUrlUrlUrl Source #

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.16.0.0-inplace" 'True) (C1 ('MetaCons "Url" 'PrefixI 'True) (S1 ('MetaSel ('Just "urlToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

textToUrlMonadFail m ⇒ IntText → 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

Generic DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep DnsNameTypeType Source #

Methods

fromDnsNameRep DnsName x Source #

toRep DnsName x → DnsName Source #

Show 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

Methods

encCBORDnsNameEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy DnsNameSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [DnsName] → Size Source #

NFData DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfDnsName → () Source #

Eq DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)DnsNameDnsNameBool Source #

(/=)DnsNameDnsNameBool Source #

Ord DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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.16.0.0-inplace" 'True) (C1 ('MetaCons "DnsName" 'PrefixI 'True) (S1 ('MetaSel ('Just "dnsToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

textToDnsMonadFail m ⇒ IntText → 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

Generic Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep PortTypeType Source #

Methods

fromPortRep Port x Source #

toRep Port x → Port Source #

Num Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(+)PortPortPort Source #

(-)PortPortPort Source #

(*)PortPortPort Source #

negatePortPort Source #

absPortPort Source #

signumPortPort Source #

fromIntegerIntegerPort Source #

Show Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntPortShowS Source #

showPortString Source #

showList ∷ [Port] → ShowS Source #

DecCBOR Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORPortEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy PortSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Port] → Size Source #

NFData Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfPort → () Source #

Eq Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)PortPortBool Source #

(/=)PortPortBool Source #

Ord Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

comparePortPortOrdering Source #

(<)PortPortBool Source #

(<=)PortPortBool Source #

(>)PortPortBool Source #

(>=)PortPortBool Source #

maxPortPortPort Source #

minPortPortPort Source #

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.16.0.0-inplace" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "portToWord16") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

data ActiveSlotCoeff Source #

Instances

Instances details
Generic ActiveSlotCoeff Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ActiveSlotCoeffTypeType Source #

Show 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

rnfActiveSlotCoeff → () Source #

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.16.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 c Source #

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

Constructors

BlocksMade 

Instances

Instances details
Crypto c ⇒ FromJSON (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto c ⇒ ToJSON (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (BlocksMade c) ∷ TypeType Source #

Methods

fromBlocksMade c → Rep (BlocksMade c) x Source #

toRep (BlocksMade c) x → BlocksMade c Source #

Show (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto c ⇒ DecCBOR (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto c ⇒ EncCBOR (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORBlocksMade c → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (BlocksMade c) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [BlocksMade c] → Size Source #

NFData (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfBlocksMade c → () Source #

Eq (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)BlocksMade c → BlocksMade c → Bool Source #

(/=)BlocksMade c → BlocksMade c → Bool Source #

NoThunks (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (BlocksMade c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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

kindObjectText → [Pair] → Value Source #

Helper function for a common pattern of creating objects

Indices

newtype TxIx Source #

Transaction index.

Constructors

TxIx 

Fields

Instances

Instances details
ToJSON TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Bounded TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep TxIxTypeType Source #

Methods

fromTxIxRep TxIx x Source #

toRep TxIx x → TxIx Source #

Show TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntTxIxShowS Source #

showTxIxString Source #

showList ∷ [TxIx] → ShowS Source #

FromCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBORTxIxEncoding Source #

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

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

DecCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORTxIxEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy TxIxSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxIx] → Size Source #

NFData TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfTxIx → () Source #

Eq TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)TxIxTxIxBool Source #

(/=)TxIxTxIxBool Source #

Ord TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareTxIxTxIxOrdering Source #

(<)TxIxTxIxBool Source #

(<=)TxIxTxIxBool Source #

(>)TxIxTxIxBool Source #

(>=)TxIxTxIxBool Source #

maxTxIxTxIxTxIx Source #

minTxIxTxIxTxIx Source #

NoThunks TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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

txIxFromIntegral ∷ ∀ a m. (Integral a, MonadFail m) ⇒ a → m TxIx Source #

mkTxIxWord16TxIx Source #

Construct a TxIx from a 16 bit unsigned integer

mkTxIxPartialHasCallStackIntegerTxIx 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. Use certIxFromIntegral in order to construct this index safely from anything other than Word16. There is also mkCertIxPartial that can be used for testing.

Constructors

CertIx 

Fields

Instances

Instances details
ToJSON CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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

FromCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBORCertIxEncoding Source #

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

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

DecCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORCertIxEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy CertIxSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [CertIx] → Size Source #

NFData CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfCertIx → () Source #

Eq CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)CertIxCertIxBool Source #

(/=)CertIxCertIxBool Source #

Ord CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

certIxFromIntegral ∷ ∀ a m. (Integral a, MonadFail m) ⇒ a → m CertIx Source #

mkCertIxWord16CertIx Source #

Construct a CertIx from a 16 bit unsigned integer

mkCertIxPartialHasCallStackIntegerCertIx 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 c Source #

Constructors

Anchor 

Instances

Instances details
Crypto c ⇒ FromJSON (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto c ⇒ ToJSON (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (Anchor c) ∷ TypeType Source #

Methods

fromAnchor c → Rep (Anchor c) x Source #

toRep (Anchor c) x → Anchor c Source #

Show (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntAnchor c → ShowS Source #

showAnchor c → String Source #

showList ∷ [Anchor c] → ShowS Source #

Crypto c ⇒ DecCBOR (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

decCBORDecoder s (Anchor c) Source #

dropCBORProxy (Anchor c) → Decoder s () Source #

labelProxy (Anchor c) → Text Source #

Crypto c ⇒ EncCBOR (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORAnchor c → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Anchor c) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Anchor c] → Size Source #

Crypto c ⇒ Default (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

defAnchor c Source #

Crypto c ⇒ NFData (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfAnchor c → () Source #

Eq (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)Anchor c → Anchor c → Bool Source #

(/=)Anchor c → Anchor c → Bool Source #

Ord (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareAnchor c → Anchor c → Ordering Source #

(<)Anchor c → Anchor c → Bool Source #

(<=)Anchor c → Anchor c → Bool Source #

(>)Anchor c → Anchor c → Bool Source #

(>=)Anchor c → Anchor c → Bool Source #

maxAnchor c → Anchor c → Anchor c Source #

minAnchor c → Anchor c → Anchor c Source #

NoThunks (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Anchor c) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep (Anchor c) = D1 ('MetaData "Anchor" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.16.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 c AnchorData))))

STS Base

data Globals Source #

Constructors

Globals 

Fields

Instances

Instances details
Generic Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep GlobalsTypeType Source #

Methods

fromGlobalsRep Globals x Source #

toRep Globals x → Globals Source #

Show Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfGlobals → () Source #

NoThunks Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

epochInfoPureGlobalsEpochInfo 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

Instances

Instances details
FromJSON Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Bounded Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep RelationTypeType Source #

Show Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfRelation → () Source #

Eq Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Relation = D1 ('MetaData "Relation" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.16.0.0-inplace" 'False) ((C1 ('MetaCons "RelEQ" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "RelLT" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "RelGT" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "RelLTEQ" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "RelGTEQ" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "RelSubset" 'PrefixI 'False) (U1TypeType))))

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

Generic (Mismatch r a) Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep (Mismatch r a) ∷ TypeType Source #

Methods

fromMismatch r a → Rep (Mismatch r a) x Source #

toRep (Mismatch r a) x → Mismatch r a Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntMismatch r a → ShowS Source #

showMismatch r a → String Source #

showList ∷ [Mismatch r a] → ShowS Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

decCBORDecoder s (Mismatch r a) Source #

dropCBORProxy (Mismatch r a) → Decoder s () Source #

labelProxy (Mismatch r a) → Text Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORMismatch r a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Mismatch r a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Mismatch r a] → Size Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

decCBORGroupDecoder s (Mismatch r a) Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORGroupMismatch r a → Encoding Source #

encodedGroupSizeExpr ∷ (∀ x. EncCBOR x ⇒ Proxy x → Size) → Proxy (Mismatch r a) → Size Source #

listLenMismatch r a → Word Source #

listLenBoundProxy (Mismatch r a) → Word Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

rnfMismatch r a → () Source #

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

Defined in Cardano.Ledger.BaseTypes

Methods

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

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

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

Defined in Cardano.Ledger.BaseTypes

Methods

compareMismatch r a → Mismatch r a → Ordering Source #

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

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

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

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

maxMismatch r a → Mismatch r a → Mismatch r a Source #

minMismatch r a → Mismatch r a → Mismatch r a Source #

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.16.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)))

swapMismatchMismatch r a → (a, a) Source #

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

unswapMismatch ∷ (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

injectCoinDeltaCoin Source #

Inject a a Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

inject ∷ a → a Source #