cardano-ledger-core-0.1.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.BaseTypes

Synopsis

Documentation

data ProtVer Source #

Instances

Instances details
Eq ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBORGroup ProtVer Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBORGroup 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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' False ) ( C1 (' MetaCons "ProtVer" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "pvMajor") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Natural ) :*: S1 (' MetaSel (' Just "pvMinor") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Natural )))

data Network Source #

Constructors

Testnet
Mainnet

Instances

Instances details
Bounded Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Network Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Network = D1 (' MetaData "Network" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' False ) ( C1 (' MetaCons "Testnet" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Mainnet" ' PrefixI ' False ) ( U1 :: Type -> Type ))

data Nonce Source #

Evolving nonce type.

Instances

Instances details
Eq Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Nonce Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' False ) ( C1 (' MetaCons "Nonce" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Hash Blake2b_256 Nonce ))) :+: C1 (' MetaCons "NeutralNonce" ' PrefixI ' False ) ( U1 :: Type -> Type ))

newtype Seed Source #

Seed to the verifiable random function.

We do not expose the constructor to Seed . Instead, a Seed should be created using mkSeed for a VRF calculation.

Instances

Instances details
Eq Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Seed :: Type -> Type Source #

ToCBOR Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

SignableRepresentation Seed Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' True ) ( C1 (' MetaCons "Seed" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Hash Blake2b_256 Seed ))))

data UnitInterval Source #

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

Instances

Instances details
Bounded UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Default UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks UnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational 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
Bounded PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks PositiveUnitInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational 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
Bounded PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks PositiveInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational 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
Bounded NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks NonNegativeInterval Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

BoundedRational 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

boundRational :: Rational -> Maybe r Source #

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

Example

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

unboundRational :: r -> Rational Source #

Promote bounded rational type into the unbounded Rational .

boundedRationalFromCBOR :: BoundedRational r => Decoder s r Source #

Deserialize BoundedRational type using Rational deserialization and fail when bounds are violated.

mkNonceFromOutputVRF :: OutputVRF v -> Nonce Source #

Make a nonce from the VRF output bytes

mkNonceFromNumber :: Word64 -> Nonce Source #

Make a nonce from a number.

data Url Source #

Instances

Instances details
Eq Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Url :: Type -> Type Source #

NFData Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf :: Url -> () Source #

ToJSON Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Url Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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

data DnsName Source #

Instances

Instances details
Eq DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep DnsName Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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

newtype Port Source #

Constructors

Port

Instances

Instances details
Eq Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Num Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep Port :: Type -> Type Source #

NFData Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Port Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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

data ActiveSlotCoeff Source #

Instances

Instances details
Eq ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ActiveSlotCoeff Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR 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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' 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 crypto Source #

Blocks made

Instances

Instances details
Eq ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ( BlocksMade crypto) :: Type -> Type Source #

NFData ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnf :: BlocksMade crypto -> () Source #

Crypto crypto => ToJSON ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => FromJSON ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => ToCBOR ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => FromCBOR ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ( BlocksMade crypto) Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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

Indices

newtype TxIx Source #

Transaction index.

Constructors

TxIx Word64

Instances

Instances details
Bounded TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks TxIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

mkTxIxPartial :: HasCallStack => Integer -> TxIx Source #

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

newtype CertIx Source #

Certificate index. Use certIxFromIntegral in order to construct this index safely from anything other than Word16 . There is also mkCertIxPartial that can be used for testing.

Constructors

CertIx Word64

Instances

Instances details
Bounded CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Enum CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Eq CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Ord CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Show CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

NoThunks CertIx Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

mkCertIxPartial :: HasCallStack => Integer -> CertIx Source #

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

STS Base

data Globals Source #

Constructors

Globals

Fields

Instances

Instances details
Show Globals Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Globals Source #
Instance details

Defined in Cardano.Ledger.BaseTypes

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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' 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 "maxMajorPV") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Natural ) :*: 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.