| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Protocol.ChainSel
Description
Infrastructure for doing chain selection across eras
Synopsis
- data AcrossEraMode (cfg ∷ Type → Type) (f ∷ [Type] → Type) where
- data AcrossEraTiebreaker a b where
- NoTiebreakerAcrossEras ∷ ∀ a b. AcrossEraTiebreaker a b
- SameTiebreakerAcrossEras ∷ ∀ a b. TiebreakerView (BlockProtocol a) ~ TiebreakerView (BlockProtocol b) ⇒ AcrossEraTiebreaker a b
- acrossEraSelection ∷ ∀ (xs ∷ [Type]) (cfg ∷ Type → Type) f. (All SingleEraBlock xs, AcrossEraOutput f) ⇒ AcrossEraMode cfg f → NP cfg xs → Tails AcrossEraTiebreaker xs → NS WrapTiebreakerView xs → NS WrapTiebreakerView xs → f xs
- newtype SwitchOutput (xs ∷ [Type]) = SwitchOutput {}
- newtype OneEraReasonForSwitch (xs ∷ [Type]) = OneEraReasonForSwitch {}
- newtype ConstOutput a (xs ∷ k) = ConstOutput {
- getConstOutput ∷ a
Documentation
data AcrossEraMode (cfg ∷ Type → Type) (f ∷ [Type] → Type) where Source #
GADT indicating whether we are lifting compare or preferCandidate to
the HFC, together with the type of configuration we need for that and the
result type. The result type indicates whether we expect something that
changes between eras or some constant output.
Constructors
| AcrossEraCompare ∷ AcrossEraMode (Proxy ∷ Type → Type) (ConstOutput Ordering ∷ [Type] → Type) | |
| AcrossEraPreferCandidate ∷ AcrossEraMode WrapChainOrderConfig SwitchOutput |
data AcrossEraTiebreaker a b where Source #
How to compare chains of equal length across eras.
Constructors
| NoTiebreakerAcrossEras ∷ ∀ a b. AcrossEraTiebreaker a b | No preference. |
| SameTiebreakerAcrossEras ∷ ∀ a b. TiebreakerView (BlockProtocol a) ~ TiebreakerView (BlockProtocol b) ⇒ AcrossEraTiebreaker a b | Two eras using the same We use the |
acrossEraSelection ∷ ∀ (xs ∷ [Type]) (cfg ∷ Type → Type) f. (All SingleEraBlock xs, AcrossEraOutput f) ⇒ AcrossEraMode cfg f → NP cfg xs → Tails AcrossEraTiebreaker xs → NS WrapTiebreakerView xs → NS WrapTiebreakerView xs → f xs Source #
newtype SwitchOutput (xs ∷ [Type]) Source #
- Switch Instance (Covariant)
Constructors
| SwitchOutput | |
Fields | |
newtype OneEraReasonForSwitch (xs ∷ [Type]) Source #
Constructors
| OneEraReasonForSwitch | |
Fields | |
Instances
| CanHardFork xs ⇒ Show (OneEraReasonForSwitch xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Methods showsPrec ∷ Int → OneEraReasonForSwitch xs → ShowS # show ∷ OneEraReasonForSwitch xs → String # showList ∷ [OneEraReasonForSwitch xs] → ShowS # | |
newtype ConstOutput a (xs ∷ k) Source #
- Ordering Instance (Invariant)
Constructors
| ConstOutput | |
Fields
| |