Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
class
Inject
f
where
- inject :: forall x xs. CanHardFork xs => Exactly xs Bound -> Index xs x -> f x -> f ( HardForkBlock xs)
- inject' :: forall f a b x xs. ( Inject f, CanHardFork xs, Coercible a (f x), Coercible b (f ( HardForkBlock xs))) => Proxy f -> Exactly xs Bound -> Index xs x -> a -> b
- injectHardForkState :: forall f x xs. Exactly xs Bound -> Index xs x -> f x -> HardForkState f xs
- injectNestedCtxt_ :: forall f x xs a. Index xs x -> NestedCtxt_ x f a -> NestedCtxt_ ( HardForkBlock xs) f a
- injectQuery :: forall x xs result. Index xs x -> BlockQuery x result -> QueryIfCurrent xs result
- injectInitialExtLedgerState :: forall x xs. CanHardFork (x ': xs) => TopLevelConfig ( HardForkBlock (x ': xs)) -> ExtLedgerState x -> ExtLedgerState ( HardForkBlock (x ': xs))
Documentation
:: forall x xs. CanHardFork xs | |
=> Exactly xs Bound |
Start bound of each era |
-> Index xs x | |
-> f x | |
-> f ( HardForkBlock xs) |
Instances
inject' :: forall f a b x xs. ( Inject f, CanHardFork xs, Coercible a (f x), Coercible b (f ( HardForkBlock xs))) => Proxy f -> Exactly xs Bound -> Index xs x -> a -> b Source #
Defaults
:: forall f x xs. Exactly xs Bound |
Start bound of each era |
-> Index xs x | |
-> f x | |
-> HardForkState f xs |
injectNestedCtxt_ :: forall f x xs a. Index xs x -> NestedCtxt_ x f a -> NestedCtxt_ ( HardForkBlock xs) f a Source #
injectQuery :: forall x xs result. Index xs x -> BlockQuery x result -> QueryIfCurrent xs result Source #
Initial
ExtLedgerState
injectInitialExtLedgerState :: forall x xs. CanHardFork (x ': xs) => TopLevelConfig ( HardForkBlock (x ': xs)) -> ExtLedgerState x -> ExtLedgerState ( HardForkBlock (x ': xs)) Source #
Inject the first era's initial
ExtLedgerState
and trigger any
translations that should take place in the very first slot.
Performs any hard forks scheduled via
TriggerHardForkAtEpoch
.
Note: we can translate across multiple eras when computing the initial ledger
state, but we do not support translation across multiple eras in general;
extending
applyChainTick
to translate across more than one era is not
problematic, but extending
ledgerViewForecastAt
is a lot more subtle; see
forecastNotFinal
.