Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Compat
Contents
Synopsis
- data HardForkCompatQuery blk (fp ∷ QueryFootprint) result where
- CompatIfCurrent ∷ ∀ blk (fp ∷ QueryFootprint) result. BlockQuery blk fp result → HardForkCompatQuery blk fp result
- CompatAnytime ∷ ∀ result blk. QueryAnytime result → EraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables result
- CompatHardFork ∷ ∀ blk result. QueryHardFork (HardForkIndices blk) result → HardForkCompatQuery blk 'QFNoTables result
- compatGetEraStart ∷ EraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables (Maybe Bound)
- compatGetInterpreter ∷ HardForkCompatQuery blk 'QFNoTables (Interpreter (HardForkIndices blk))
- compatIfCurrent ∷ ∀ fp (blk ∷ QueryFootprint) result. BlockQuery fp blk result → HardForkCompatQuery fp blk result
- forwardCompatQuery ∷ ∀ m x (xs ∷ [Type]) (fp ∷ QueryFootprint). IsNonEmpty xs ⇒ (∀ result. BlockQuery (HardForkBlock (x ': xs)) fp result → m result) → ∀ result. HardForkCompatQuery (HardForkBlock (x ': xs)) fp result → m result
- singleEraCompatQuery ∷ ∀ m blk era (fp ∷ QueryFootprint). (Monad m, HardForkIndices blk ~ '[era]) ⇒ EpochSize → SlotLength → GenesisWindow → (∀ result. BlockQuery blk fp result → m result) → ∀ result. HardForkCompatQuery blk fp result → m result
Documentation
data HardForkCompatQuery blk (fp ∷ QueryFootprint) result where Source #
Version of Query (HardForkBlock xs)
without the restriction to have
at least two eras
Constructors
CompatIfCurrent ∷ ∀ blk (fp ∷ QueryFootprint) result. BlockQuery blk fp result → HardForkCompatQuery blk fp result | |
CompatAnytime ∷ ∀ result blk. QueryAnytime result → EraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables result | |
CompatHardFork ∷ ∀ blk result. QueryHardFork (HardForkIndices blk) result → HardForkCompatQuery blk 'QFNoTables result |
Convenience constructors
compatGetEraStart ∷ EraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables (Maybe Bound) Source #
Get the start of the specified era, if known
compatGetInterpreter ∷ HardForkCompatQuery blk 'QFNoTables (Interpreter (HardForkIndices blk)) Source #
Get an interpreter for history queries
I.e., this can be used for slotepochtime conversions.
compatIfCurrent ∷ ∀ fp (blk ∷ QueryFootprint) result. BlockQuery fp blk result → HardForkCompatQuery fp blk result Source #
Submit query to underlying ledger
Wrappers
Arguments
∷ ∀ m x (xs ∷ [Type]) (fp ∷ QueryFootprint). IsNonEmpty xs | |
⇒ (∀ result. BlockQuery (HardForkBlock (x ': xs)) fp result → m result) | Submit a query through the LocalStateQuery protocol. |
→ ∀ result. HardForkCompatQuery (HardForkBlock (x ': xs)) fp result | |
→ m result |
Wrapper used when connecting to a server that's running the HFC with at least two eras
Arguments
∷ ∀ m blk era (fp ∷ QueryFootprint). (Monad m, HardForkIndices blk ~ '[era]) | |
⇒ EpochSize | |
→ SlotLength | |
→ GenesisWindow | |
→ (∀ result. BlockQuery blk fp result → m result) | Submit a query through the LocalStateQuery protocol. |
→ ∀ result. HardForkCompatQuery blk fp result | |
→ m result |
Wrapper used when connecting to a server that's not using the HFC, or is using the HFC but with a single era only.