cardano-slotting-0.2.0.0: Key slotting types for cardano libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Slotting.EpochInfo.API

Contents

Synopsis

Documentation

data EpochInfo m Source #

Information about epochs

Different epochs may have different sizes and different slot lengths. This information is encapsulated by EpochInfo. It is parameterized over a monad m because the information about how long each epoch is may depend on information derived from the blockchain itself. It ultimately requires acess to state, and so either uses the monad for that or uses the monad to reify failure due to cached state information being too stale for the current query.

Constructors

EpochInfo 

Fields

Instances

Instances details
Show (EpochInfo f) Source #

Unhelpful instance, but this type occurs in records (eg Shelley.Globals) that we want to be able to show

Instance details

Defined in Cardano.Slotting.EpochInfo.API

Methods

showsPrec ∷ Int → EpochInfo f → ShowS

showEpochInfo f → String

showList ∷ [EpochInfo f] → ShowS

NoThunks (EpochInfo m) Source # 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

Methods

noThunksContextEpochInfo m → IO (Maybe ThunkInfo) Source #

wNoThunksContextEpochInfo m → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (EpochInfo m) → String Source #

epochInfoSize ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m EpochSize Source #

epochInfoFirst ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m SlotNo Source #

epochInfoEpoch ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m EpochNo Source #

epochInfoRange ∷ Monad m ⇒ EpochInfo m → EpochNo → m (SlotNo, SlotNo) Source #

epochInfoSlotToUTCTime ∷ (HasCallStack, Monad m) ⇒ EpochInfo m → SystemStartSlotNo → m UTCTime Source #

The start of the given slot

epochInfoSlotLength ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m SlotLength Source #

Utility

hoistEpochInfo ∷ (∀ a. m a → n a) → EpochInfo m → EpochInfo n Source #

generalizeEpochInfo ∷ Monad m ⇒ EpochInfo Identity → EpochInfo m Source #