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

NoThunks (EpochInfo m) Source # 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

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

The start of the given slot

Utility

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