ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.State.Infra

Synopsis

Initialization

initHardForkState ∷ ∀ f x (xs ∷ [Type]). f x → HardForkState f (x ': xs) Source #

Lifting Telescope operations

fromTZ ∷ HardForkState f '[blk] → f blk Source #

match ∷ ∀ (xs ∷ [Type]) (h ∷ Type → Type) (f ∷ Type → Type). SListI xs ⇒ NS h xs → HardForkState f xs → Either (Mismatch h (Current f) xs) (HardForkState (Product h f) xs) Source #

sequence ∷ ∀ (f ∷ Type → Type) m (xs ∷ [Type]). (SListI xs, Functor m) ⇒ HardForkState (m :.: f) xs → m (HardForkState f xs) Source #

tip ∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type). SListI xs ⇒ HardForkState f xs → NS f xs Source #

Situated

data Situated (h ∷ Type → Type) (f ∷ Type → Type) (xs ∷ [Type]) where Source #

A h situated in time

Constructors

SituatedCurrent ∷ ∀ (f ∷ Type → Type) x (h ∷ Type → Type) (xs1 ∷ [Type]). Current f x → h x → Situated h f (x ': xs1) 
SituatedNext ∷ ∀ (f ∷ Type → Type) x (h ∷ Type → Type) y (xs1 ∷ [Type]). Current f x → h y → Situated h f (x ': (y ': xs1)) 
SituatedFuture ∷ ∀ (f ∷ Type → Type) x (h ∷ Type → Type) (xs1 ∷ [Type]) y. Current f x → NS h xs1 → Situated h f (x ': (y ': xs1)) 
SituatedPast ∷ ∀ x (h ∷ Type → Type) (f ∷ Type → Type) (xs1 ∷ [Type]). K Past x → h x → Situated h f (x ': xs1) 
SituatedShift ∷ ∀ (h ∷ Type → Type) (f ∷ Type → Type) (xs1 ∷ [Type]) x. Situated h f xs1 → Situated h f (x ': xs1) 

situate ∷ ∀ (h ∷ Type → Type) (xs ∷ [Type]) (f ∷ Type → Type). NS h xs → HardForkState f xs → Situated h f xs Source #

Aligning

align Source #

Arguments

∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type) (f' ∷ Type → Type) (f'' ∷ Type → Type). All SingleEraBlock xs 
⇒ InPairs (Translate f) xs 
→ NP (f' -.-> (f -.-> f'')) xs 
→ HardForkState f' xs

State we are aligning with

→ HardForkState f xs

State we are aligning

→ HardForkState f'' xs 

EpochInfo/Summary

reconstructSummary Source #

Arguments

∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type). Shape xs 
→ TransitionInfo

At the tip

→ HardForkState f xs 
→ Summary xs