Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bartfrenk committed Nov 30, 2022
1 parent c3860a5 commit d49f21b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ouroboros-consensus-test/test-examples/Test/Tutorial2.lhs
Expand Up @@ -46,14 +46,15 @@ Setup

As before, we require a few language extensions:

> {-# OPTIONS_GHC -Wno-unused-top-binds #-}
> {-# LANGUAGE TypeFamilies #-}
> {-# LANGUAGE DerivingVia #-}
> {-# LANGUAGE DataKinds #-}
> {-# LANGUAGE DeriveGeneric #-}
> {-# LANGUAGE FlexibleInstances #-}
> {-# LANGUAGE DeriveAnyClass #-}
> {-# LANGUAGE MultiParamTypeClasses #-}
> {-# LANGUAGE GeneralizedNewtypeDeriving #-}
> {-# LANGUAGE DeriveAnyClass #-}
> {-# LANGUAGE StandaloneDeriving #-}

> module Test.Tutorial2() where
Expand Down Expand Up @@ -338,7 +339,8 @@ is still very simple:
> TickedLedgerStateD {
> unTickedLedgerStateD :: LedgerState BlockD
> }
> deriving (Show, Eq, Generic, Serialise, NoThunks)
> deriving stock (Show, Eq, Generic)
> deriving newtype (NoThunks, Serialise)

Because the ledger now needs to track the snapshots in `lsbd_snapshot1`
and `lsbd_snapshot2` we
Expand Down Expand Up @@ -483,12 +485,14 @@ for `PrtclD` will simply be the snapshot (though we could have
just as easily used a `Bool` representing the parity):

> newtype LedgerViewD = LVD Word64
> deriving (Show, Eq, Generic, Serialise, NoThunks)
> deriving stock (Show, Eq, Generic)
> deriving newtype (Serialise, NoThunks)

We also define a trivial `Ticked LedgerViewD` instance:

> newtype instance Ticked LedgerViewD = TickedLedgerViewD LedgerViewD
> deriving (Show, Eq, Generic, Serialise, NoThunks)
> deriving stock (Show, Eq, Generic)
> deriving newtype (Serialise, NoThunks)

The parity of the epoch snapshot and the slot are together _sufficient_
to determine the leadership schedule. As such, we do not need
Expand Down

0 comments on commit d49f21b

Please sign in to comment.