Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Newtypes around type families so that they can be partially applied
Synopsis
- newtype WrapApplyTxErr blk = WrapApplyTxErr {
- unwrapApplyTxErr ∷ ApplyTxErr blk
- newtype WrapCannotForge blk = WrapCannotForge {
- unwrapCannotForge ∷ CannotForge blk
- newtype WrapEnvelopeErr blk = WrapEnvelopeErr {}
- newtype WrapForgeStateInfo blk = WrapForgeStateInfo {}
- newtype WrapForgeStateUpdateError blk = WrapForgeStateUpdateError {}
- newtype WrapGenTxId blk = WrapGenTxId {
- unwrapGenTxId ∷ GenTxId blk
- newtype WrapHeaderHash blk = WrapHeaderHash {
- unwrapHeaderHash ∷ HeaderHash blk
- newtype WrapLedgerConfig blk = WrapLedgerConfig {}
- newtype WrapLedgerErr blk = WrapLedgerErr {
- unwrapLedgerErr ∷ LedgerError blk
- newtype WrapLedgerEvent blk = WrapLedgerEvent {}
- newtype WrapLedgerUpdate blk = WrapLedgerUpdate {}
- newtype WrapLedgerWarning blk = WrapLedgerWarning {}
- newtype WrapTentativeHeaderState blk = WrapTentativeHeaderState {}
- newtype WrapTentativeHeaderView blk = WrapTentativeHeaderView {}
- newtype WrapTipInfo blk = WrapTipInfo {
- unwrapTipInfo ∷ TipInfo blk
- newtype WrapTxMeasure blk = WrapTxMeasure {
- unwrapTxMeasure ∷ TxMeasure blk
- newtype WrapValidatedGenTx blk = WrapValidatedGenTx {
- unwrapValidatedGenTx ∷ Validated (GenTx blk)
- newtype WrapCanBeLeader blk = WrapCanBeLeader {}
- newtype WrapChainDepState blk = WrapChainDepState {}
- newtype WrapChainOrderConfig blk = WrapChainOrderConfig {}
- newtype WrapConsensusConfig blk = WrapConsensusConfig {}
- newtype WrapIsLeader blk = WrapIsLeader {
- unwrapIsLeader ∷ IsLeader (BlockProtocol blk)
- newtype WrapLedgerView blk = WrapLedgerView {
- unwrapLedgerView ∷ LedgerView (BlockProtocol blk)
- newtype WrapSelectView blk = WrapSelectView {
- unwrapSelectView ∷ SelectView (BlockProtocol blk)
- newtype WrapValidateView blk = WrapValidateView {}
- newtype WrapValidationErr blk = WrapValidationErr {}
- newtype WrapNodeToClientVersion blk = WrapNodeToClientVersion {}
- newtype WrapNodeToNodeVersion blk = WrapNodeToNodeVersion {}
- data family Ticked st ∷ Type
Block based
newtype WrapApplyTxErr blk Source #
Instances
newtype WrapCannotForge blk Source #
Instances
Isomorphic WrapCannotForge Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapCannotForge (HardForkBlock '[blk]) → WrapCannotForge blk Source # inject ∷ NoHardForks blk ⇒ WrapCannotForge blk → WrapCannotForge (HardForkBlock '[blk]) Source # | |
Show (CannotForge blk) ⇒ Show (WrapCannotForge blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapCannotForge blk → ShowS # show ∷ WrapCannotForge blk → String # showList ∷ [WrapCannotForge blk] → ShowS # |
newtype WrapEnvelopeErr blk Source #
Instances
Isomorphic WrapEnvelopeErr Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapEnvelopeErr (HardForkBlock '[blk]) → WrapEnvelopeErr blk Source # inject ∷ NoHardForks blk ⇒ WrapEnvelopeErr blk → WrapEnvelopeErr (HardForkBlock '[blk]) Source # | |
Show (OtherHeaderEnvelopeError blk) ⇒ Show (WrapEnvelopeErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapEnvelopeErr blk → ShowS # show ∷ WrapEnvelopeErr blk → String # showList ∷ [WrapEnvelopeErr blk] → ShowS # | |
Eq (OtherHeaderEnvelopeError blk) ⇒ Eq (WrapEnvelopeErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapEnvelopeErr blk → WrapEnvelopeErr blk → Bool # (/=) ∷ WrapEnvelopeErr blk → WrapEnvelopeErr blk → Bool # | |
NoThunks (OtherHeaderEnvelopeError blk) ⇒ NoThunks (WrapEnvelopeErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers |
newtype WrapForgeStateInfo blk Source #
Instances
Isomorphic WrapForgeStateInfo Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapForgeStateInfo (HardForkBlock '[blk]) → WrapForgeStateInfo blk Source # inject ∷ NoHardForks blk ⇒ WrapForgeStateInfo blk → WrapForgeStateInfo (HardForkBlock '[blk]) Source # | |
Show (ForgeStateInfo blk) ⇒ Show (WrapForgeStateInfo blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapForgeStateInfo blk → ShowS # show ∷ WrapForgeStateInfo blk → String # showList ∷ [WrapForgeStateInfo blk] → ShowS # |
newtype WrapForgeStateUpdateError blk Source #
Instances
Isomorphic WrapForgeStateUpdateError Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapForgeStateUpdateError (HardForkBlock '[blk]) → WrapForgeStateUpdateError blk Source # inject ∷ NoHardForks blk ⇒ WrapForgeStateUpdateError blk → WrapForgeStateUpdateError (HardForkBlock '[blk]) Source # | |
Show (ForgeStateUpdateError blk) ⇒ Show (WrapForgeStateUpdateError blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapForgeStateUpdateError blk → ShowS # show ∷ WrapForgeStateUpdateError blk → String # showList ∷ [WrapForgeStateUpdateError blk] → ShowS # |
newtype WrapGenTxId blk Source #
WrapGenTxId | |
|
Instances
newtype WrapHeaderHash blk Source #
Instances
Inject WrapHeaderHash Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs Bound → Index xs x → WrapHeaderHash x → WrapHeaderHash (HardForkBlock xs) Source # | |
Isomorphic WrapHeaderHash Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapHeaderHash (HardForkBlock '[blk]) → WrapHeaderHash blk Source # inject ∷ NoHardForks blk ⇒ WrapHeaderHash blk → WrapHeaderHash (HardForkBlock '[blk]) Source # |
newtype WrapLedgerConfig blk Source #
newtype WrapLedgerErr blk Source #
Instances
Isomorphic WrapLedgerErr Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapLedgerErr (HardForkBlock '[blk]) → WrapLedgerErr blk Source # inject ∷ NoHardForks blk ⇒ WrapLedgerErr blk → WrapLedgerErr (HardForkBlock '[blk]) Source # | |
Show (LedgerError blk) ⇒ Show (WrapLedgerErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapLedgerErr blk → ShowS # show ∷ WrapLedgerErr blk → String # showList ∷ [WrapLedgerErr blk] → ShowS # | |
Eq (LedgerError blk) ⇒ Eq (WrapLedgerErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapLedgerErr blk → WrapLedgerErr blk → Bool # (/=) ∷ WrapLedgerErr blk → WrapLedgerErr blk → Bool # | |
NoThunks (LedgerError blk) ⇒ NoThunks (WrapLedgerErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers |
newtype WrapLedgerEvent blk Source #
newtype WrapLedgerUpdate blk Source #
Instances
Show (LedgerUpdate blk) ⇒ Show (WrapLedgerUpdate blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapLedgerUpdate blk → ShowS # show ∷ WrapLedgerUpdate blk → String # showList ∷ [WrapLedgerUpdate blk] → ShowS # | |
Eq (LedgerUpdate blk) ⇒ Eq (WrapLedgerUpdate blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapLedgerUpdate blk → WrapLedgerUpdate blk → Bool # (/=) ∷ WrapLedgerUpdate blk → WrapLedgerUpdate blk → Bool # |
newtype WrapLedgerWarning blk Source #
Instances
Show (LedgerWarning blk) ⇒ Show (WrapLedgerWarning blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapLedgerWarning blk → ShowS # show ∷ WrapLedgerWarning blk → String # showList ∷ [WrapLedgerWarning blk] → ShowS # | |
Eq (LedgerWarning blk) ⇒ Eq (WrapLedgerWarning blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapLedgerWarning blk → WrapLedgerWarning blk → Bool # (/=) ∷ WrapLedgerWarning blk → WrapLedgerWarning blk → Bool # |
newtype WrapTentativeHeaderState blk Source #
Instances
newtype WrapTentativeHeaderView blk Source #
Instances
Show (TentativeHeaderView blk) ⇒ Show (WrapTentativeHeaderView blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapTentativeHeaderView blk → ShowS # show ∷ WrapTentativeHeaderView blk → String # showList ∷ [WrapTentativeHeaderView blk] → ShowS # | |
Eq (TentativeHeaderView blk) ⇒ Eq (WrapTentativeHeaderView blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapTentativeHeaderView blk → WrapTentativeHeaderView blk → Bool # (/=) ∷ WrapTentativeHeaderView blk → WrapTentativeHeaderView blk → Bool # |
newtype WrapTipInfo blk Source #
WrapTipInfo | |
|
Instances
newtype WrapTxMeasure blk Source #
newtype WrapValidatedGenTx blk Source #
A data family wrapper for Validated
. GenTx
Validated
is is data family, so this is an outlier in this module full of
type family wrappers. However, the standard functor composition operator f
:.: g
incurs some type classes instances that are inappropriate when the
outer type constructor f
is a family and hence non-parametric (eg
requires @Eq
(f
:.: g)Eq1
f)). The bespoke composition
WrapValidatedGenTx
therefore serves much the same purpose as the other
wrappers in this module.
Instances
Isomorphic WrapValidatedGenTx Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapValidatedGenTx (HardForkBlock '[blk]) → WrapValidatedGenTx blk Source # inject ∷ NoHardForks blk ⇒ WrapValidatedGenTx blk → WrapValidatedGenTx (HardForkBlock '[blk]) Source # | |
Show (Validated (GenTx blk)) ⇒ Show (WrapValidatedGenTx blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapValidatedGenTx blk → ShowS # show ∷ WrapValidatedGenTx blk → String # showList ∷ [WrapValidatedGenTx blk] → ShowS # | |
Eq (Validated (GenTx blk)) ⇒ Eq (WrapValidatedGenTx blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapValidatedGenTx blk → WrapValidatedGenTx blk → Bool # (/=) ∷ WrapValidatedGenTx blk → WrapValidatedGenTx blk → Bool # | |
NoThunks (Validated (GenTx blk)) ⇒ NoThunks (WrapValidatedGenTx blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers |
Protocol based
newtype WrapCanBeLeader blk Source #
Instances
Isomorphic WrapCanBeLeader Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapCanBeLeader (HardForkBlock '[blk]) → WrapCanBeLeader blk Source # inject ∷ NoHardForks blk ⇒ WrapCanBeLeader blk → WrapCanBeLeader (HardForkBlock '[blk]) Source # |
newtype WrapChainDepState blk Source #
Instances
newtype WrapChainOrderConfig blk Source #
newtype WrapConsensusConfig blk Source #
newtype WrapIsLeader blk Source #
Instances
Isomorphic WrapIsLeader Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapIsLeader (HardForkBlock '[blk]) → WrapIsLeader blk Source # inject ∷ NoHardForks blk ⇒ WrapIsLeader blk → WrapIsLeader (HardForkBlock '[blk]) Source # |
newtype WrapLedgerView blk Source #
Instances
Isomorphic WrapLedgerView Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project ∷ NoHardForks blk ⇒ WrapLedgerView (HardForkBlock '[blk]) → WrapLedgerView blk Source # inject ∷ NoHardForks blk ⇒ WrapLedgerView blk → WrapLedgerView (HardForkBlock '[blk]) Source # | |
Show (LedgerView (BlockProtocol blk)) ⇒ Show (WrapLedgerView blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapLedgerView blk → ShowS # show ∷ WrapLedgerView blk → String # showList ∷ [WrapLedgerView blk] → ShowS # | |
CanHardFork xs ⇒ Show (HardForkLedgerView_ WrapLedgerView xs) Source # | |
newtype WrapSelectView blk Source #
Instances
newtype WrapValidateView blk Source #
newtype WrapValidationErr blk Source #
Instances
Show (ValidationErr (BlockProtocol blk)) ⇒ Show (WrapValidationErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapValidationErr blk → ShowS # show ∷ WrapValidationErr blk → String # showList ∷ [WrapValidationErr blk] → ShowS # | |
Eq (ValidationErr (BlockProtocol blk)) ⇒ Eq (WrapValidationErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapValidationErr blk → WrapValidationErr blk → Bool # (/=) ∷ WrapValidationErr blk → WrapValidationErr blk → Bool # | |
NoThunks (ValidationErr (BlockProtocol blk)) ⇒ NoThunks (WrapValidationErr blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers |
Versioning
newtype WrapNodeToClientVersion blk Source #
Instances
Show (BlockNodeToClientVersion blk) ⇒ Show (WrapNodeToClientVersion blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapNodeToClientVersion blk → ShowS # show ∷ WrapNodeToClientVersion blk → String # showList ∷ [WrapNodeToClientVersion blk] → ShowS # | |
Eq (BlockNodeToClientVersion blk) ⇒ Eq (WrapNodeToClientVersion blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapNodeToClientVersion blk → WrapNodeToClientVersion blk → Bool # (/=) ∷ WrapNodeToClientVersion blk → WrapNodeToClientVersion blk → Bool # |
newtype WrapNodeToNodeVersion blk Source #
Instances
Show (BlockNodeToNodeVersion blk) ⇒ Show (WrapNodeToNodeVersion blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers showsPrec ∷ Int → WrapNodeToNodeVersion blk → ShowS # show ∷ WrapNodeToNodeVersion blk → String # showList ∷ [WrapNodeToNodeVersion blk] → ShowS # | |
Eq (BlockNodeToNodeVersion blk) ⇒ Eq (WrapNodeToNodeVersion blk) Source # | |
Defined in Ouroboros.Consensus.TypeFamilyWrappers (==) ∷ WrapNodeToNodeVersion blk → WrapNodeToNodeVersion blk → Bool # (/=) ∷ WrapNodeToNodeVersion blk → WrapNodeToNodeVersion blk → Bool # |
Type family instances
data family Ticked st ∷ Type Source #
" Ticked " piece of state, either LedgerState
or ChainDepState
Ticking refers to the passage of time (the ticking of the clock). When a
piece of state is marked as ticked, it means that time-related changes have
been applied to the state. There are exactly two methods in the interface
that do that: tickChainDepState
and
applyChainTickLedgerResult
.
Also note that a successful forecast
must equal
forecastFor
(ledgerViewForecastAt
cfg st)
slot
. Thus a
protocolLedgerView
cfg
(applyChainTick
cfg slot st)LedgerView
can only be projected
from a Ticked
state, but cannot itself be ticked.
Some examples of time related changes:
- Scheduled delegations might have been applied in Byron
- New leader schedule computed for Shelley
- Transition from Byron to Shelley activated in the hard fork combinator.
- Nonces switched out at the start of a new epoch.