Skip to content

Commit 70c25e7

Browse files
committed
fixup do not remove birds feet from Tutorial.lhs
1 parent 421d6d9 commit 70c25e7

File tree

1 file changed

+12
-12
lines changed
  • ouroboros-consensus/src/unstable-tutorials/Ouroboros/Consensus/Tutorial

1 file changed

+12
-12
lines changed

ouroboros-consensus/src/unstable-tutorials/Ouroboros/Consensus/Tutorial/Simple.lhs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,34 +131,34 @@ Next, we instantiate the `ConsensusProtocol` for `SP`:
131131

132132
> instance ConsensusProtocol SP where
133133
> type SelectView SP = BlockNo
134-
134+
>
135135
> type LedgerView SP = ()
136-
136+
>
137137
> type IsLeader SP = SP_IsLeader
138138
> type CanBeLeader SP = SP_CanBeLeader
139-
139+
>
140140
> type ChainDepState SP = ()
141141
> type ValidateView SP = ()
142142
> type ValidationErr SP = Void
143-
143+
>
144144
> checkIsLeader cfg SP_CanBeLeader slot _tcds =
145145
> if slot `Set.member` cfgsp_slotsLedByMe cfg
146146
> then Just SP_IsLeader
147147
> else Nothing
148-
148+
>
149149
> protocolSecurityParam _cfg = k
150-
150+
>
151151
> tickChainDepState _ _ _ _ = TickedTrivial
152-
152+
>
153153
> updateChainDepState _ _ _ _ = return ()
154-
154+
>
155155
> reupdateChainDepState _ _ _ _ = ()
156156

157157
Finally we define a few extra things used in this instantiation:
158158

159159
> data SP_CanBeLeader = SP_CanBeLeader -- Evidence that we /can/ be a leader
160160
> data SP_IsLeader = SP_IsLeader -- Evidence that we /are/ leader
161-
161+
>
162162
> k :: SecurityParam
163163
> k = SecurityParam { maxRollbacks = 1 }
164164

@@ -535,7 +535,7 @@ number, we materialize that number in the `LedgerState`. We'll also need to
535535
keep track of some information about the most recent block we have seen.
536536

537537
> data instance LedgerState BlockC =
538-
538+
>
539539
> LedgerC
540540
> -- the hash and slot number of the most recent block
541541
> { lsbc_tip :: Point BlockC
@@ -570,7 +570,7 @@ types for a ledger. Though we are here using
570570
> instance IsLedger (LedgerState BlockC) where
571571
> type instance LedgerErr (LedgerState BlockC) = Void
572572
> type instance AuxLedgerEvent (LedgerState BlockC) = Void
573-
573+
>
574574
> applyChainTickLedgerResult _cfg _slot ldgrSt =
575575
> LedgerResult { lrEvents = []
576576
> , lrResult = TickedLedgerStateC ldgrSt
@@ -625,7 +625,7 @@ the `ApplyBlock` typeclass:
625625
> pure $ LedgerResult { lrEvents = []
626626
> , lrResult = block `applyBlockTo` tickedLdgrSt
627627
> }
628-
628+
>
629629
> reapplyBlockLedgerResult _ldgrCfg block tickedLdgrSt =
630630
> LedgerResult { lrEvents = []
631631
> , lrResult = block `applyBlockTo` tickedLdgrSt

0 commit comments

Comments
 (0)