| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.BaseTypes
Synopsis
- module Cardano.Slotting.Block
- newtype EpochInterval = EpochInterval {}
- newtype EpochSize = EpochSize {}
- newtype EpochNo = EpochNo {}
- data WithOrigin t
- newtype SlotNo = SlotNo {}
- binOpEpochNo ∷ (Word64 → Word64 → Word64) → EpochNo → EpochNo → EpochNo
- addEpochInterval ∷ EpochNo → EpochInterval → EpochNo
- module Cardano.Ledger.BaseTypes.NonZero
- data ProtVer = ProtVer {}
- decodeProtVer ∷ Era era ⇒ Decoder s ProtVer
- module Cardano.Ledger.Binary.Version
- type FixedPoint = Digits34
- (==>) ∷ Bool → Bool → Bool
- (⭒) ∷ Nonce → Nonce → Nonce
- data Network
- networkToWord8 ∷ Network → Word8
- word8ToNetwork ∷ Word8 → Maybe Network
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- newtype Seed = Seed (Hash Blake2b_256 Seed)
- data UnitInterval
- data PositiveUnitInterval
- data PositiveInterval
- data NonNegativeInterval
- positiveUnitIntervalRelaxToUnitInterval ∷ PositiveUnitInterval → UnitInterval
- positiveUnitIntervalRelaxToPositiveInterval ∷ PositiveUnitInterval → PositiveInterval
- positiveIntervalRelaxToNonNegativeInterval ∷ PositiveInterval → NonNegativeInterval
- newtype Inclusive a = Inclusive {
- unInclusive ∷ a
- newtype Exclusive a = Exclusive {
- unExclusive ∷ a
- class Bounded r ⇒ BoundedRational r where
- boundRational ∷ Rational → Maybe r
- unboundRational ∷ r → Rational
- fpPrecision ∷ FixedPoint
- integralToBounded ∷ (Integral i, Integral b, Bounded b, MonadFail m) ⇒ i → m b
- promoteRatio ∷ Integral a ⇒ Ratio a → Rational
- invalidKey ∷ (Typeable a, MonadFail m) ⇒ Word → m a
- mkNonceFromOutputVRF ∷ OutputVRF v → Nonce
- mkNonceFromNumber ∷ Word64 → Nonce
- data Url
- urlToText ∷ Url → Text
- textToUrl ∷ MonadFail m ⇒ Int → Text → m Url
- data DnsName
- dnsToText ∷ DnsName → Text
- textToDns ∷ MonadFail m ⇒ Int → Text → m DnsName
- newtype Port = Port {}
- data ActiveSlotCoeff
- mkActiveSlotCoeff ∷ PositiveUnitInterval → ActiveSlotCoeff
- activeSlotVal ∷ ActiveSlotCoeff → PositiveUnitInterval
- activeSlotLog ∷ ActiveSlotCoeff → FixedPoint
- module Data.Maybe.Strict
- newtype BlocksMade = BlocksMade {}
- kindObject ∷ Text → [Pair] → Value
- newtype TxIx = TxIx {}
- txIxToInt ∷ TxIx → Int
- txIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m TxIx
- mkTxIxPartial ∷ HasCallStack ⇒ Integer → TxIx
- newtype CertIx = CertIx {}
- certIxToInt ∷ CertIx → Int
- certIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m CertIx
- mkCertIxPartial ∷ HasCallStack ⇒ Integer → CertIx
- data Anchor = Anchor {
- anchorUrl ∷ !Url
- anchorDataHash ∷ !(SafeHash AnchorData)
- newtype AnchorData = AnchorData ByteString
- data Globals = Globals {
- epochInfo ∷ !(EpochInfo (Either Text))
- slotsPerKESPeriod ∷ !Word64
- stabilityWindow ∷ !Word64
- randomnessStabilisationWindow ∷ !Word64
- securityParameter ∷ !(NonZero Word64)
- maxKESEvo ∷ !Word64
- quorum ∷ !Word64
- maxLovelaceSupply ∷ !Word64
- activeSlotCoeff ∷ !ActiveSlotCoeff
- networkId ∷ !Network
- systemStart ∷ !SystemStart
- epochInfoPure ∷ Globals → EpochInfo Identity
- type ShelleyBase = ReaderT Globals Identity
- data Relation
- data Mismatch (r ∷ Relation) a = Mismatch {
- mismatchSupplied ∷ !a
- mismatchExpected ∷ !a
- swapMismatch ∷ ∀ (r ∷ Relation) a. Mismatch r a → (a, a)
- unswapMismatch ∷ ∀ a (r ∷ Relation). (a, a) → Mismatch r a
- class Inject t s where
- inject ∷ t → s
- positiveUnitIntervalNonZeroRational ∷ PositiveUnitInterval → NonZero Rational
- newtype KeyValuePairs a = KeyValuePairs {
- unKeyValuePairs ∷ a
- class ToKeyValuePairs a where
- toKeyValuePairs ∷ KeyValue e kv ⇒ a → [kv]
Documentation
module Cardano.Slotting.Block
newtype EpochInterval Source #
Constructors
| EpochInterval | |
Fields | |
Instances
Constructors
| EpochSize | |
Fields | |
Instances
| FromJSON EpochSize | |||||
| ToJSON EpochSize | |||||
| FromCBOR EpochSize | |||||
| ToCBOR EpochSize | |||||
| DecCBOR EpochSize | |||||
| EncCBOR EpochSize | |||||
| NFData EpochSize | |||||
Defined in Cardano.Slotting.Slot | |||||
| Enum EpochSize | |||||
Defined in Cardano.Slotting.Slot | |||||
| Generic EpochSize | |||||
Defined in Cardano.Slotting.Slot Associated Types
| |||||
| Show EpochSize | |||||
| Eq EpochSize | |||||
| Ord EpochSize | |||||
Defined in Cardano.Slotting.Slot | |||||
| NoThunks EpochSize | |||||
| type Rep EpochSize | |||||
Defined in Cardano.Slotting.Slot type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-86a1a2109ef26164291ca2673243081fe625f235d62ce0d0820d9d27d88bc988" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
An epoch, i.e. the number of the epoch.
Instances
| FromJSON EpochNo | |||||
| ToJSON EpochNo | |||||
| FromCBOR EpochNo | |||||
| ToCBOR EpochNo | |||||
| DecCBOR EpochNo | |||||
| EncCBOR EpochNo | |||||
| NFData EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
| Enum EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
| Generic EpochNo | |||||
Defined in Cardano.Slotting.Slot Associated Types
| |||||
| Show EpochNo | |||||
| Eq EpochNo | |||||
| Ord EpochNo | |||||
| NoThunks EpochNo | |||||
| Serialise EpochNo | |||||
| type Rep EpochNo | |||||
Defined in Cardano.Slotting.Slot type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-86a1a2109ef26164291ca2673243081fe625f235d62ce0d0820d9d27d88bc988" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
data WithOrigin t Source #
Instances
| Functor WithOrigin | |||||
Defined in Cardano.Slotting.Slot | |||||
| Foldable WithOrigin | |||||
Defined in Cardano.Slotting.Slot Methods fold ∷ Monoid m ⇒ WithOrigin m → m # foldMap ∷ Monoid m ⇒ (a → m) → WithOrigin a → m # foldMap' ∷ Monoid m ⇒ (a → m) → WithOrigin a → m # foldr ∷ (a → b → b) → b → WithOrigin a → b # foldr' ∷ (a → b → b) → b → WithOrigin a → b # foldl ∷ (b → a → b) → b → WithOrigin a → b # foldl' ∷ (b → a → b) → b → WithOrigin a → b # foldr1 ∷ (a → a → a) → WithOrigin a → a # foldl1 ∷ (a → a → a) → WithOrigin a → a # toList ∷ WithOrigin a → [a] # null ∷ WithOrigin a → Bool # length ∷ WithOrigin a → Int # elem ∷ Eq a ⇒ a → WithOrigin a → Bool # maximum ∷ Ord a ⇒ WithOrigin a → a # minimum ∷ Ord a ⇒ WithOrigin a → a # sum ∷ Num a ⇒ WithOrigin a → a # product ∷ Num a ⇒ WithOrigin a → a # | |||||
| Traversable WithOrigin | |||||
Defined in Cardano.Slotting.Slot Methods traverse ∷ Applicative f ⇒ (a → f b) → WithOrigin a → f (WithOrigin b) # sequenceA ∷ Applicative f ⇒ WithOrigin (f a) → f (WithOrigin a) # mapM ∷ Monad m ⇒ (a → m b) → WithOrigin a → m (WithOrigin b) # sequence ∷ Monad m ⇒ WithOrigin (m a) → m (WithOrigin a) # | |||||
| FromJSON a ⇒ FromJSON (WithOrigin a) | |||||
Defined in Cardano.Slotting.Slot Methods parseJSON ∷ Value → Parser (WithOrigin a) Source # parseJSONList ∷ Value → Parser [WithOrigin a] Source # omittedField ∷ Maybe (WithOrigin a) Source # | |||||
| ToJSON a ⇒ ToJSON (WithOrigin a) | |||||
Defined in Cardano.Slotting.Slot Methods toJSON ∷ WithOrigin a → Value Source # toEncoding ∷ WithOrigin a → Encoding Source # toJSONList ∷ [WithOrigin a] → Value Source # toEncodingList ∷ [WithOrigin a] → Encoding Source # omitField ∷ WithOrigin a → Bool Source # | |||||
| (Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot | |||||
| (Serialise t, Typeable t) ⇒ ToCBOR (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot Methods toCBOR ∷ WithOrigin t → Encoding Source # encodedSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy (WithOrigin t) → Size Source # encodedListSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy [WithOrigin t] → Size Source # | |||||
| (Serialise t, Typeable t) ⇒ DecCBOR (WithOrigin t) | |||||
Defined in Cardano.Ledger.Binary.Decoding.DecCBOR | |||||
| Serialise t ⇒ EncCBOR (WithOrigin t) | |||||
Defined in Cardano.Ledger.Binary.Encoding.EncCBOR Methods encCBOR ∷ WithOrigin t → Encoding Source # | |||||
| NFData a ⇒ NFData (WithOrigin a) | |||||
Defined in Cardano.Slotting.Slot Methods rnf ∷ WithOrigin a → () # | |||||
| Bounded t ⇒ Bounded (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot | |||||
| Generic (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot Associated Types
| |||||
| Show t ⇒ Show (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot Methods showsPrec ∷ Int → WithOrigin t → ShowS # show ∷ WithOrigin t → String # showList ∷ [WithOrigin t] → ShowS # | |||||
| Eq t ⇒ Eq (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot | |||||
| Ord t ⇒ Ord (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot Methods compare ∷ WithOrigin t → WithOrigin t → Ordering # (<) ∷ WithOrigin t → WithOrigin t → Bool # (<=) ∷ WithOrigin t → WithOrigin t → Bool # (>) ∷ WithOrigin t → WithOrigin t → Bool # (>=) ∷ WithOrigin t → WithOrigin t → Bool # max ∷ WithOrigin t → WithOrigin t → WithOrigin t # min ∷ WithOrigin t → WithOrigin t → WithOrigin t # | |||||
| NoThunks t ⇒ NoThunks (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot | |||||
| Serialise t ⇒ Serialise (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot Methods encode ∷ WithOrigin t → Encoding Source # decode ∷ Decoder s (WithOrigin t) Source # encodeList ∷ [WithOrigin t] → Encoding Source # decodeList ∷ Decoder s [WithOrigin t] Source # | |||||
| type Rep (WithOrigin t) | |||||
Defined in Cardano.Slotting.Slot type Rep (WithOrigin t) = D1 ('MetaData "WithOrigin" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-86a1a2109ef26164291ca2673243081fe625f235d62ce0d0820d9d27d88bc988" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t))) | |||||
The 0-based index for the Ourboros time slot.
Instances
| FromJSON SlotNo | |||||
| ToJSON SlotNo | |||||
| FromCBOR SlotNo | |||||
| ToCBOR SlotNo | |||||
| DecCBOR SlotNo | |||||
| EncCBOR SlotNo | |||||
| NFData SlotNo | |||||
Defined in Cardano.Slotting.Slot | |||||
| Bounded SlotNo | |||||
| Enum SlotNo | |||||
Defined in Cardano.Slotting.Slot | |||||
| Generic SlotNo | |||||
Defined in Cardano.Slotting.Slot Associated Types
| |||||
| Num SlotNo | |||||
| Show SlotNo | |||||
| Eq SlotNo | |||||
| Ord SlotNo | |||||
| NoThunks SlotNo | |||||
| Serialise SlotNo | |||||
| type Rep SlotNo | |||||
Defined in Cardano.Slotting.Slot type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-86a1a2109ef26164291ca2673243081fe625f235d62ce0d0820d9d27d88bc988" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
binOpEpochNo ∷ (Word64 → Word64 → Word64) → EpochNo → EpochNo → EpochNo Source #
Convenience function for doing binary operations on two EpochNos
addEpochInterval ∷ EpochNo → EpochInterval → EpochNo Source #
Add a EpochInterval (a positive change) to an EpochNo to get a new EpochNo
Instances
| FromJSON ProtVer Source # | |||||
| ToJSON ProtVer Source # | |||||
| FromCBOR ProtVer Source # | |||||
| ToCBOR ProtVer Source # | |||||
| DecCBOR ProtVer Source # | |||||
| EncCBOR ProtVer Source # | |||||
| DecCBORGroup ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| EncCBORGroup ProtVer Source # | |||||
| ToPlutusData ProtVer Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData | |||||
| NFData ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show ProtVer Source # | |||||
| Eq ProtVer Source # | |||||
| Ord ProtVer Source # | |||||
| NoThunks ProtVer Source # | |||||
| type Rep ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.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))) | |||||
decodeProtVer ∷ Era era ⇒ Decoder s ProtVer Source #
Decoder for ProtVer that only accepts versions where the major fits in
the bounds of what's allowed for the provided Era.
Note - Thanks to the Ledger rules, only the current major protocol version and the very next major protocol version from the current one will be accepted by the Ledger anywhere in the block, regardless that this decoder allows a broader range.
type FixedPoint = Digits34 Source #
Instances
| FromJSON Network Source # | |
| ToJSON Network Source # | |
| FromCBOR Network Source # | |
| ToCBOR Network Source # | |
| DecCBOR Network Source # | |
| EncCBOR Network Source # | |
| Default Network Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| NFData Network Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Bounded Network Source # | |
| Enum Network Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Generic Network Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Show Network Source # | |
| Eq Network Source # | |
| Ord Network Source # | |
| NoThunks Network Source # | |
| type Rep Network Source # | |
Evolving nonce type.
Constructors
| Nonce !(Hash Blake2b_256 Nonce) | |
| NeutralNonce | Identity element |
Instances
| FromJSON Nonce Source # | |||||
| ToJSON Nonce Source # | |||||
| DecCBOR Nonce Source # | |||||
| EncCBOR Nonce Source # | |||||
| ToPlutusData Nonce Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData | |||||
| NFData Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Nonce Source # | |||||
| Eq Nonce Source # | |||||
| Ord Nonce Source # | |||||
| NoThunks Nonce Source # | |||||
| type Rep Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.0.0-inplace" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 ∷ Type → Type)) | |||||
Seed to the verifiable random function.
Constructors
| Seed (Hash Blake2b_256 Seed) |
Instances
| SignableRepresentation Seed Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| EncCBOR Seed Source # | |||||
| Generic Seed Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Seed Source # | |||||
| Eq Seed Source # | |||||
| Ord Seed Source # | |||||
| NoThunks Seed Source # | |||||
| type Rep Seed Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
data UnitInterval Source #
Type to represent a value in the unit interval [0; 1]
Instances
| FromJSON UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods parseJSON ∷ Value → Parser UnitInterval Source # parseJSONList ∷ Value → Parser [UnitInterval] Source # | |||||
| ToJSON UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ UnitInterval → Value Source # toEncoding ∷ UnitInterval → Encoding Source # toJSONList ∷ [UnitInterval] → Value Source # toEncodingList ∷ [UnitInterval] → Encoding Source # omitField ∷ UnitInterval → Bool Source # | |||||
| DecCBOR UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| BoundedRational UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| ToPlutusData UnitInterval Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData Methods | |||||
| Default UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| NFData UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ UnitInterval → () # | |||||
| Bounded UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → UnitInterval → ShowS # show ∷ UnitInterval → String # showList ∷ [UnitInterval] → ShowS # | |||||
| Eq UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Ord UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods compare ∷ UnitInterval → UnitInterval → Ordering # (<) ∷ UnitInterval → UnitInterval → Bool # (<=) ∷ UnitInterval → UnitInterval → Bool # (>) ∷ UnitInterval → UnitInterval → Bool # (>=) ∷ UnitInterval → UnitInterval → Bool # max ∷ UnitInterval → UnitInterval → UnitInterval # min ∷ UnitInterval → UnitInterval → UnitInterval # | |||||
| NoThunks UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep UnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
data PositiveUnitInterval Source #
Type to represent a value in the unit interval (0; 1]
Instances
| FromJSON PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| FromCBOR PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToCBOR PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toCBOR ∷ PositiveUnitInterval → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PositiveUnitInterval → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PositiveUnitInterval] → Size Source # | |||||
| DecCBOR PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| BoundedRational PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NFData PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ PositiveUnitInterval → () # | |||||
| Bounded PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
Methods | |||||
| Show PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → PositiveUnitInterval → ShowS # show ∷ PositiveUnitInterval → String # showList ∷ [PositiveUnitInterval] → ShowS # | |||||
| Eq PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| Ord PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods compare ∷ PositiveUnitInterval → PositiveUnitInterval → Ordering # (<) ∷ PositiveUnitInterval → PositiveUnitInterval → Bool # (<=) ∷ PositiveUnitInterval → PositiveUnitInterval → Bool # (>) ∷ PositiveUnitInterval → PositiveUnitInterval → Bool # (>=) ∷ PositiveUnitInterval → PositiveUnitInterval → Bool # max ∷ PositiveUnitInterval → PositiveUnitInterval → PositiveUnitInterval # min ∷ PositiveUnitInterval → PositiveUnitInterval → PositiveUnitInterval # | |||||
| NoThunks PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep PositiveUnitInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
data PositiveInterval Source #
Type to represent a value in the interval (0; +∞)
Instances
| FromJSON PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods parseJSON ∷ Value → Parser PositiveInterval Source # | |||||
| ToJSON PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ PositiveInterval → Value Source # toEncoding ∷ PositiveInterval → Encoding Source # toJSONList ∷ [PositiveInterval] → Value Source # | |||||
| DecCBOR PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| BoundedRational PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| ToPlutusData PositiveInterval Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData Methods | |||||
| NFData PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ PositiveInterval → () # | |||||
| Bounded PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
Methods from ∷ PositiveInterval → Rep PositiveInterval x # to ∷ Rep PositiveInterval x → PositiveInterval # | |||||
| Show PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → PositiveInterval → ShowS # show ∷ PositiveInterval → String # showList ∷ [PositiveInterval] → ShowS # | |||||
| Eq PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| Ord PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods compare ∷ PositiveInterval → PositiveInterval → Ordering # (<) ∷ PositiveInterval → PositiveInterval → Bool # (<=) ∷ PositiveInterval → PositiveInterval → Bool # (>) ∷ PositiveInterval → PositiveInterval → Bool # (>=) ∷ PositiveInterval → PositiveInterval → Bool # max ∷ PositiveInterval → PositiveInterval → PositiveInterval # min ∷ PositiveInterval → PositiveInterval → PositiveInterval # | |||||
| NoThunks PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep PositiveInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
data NonNegativeInterval Source #
Type to represent a value in the interval [0; +∞)
Instances
| FromJSON NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| DecCBOR NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| BoundedRational NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToPlutusData NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData Methods | |||||
| NFData NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ NonNegativeInterval → () # | |||||
| Bounded NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
Methods | |||||
| Show NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → NonNegativeInterval → ShowS # show ∷ NonNegativeInterval → String # showList ∷ [NonNegativeInterval] → ShowS # | |||||
| Eq NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| Ord NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods compare ∷ NonNegativeInterval → NonNegativeInterval → Ordering # (<) ∷ NonNegativeInterval → NonNegativeInterval → Bool # (<=) ∷ NonNegativeInterval → NonNegativeInterval → Bool # (>) ∷ NonNegativeInterval → NonNegativeInterval → Bool # (>=) ∷ NonNegativeInterval → NonNegativeInterval → Bool # max ∷ NonNegativeInterval → NonNegativeInterval → NonNegativeInterval # min ∷ NonNegativeInterval → NonNegativeInterval → NonNegativeInterval # | |||||
| NoThunks NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep NonNegativeInterval Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
Constructors
| Inclusive | |
Fields
| |
Instances
| DecCBOR a ⇒ DecCBOR (Inclusive a) Source # | |
| EncCBOR a ⇒ EncCBOR (Inclusive a) Source # | |
| NFData a ⇒ NFData (Inclusive a) Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Generic a ⇒ Generic (Inclusive a) Source # | |
| Show a ⇒ Show (Inclusive a) Source # | |
| Eq a ⇒ Eq (Inclusive a) Source # | |
| Ord a ⇒ Ord (Inclusive a) Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| NoThunks a ⇒ NoThunks (Inclusive a) Source # | |
| type Rep (Inclusive a) Source # | |
Defined in Cardano.Ledger.BaseTypes | |
Constructors
| Exclusive | |
Fields
| |
Instances
| DecCBOR a ⇒ DecCBOR (Exclusive a) Source # | |
| EncCBOR a ⇒ EncCBOR (Exclusive a) Source # | |
| NFData a ⇒ NFData (Exclusive a) Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Generic a ⇒ Generic (Exclusive a) Source # | |
| Show a ⇒ Show (Exclusive a) Source # | |
| Eq a ⇒ Eq (Exclusive a) Source # | |
| Ord a ⇒ Ord (Exclusive a) Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| NoThunks a ⇒ NoThunks (Exclusive a) Source # | |
| type Rep (Exclusive a) Source # | |
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
boundRational ∷ Rational → Maybe r Source #
Returns Nothing when supplied value is not within bounds or when precision is
too high to be represented by the underlying type
Example
>>>:set -XTypeApplications>>>import Data.Ratio>>>boundRational @UnitInterval $ 2 % 3Just (2 % 3)>>>boundRational @UnitInterval (-0.5)Nothing>>>boundRational @UnitInterval (1.5)Nothing>>>boundRational @UnitInterval 0Just (0 % 1)>>>boundRational @PositiveUnitInterval 0Nothing
unboundRational ∷ r → Rational Source #
Promote bounded rational type into the unbounded Rational.
Instances
| BoundedRational NonNegativeInterval Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| BoundedRational PositiveInterval Source # | |
Defined in Cardano.Ledger.BaseTypes Methods | |
| BoundedRational PositiveUnitInterval Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| BoundedRational UnitInterval Source # | |
Defined in Cardano.Ledger.BaseTypes Methods | |
invalidKey ∷ (Typeable a, MonadFail m) ⇒ Word → m a Source #
Report an error when a numeric key of the type constructor doesn't match.
mkNonceFromOutputVRF ∷ OutputVRF v → Nonce Source #
Make a nonce from the VRF output bytes
mkNonceFromNumber ∷ Word64 → Nonce Source #
Make a nonce from a number.
Instances
| FromJSON Url Source # | |||||
| ToJSON Url Source # | |||||
| DecCBOR Url Source # | |||||
| EncCBOR Url Source # | |||||
| NFData Url Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Url Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Url Source # | |||||
| Eq Url Source # | |||||
| Ord Url Source # | |||||
| NoThunks Url Source # | |||||
| type Rep Url Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
textToUrl ∷ MonadFail m ⇒ Int → Text → m Url Source #
Turn a Text into a Url, fail if the Text has more than n Bytes
Instances
| FromJSON DnsName Source # | |||||
| ToJSON DnsName Source # | |||||
| DecCBOR DnsName Source # | |||||
| EncCBOR DnsName Source # | |||||
| NFData DnsName Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic DnsName Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show DnsName Source # | |||||
| Eq DnsName Source # | |||||
| Ord DnsName Source # | |||||
| NoThunks DnsName Source # | |||||
| type Rep DnsName Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
textToDns ∷ MonadFail m ⇒ Int → Text → m DnsName Source #
Turn a Text into a DnsName, fail if the Text has more than n Bytes
Constructors
| Port | |
Fields | |
Instances
| FromJSON Port Source # | |||||
| ToJSON Port Source # | |||||
| DecCBOR Port Source # | |||||
| EncCBOR Port Source # | |||||
| NFData Port Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Port Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Num Port Source # | |||||
| Show Port Source # | |||||
| Eq Port Source # | |||||
| Ord Port Source # | |||||
| NoThunks Port Source # | |||||
| type Rep Port Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
data ActiveSlotCoeff Source #
Instances
| FromCBOR ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToCBOR ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toCBOR ∷ ActiveSlotCoeff → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ActiveSlotCoeff → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ActiveSlotCoeff] → Size Source # | |||||
| DecCBOR ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| NFData ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ ActiveSlotCoeff → () # | |||||
| Generic ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
Methods from ∷ ActiveSlotCoeff → Rep ActiveSlotCoeff x # to ∷ Rep ActiveSlotCoeff x → ActiveSlotCoeff # | |||||
| Show ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → ActiveSlotCoeff → ShowS # show ∷ ActiveSlotCoeff → String # showList ∷ [ActiveSlotCoeff] → ShowS # | |||||
| Eq ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods (==) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # (/=) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # | |||||
| Ord ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods compare ∷ ActiveSlotCoeff → ActiveSlotCoeff → Ordering # (<) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # (<=) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # (>) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # (>=) ∷ ActiveSlotCoeff → ActiveSlotCoeff → Bool # | |||||
| NoThunks ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep ActiveSlotCoeff Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep ActiveSlotCoeff = D1 ('MetaData "ActiveSlotCoeff" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.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))) | |||||
module Data.Maybe.Strict
newtype BlocksMade Source #
Number of blocks which have been created by stake pools in the current epoch.
Constructors
| BlocksMade | |
Fields | |
Instances
| FromJSON BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods parseJSON ∷ Value → Parser BlocksMade Source # parseJSONList ∷ Value → Parser [BlocksMade] Source # | |||||
| ToJSON BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ BlocksMade → Value Source # toEncoding ∷ BlocksMade → Encoding Source # toJSONList ∷ [BlocksMade] → Value Source # toEncodingList ∷ [BlocksMade] → Encoding Source # omitField ∷ BlocksMade → Bool Source # | |||||
| DecCBOR BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| EncCBOR BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods encCBOR ∷ BlocksMade → Encoding Source # | |||||
| Default BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods def ∷ BlocksMade Source # | |||||
| NFData BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods rnf ∷ BlocksMade → () # | |||||
| Generic BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods showsPrec ∷ Int → BlocksMade → ShowS # show ∷ BlocksMade → String # showList ∷ [BlocksMade] → ShowS # | |||||
| Eq BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NoThunks BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| type Rep BlocksMade Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep BlocksMade = D1 ('MetaData "BlocksMade" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.0.0-inplace" 'True) (C1 ('MetaCons "BlocksMade" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlocksMade") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'StakePool) Natural)))) | |||||
Indices
Transaction index.
Instances
| ToJSON TxIx Source # | |||||
| DecCBOR TxIx Source # | |||||
| EncCBOR TxIx Source # | |||||
| NFData TxIx Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Bounded TxIx Source # | |||||
| Enum TxIx Source # | |||||
| Generic TxIx Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show TxIx Source # | |||||
| Eq TxIx Source # | |||||
| Ord TxIx Source # | |||||
| MemPack TxIx Source # | |||||
| NoThunks TxIx Source # | |||||
| Random TxIx Source # | |||||
| Uniform TxIx Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods uniformM ∷ StatefulGen g m ⇒ g → m TxIx Source # | |||||
| UniformRange TxIx Source # | |||||
| type Rep TxIx Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
mkTxIxPartial ∷ HasCallStack ⇒ Integer → TxIx Source #
Certificate index. There is mkCertIxPartial that can be used for testing when constructing
from other integral types that are larger than Word16
Instances
| ToJSON CertIx Source # | |
| DecCBOR CertIx Source # | |
| EncCBOR CertIx Source # | |
| NFData CertIx Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Bounded CertIx Source # | |
| Enum CertIx Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| Show CertIx Source # | |
| Eq CertIx Source # | |
| Ord CertIx Source # | |
| NoThunks CertIx Source # | |
| Random CertIx Source # | |
| Uniform CertIx Source # | |
Defined in Cardano.Ledger.BaseTypes Methods uniformM ∷ StatefulGen g m ⇒ g → m CertIx Source # | |
| UniformRange CertIx Source # | |
certIxToInt ∷ CertIx → Int Source #
Constructors
| Anchor | |
Fields
| |
Instances
| FromJSON Anchor Source # | |||||
| ToJSON Anchor Source # | |||||
| DecCBOR Anchor Source # | |||||
| EncCBOR Anchor Source # | |||||
| ToKeyValuePairs Anchor Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods toKeyValuePairs ∷ KeyValue e kv ⇒ Anchor → [kv] Source # | |||||
| Default Anchor Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NFData Anchor Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Anchor Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Anchor Source # | |||||
| Eq Anchor Source # | |||||
| Ord Anchor Source # | |||||
| NoThunks Anchor Source # | |||||
| type Rep Anchor Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Anchor = D1 ('MetaData "Anchor" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.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)))) | |||||
newtype AnchorData Source #
Constructors
| AnchorData ByteString |
Instances
| SafeToHash AnchorData Source # | |
Defined in Cardano.Ledger.BaseTypes Methods originalBytes ∷ AnchorData → ByteString Source # originalBytesSize ∷ AnchorData → Int Source # makeHashWithExplicitProxys ∷ Proxy i → AnchorData → SafeHash i Source # | |
| Eq AnchorData Source # | |
Defined in Cardano.Ledger.BaseTypes | |
| HashAnnotated AnchorData AnchorData Source # | |
Defined in Cardano.Ledger.BaseTypes Methods | |
STS Base
Constructors
| Globals | |
Fields
| |
Instances
| NFData Globals Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Globals Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Globals Source # | |||||
| NoThunks Globals Source # | |||||
| type Rep Globals Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Globals = D1 ('MetaData "Globals" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.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 (NonZero 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)))))) | |||||
epochInfoPure ∷ Globals → EpochInfo Identity Source #
Pure epoch info via throw. Note that this should only be used when we can
guarantee the validity of the translation; in particular, the EpochInfo
used here should never be applied to user-supplied input.
Relationship descriptor for the expectation in the Mismatch type.
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
| FromJSON a ⇒ FromJSON (Mismatch r a) Source # | |||||
| ToJSON a ⇒ ToJSON (Mismatch r a) Source # | |||||
| (DecCBOR a, Typeable r) ⇒ DecCBOR (Mismatch r a) Source # | |||||
| EncCBOR a ⇒ EncCBOR (Mismatch r a) Source # | |||||
| (Typeable r, DecCBOR a) ⇒ DecCBORGroup (Mismatch r a) Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods decCBORGroup ∷ Decoder s (Mismatch r a) Source # | |||||
| EncCBOR a ⇒ EncCBORGroup (Mismatch r a) Source # | |||||
| NFData a ⇒ NFData (Mismatch r a) Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic (Mismatch r a) Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| (Typeable r, Show a) ⇒ Show (Mismatch r a) Source # | |||||
| Eq a ⇒ Eq (Mismatch r a) Source # | |||||
| Ord a ⇒ Ord (Mismatch r a) Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NoThunks a ⇒ NoThunks (Mismatch r a) Source # | |||||
| type Rep (Mismatch r a) Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep (Mismatch r a) = D1 ('MetaData "Mismatch" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.21.0.0-inplace" 'False) (C1 ('MetaCons "Mismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "mismatchSupplied") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "mismatchExpected") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) | |||||
swapMismatch ∷ ∀ (r ∷ Relation) a. Mismatch r a → (a, a) Source #
Convert a Mismatch to a tuple that has "supplied" and "expected" swapped places
unswapMismatch ∷ ∀ a (r ∷ Relation). (a, a) → Mismatch r a Source #
Convert a tuple that has "supplied" and "expected" swapped places to a Mismatch type.
Injection
Aeson helpers
newtype KeyValuePairs a Source #
Constructors
| KeyValuePairs | |
Fields
| |
Instances
| ToKeyValuePairs a ⇒ ToJSON (KeyValuePairs a) Source # | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ KeyValuePairs a → Value Source # toEncoding ∷ KeyValuePairs a → Encoding Source # toJSONList ∷ [KeyValuePairs a] → Value Source # toEncodingList ∷ [KeyValuePairs a] → Encoding Source # omitField ∷ KeyValuePairs a → Bool Source # | |
class ToKeyValuePairs a where Source #
Methods
toKeyValuePairs ∷ KeyValue e kv ⇒ a → [kv] Source #
Instances
| ToKeyValuePairs Anchor Source # | |
Defined in Cardano.Ledger.BaseTypes Methods toKeyValuePairs ∷ KeyValue e kv ⇒ Anchor → [kv] Source # | |
| ToKeyValuePairs Ptr Source # | |
Defined in Cardano.Ledger.Credential Methods toKeyValuePairs ∷ KeyValue e kv ⇒ Ptr → [kv] Source # | |
| ToKeyValuePairs Reward Source # | |
Defined in Cardano.Ledger.Rewards Methods toKeyValuePairs ∷ KeyValue e kv ⇒ Reward → [kv] Source # | |
| ToKeyValuePairs InstantaneousRewards Source # | |
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ InstantaneousRewards → [kv] Source # | |
| ToKeyValuePairs ChainAccountState Source # | |
Defined in Cardano.Ledger.State.ChainAccount Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ChainAccountState → [kv] Source # | |
| ToKeyValuePairs IndividualPoolStake Source # | |
Defined in Cardano.Ledger.State.PoolDistr Methods toKeyValuePairs ∷ KeyValue e kv ⇒ IndividualPoolStake → [kv] Source # | |
| ToKeyValuePairs SnapShot Source # | |
Defined in Cardano.Ledger.State.SnapShots Methods toKeyValuePairs ∷ KeyValue e kv ⇒ SnapShot → [kv] Source # | |
| ToKeyValuePairs SnapShots Source # | |
Defined in Cardano.Ledger.State.SnapShots Methods toKeyValuePairs ∷ KeyValue e kv ⇒ SnapShots → [kv] Source # | |
| ToKeyValuePairs StakePoolSnapShot Source # | |
Defined in Cardano.Ledger.State.SnapShots Methods toKeyValuePairs ∷ KeyValue e kv ⇒ StakePoolSnapShot → [kv] Source # | |
| EraPParams era ⇒ ToKeyValuePairs (PParams era) Source # | |
Defined in Cardano.Ledger.Core.PParams Methods toKeyValuePairs ∷ KeyValue e kv ⇒ PParams era → [kv] Source # | |
| EraPParams era ⇒ ToKeyValuePairs (PParamsUpdate era) Source # | |
Defined in Cardano.Ledger.Core.PParams Methods toKeyValuePairs ∷ KeyValue e kv ⇒ PParamsUpdate era → [kv] Source # | |
| ToKeyValuePairs (NoGenesis era) Source # | |
Defined in Cardano.Ledger.Genesis Methods toKeyValuePairs ∷ KeyValue e kv ⇒ NoGenesis era → [kv] Source # | |
| ToJSON (Accounts era) ⇒ ToKeyValuePairs (DState era) Source # | |
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ DState era → [kv] Source # | |
| ToKeyValuePairs (PState era) Source # | |
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ PState era → [kv] Source # | |