Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data EpochInfo m = EpochInfo {}
- epochInfoSize ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m EpochSize
- epochInfoFirst ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m SlotNo
- epochInfoEpoch ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m EpochNo
- epochInfoRange ∷ Monad m ⇒ EpochInfo m → EpochNo → m (SlotNo, SlotNo)
- epochInfoSlotToRelativeTime ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m RelativeTime
- epochInfoSlotToUTCTime ∷ (HasCallStack, Monad m) ⇒ EpochInfo m → SystemStart → SlotNo → m UTCTime
- epochInfoSlotLength ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m SlotLength
- hoistEpochInfo ∷ (∀ a. m a → n a) → EpochInfo m → EpochInfo n
- generalizeEpochInfo ∷ Monad m ⇒ EpochInfo Identity → EpochInfo m
Documentation
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.
EpochInfo | |
|
epochInfoSize ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m EpochSize Source #
epochInfoFirst ∷ HasCallStack ⇒ EpochInfo m → EpochNo → m SlotNo Source #
epochInfoEpoch ∷ HasCallStack ⇒ EpochInfo m → SlotNo → m EpochNo Source #
epochInfoSlotToUTCTime ∷ (HasCallStack, Monad m) ⇒ EpochInfo m → SystemStart → SlotNo → 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 #