cardano-ledger-core-1.17.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 #

Methods

fromSlotNoRep SlotNo x #

toRep SlotNo x → SlotNo #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(+)SlotNoSlotNoSlotNo #

(-)SlotNoSlotNoSlotNo #

(*)SlotNoSlotNoSlotNo #

negateSlotNoSlotNo #

absSlotNoSlotNo #

signumSlotNoSlotNo #

fromIntegerIntegerSlotNo #

Show SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntSlotNoShowS #

showSlotNoString #

showList ∷ [SlotNo] → ShowS #

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 → () #

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool #

(/=)SlotNoSlotNoBool #

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compareSlotNoSlotNoOrdering #

(<)SlotNoSlotNoBool #

(<=)SlotNoSlotNoBool #

(>)SlotNoSlotNoBool #

(>=)SlotNoSlotNoBool #

maxSlotNoSlotNoSlotNo #

minSlotNoSlotNoSlotNo #

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-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

foldMapMonoid 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 #

toListWithOrigin a → [a] #

nullWithOrigin a → Bool #

lengthWithOrigin a → Int #

elemEq a ⇒ a → WithOrigin a → Bool #

maximumOrd a ⇒ WithOrigin a → a #

minimumOrd a ⇒ WithOrigin a → a #

sumNum a ⇒ WithOrigin a → a #

productNum a ⇒ WithOrigin a → a #

Traversable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

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

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

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

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

Functor WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

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

(<$) ∷ a → WithOrigin b → 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

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 #

Methods

fromWithOrigin t → Rep (WithOrigin t) x #

toRep (WithOrigin t) x → WithOrigin t #

Show t ⇒ Show (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntWithOrigin t → ShowS #

showWithOrigin t → String #

showList ∷ [WithOrigin t] → ShowS #

(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 → () #

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

compareWithOrigin t → WithOrigin t → Ordering #

(<)WithOrigin t → WithOrigin t → Bool #

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

(>)WithOrigin t → WithOrigin t → Bool #

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

maxWithOrigin t → WithOrigin t → WithOrigin t #

minWithOrigin 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.0.0-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

Methods

fromEpochNoRep EpochNo x #

toRep EpochNo x → EpochNo #

Show EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntEpochNoShowS #

showEpochNoString #

showList ∷ [EpochNo] → ShowS #

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 → () #

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool #

(/=)EpochNoEpochNoBool #

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compareEpochNoEpochNoOrdering #

(<)EpochNoEpochNoBool #

(<=)EpochNoEpochNoBool #

(>)EpochNoEpochNoBool #

(>=)EpochNoEpochNoBool #

maxEpochNoEpochNoEpochNo #

minEpochNoEpochNoEpochNo #

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-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

Methods

fromEpochSizeRep EpochSize x #

toRep EpochSize x → EpochSize #

Show EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntEpochSizeShowS #

showEpochSizeString #

showList ∷ [EpochSize] → ShowS #

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 → () #

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochSizeEpochSizeBool #

(/=)EpochSizeEpochSizeBool #

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-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

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 → () #

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-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

Methods

fromBlockNoRep BlockNo x #

toRep BlockNo x → BlockNo #

Num BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

showsPrecIntBlockNoShowS #

showBlockNoString #

showList ∷ [BlockNo] → ShowS #

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 → () #

Eq BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==)BlockNoBlockNoBool #

(/=)BlockNoBlockNoBool #

Ord BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

compareBlockNoBlockNoOrdering #

(<)BlockNoBlockNoBool #

(<=)BlockNoBlockNoBool #

(>)BlockNoBlockNoBool #

(>=)BlockNoBlockNoBool #

maxBlockNoBlockNoBlockNo #

minBlockNoBlockNoBlockNo #

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-4dc0085b2dcaf395960acff0c4fce29dfb45e68c3d685013ce6bc77613efa68b" '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 #

Methods

fromProtVerRep ProtVer x #

toRep ProtVer x → ProtVer #

Show ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntProtVerShowS #

showProtVerString #

showList ∷ [ProtVer] → ShowS #

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 → () #

Eq ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)ProtVerProtVerBool #

(/=)ProtVerProtVerBool #

Ord ProtVer Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareProtVerProtVerOrdering #

(<)ProtVerProtVerBool #

(<=)ProtVerProtVerBool #

(>)ProtVerProtVerBool #

(>=)ProtVerProtVerBool #

maxProtVerProtVerProtVer #

minProtVerProtVerProtVer #

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.17.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 #

Methods

fromNetworkRep Network x #

toRep Network x → Network #

Show Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntNetworkShowS #

showNetworkString #

showList ∷ [Network] → ShowS #

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 → () #

Eq Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)NetworkNetworkBool #

(/=)NetworkNetworkBool #

Ord Network Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareNetworkNetworkOrdering #

(<)NetworkNetworkBool #

(<=)NetworkNetworkBool #

(>)NetworkNetworkBool #

(>=)NetworkNetworkBool #

maxNetworkNetworkNetwork #

minNetworkNetworkNetwork #

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.17.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 #

Methods

fromNonceRep Nonce x #

toRep Nonce x → Nonce #

Show Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntNonceShowS #

showNonceString #

showList ∷ [Nonce] → ShowS #

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 → () #

Eq Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)NonceNonceBool #

(/=)NonceNonceBool #

Ord Nonce Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareNonceNonceOrdering #

(<)NonceNonceBool #

(<=)NonceNonceBool #

(>)NonceNonceBool #

(>=)NonceNonceBool #

maxNonceNonceNonce #

minNonceNonceNonce #

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.17.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 #

Methods

fromSeedRep Seed x #

toRep Seed x → Seed #

Show Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntSeedShowS #

showSeedString #

showList ∷ [Seed] → ShowS #

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 #

(/=)SeedSeedBool #

Ord Seed Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareSeedSeedOrdering #

(<)SeedSeedBool #

(<=)SeedSeedBool #

(>)SeedSeedBool #

(>=)SeedSeedBool #

maxSeedSeedSeed #

minSeedSeedSeed #

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.17.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 #

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 → () #

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 #

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 → () #

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 #

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 → () #

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 #

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 → () #

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 #

Methods

fromUrlRep Url x #

toRep Url x → Url #

Show Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntUrlShowS #

showUrlString #

showList ∷ [Url] → ShowS #

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 → () #

Eq Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)UrlUrlBool #

(/=)UrlUrlBool #

Ord Url Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareUrlUrlOrdering #

(<)UrlUrlBool #

(<=)UrlUrlBool #

(>)UrlUrlBool #

(>=)UrlUrlBool #

maxUrlUrlUrl #

minUrlUrlUrl #

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.17.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 #

Methods

fromDnsNameRep DnsName x #

toRep DnsName x → DnsName #

Show DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntDnsNameShowS #

showDnsNameString #

showList ∷ [DnsName] → ShowS #

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 → () #

Eq DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)DnsNameDnsNameBool #

(/=)DnsNameDnsNameBool #

Ord DnsName Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareDnsNameDnsNameOrdering #

(<)DnsNameDnsNameBool #

(<=)DnsNameDnsNameBool #

(>)DnsNameDnsNameBool #

(>=)DnsNameDnsNameBool #

maxDnsNameDnsNameDnsName #

minDnsNameDnsNameDnsName #

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.17.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 #

Methods

fromPortRep Port x #

toRep Port x → Port #

Num Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(+)PortPortPort #

(-)PortPortPort #

(*)PortPortPort #

negatePortPort #

absPortPort #

signumPortPort #

fromIntegerIntegerPort #

Show Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntPortShowS #

showPortString #

showList ∷ [Port] → ShowS #

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 → () #

Eq Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)PortPortBool #

(/=)PortPortBool #

Ord Port Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

comparePortPortOrdering #

(<)PortPortBool #

(<=)PortPortBool #

(>)PortPortBool #

(>=)PortPortBool #

maxPortPortPort #

minPortPortPort #

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.17.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 #

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 → () #

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

Generic BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep BlocksMadeTypeType #

Show 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

Methods

encCBORBlocksMadeEncoding Source #

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

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

NFData BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfBlocksMade → () #

Eq BlocksMade Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)BlocksMadeBlocksMadeBool #

(/=)BlocksMadeBlocksMadeBool #

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.17.0.0-inplace" 'True) (C1 ('MetaCons "BlocksMade" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlocksMade") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'StakePool) 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

Methods

minBoundTxIx #

maxBoundTxIx #

Enum TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

succTxIxTxIx #

predTxIxTxIx #

toEnumIntTxIx #

fromEnumTxIxInt #

enumFromTxIx → [TxIx] #

enumFromThenTxIxTxIx → [TxIx] #

enumFromToTxIxTxIx → [TxIx] #

enumFromThenToTxIxTxIxTxIx → [TxIx] #

Generic TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep TxIxTypeType #

Methods

fromTxIxRep TxIx x #

toRep TxIx x → TxIx #

Show TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntTxIxShowS #

showTxIxString #

showList ∷ [TxIx] → ShowS #

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 → () #

Eq TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)TxIxTxIxBool #

(/=)TxIxTxIxBool #

Ord TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareTxIxTxIxOrdering #

(<)TxIxTxIxBool #

(<=)TxIxTxIxBool #

(>)TxIxTxIxBool #

(>=)TxIxTxIxBool #

maxTxIxTxIxTxIx #

minTxIxTxIxTxIx #

MemPack TxIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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

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

mkTxIxWord16TxIx Source #

Deprecated: In favor of TxIx

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

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

showsPrecIntCertIxShowS #

showCertIxString #

showList ∷ [CertIx] → ShowS #

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 → () #

Eq CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)CertIxCertIxBool #

(/=)CertIxCertIxBool #

Ord CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareCertIxCertIxOrdering #

(<)CertIxCertIxBool #

(<=)CertIxCertIxBool #

(>)CertIxCertIxBool #

(>=)CertIxCertIxBool #

maxCertIxCertIxCertIx #

minCertIxCertIxCertIx #

NoThunks CertIx Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

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

mkCertIxWord16CertIx Source #

Deprecated: In favor of CertIx

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

Generic Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep AnchorTypeType #

Methods

fromAnchorRep Anchor x #

toRep Anchor x → Anchor #

Show Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntAnchorShowS #

showAnchorString #

showList ∷ [Anchor] → ShowS #

DecCBOR Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORAnchorEncoding Source #

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

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

Default Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

defAnchor Source #

NFData Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfAnchor → () #

Eq Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)AnchorAnchorBool #

(/=)AnchorAnchorBool #

Ord Anchor Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareAnchorAnchorOrdering #

(<)AnchorAnchorBool #

(<=)AnchorAnchorBool #

(>)AnchorAnchorBool #

(>=)AnchorAnchorBool #

maxAnchorAnchorAnchor #

minAnchorAnchorAnchor #

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.17.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
Generic Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep GlobalsTypeType #

Methods

fromGlobalsRep Globals x #

toRep Globals x → Globals #

Show Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntGlobalsShowS #

showGlobalsString #

showList ∷ [Globals] → ShowS #

NFData Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfGlobals → () #

NoThunks Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Globals Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Globals = D1 ('MetaData "Globals" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Globals" 'PrefixI 'True) (((S1 ('MetaSel ('Just "epochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Either Text))) :*: S1 ('MetaSel ('Just "slotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "stabilityWindow") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "randomnessStabilisationWindow") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "securityParameter") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))) :*: ((S1 ('MetaSel ('Just "maxKESEvo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "quorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "maxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: (S1 ('MetaSel ('Just "activeSlotCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ActiveSlotCoeff) :*: (S1 ('MetaSel ('Just "networkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "systemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SystemStart))))))

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 #

Methods

fromRelationRep Relation x #

toRep Relation x → Relation #

Show Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntRelationShowS #

showRelationString #

showList ∷ [Relation] → ShowS #

NFData Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfRelation → () #

Eq Relation Source # 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)RelationRelationBool #

(/=)RelationRelationBool #

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.17.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 #

Methods

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

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

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

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntMismatch r a → ShowS #

showMismatch r a → String #

showList ∷ [Mismatch r a] → ShowS #

(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 → () #

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

compareMismatch 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 #

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

minMismatch 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.17.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 #