Skip to content

Commit

Permalink
Move ToExpr orphan to Orphans.ToExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed May 7, 2024
1 parent f99051a commit 76a4a10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Test.QuickCheck (choose, elements, shrink)
import qualified Test.StateMachine as QSM
import Test.StateMachine (Concrete, Symbolic)
import qualified Test.StateMachine.Types.Rank2 as QSM
import Test.Util.Orphans.ToExpr ()

----- the QSM model

Expand Down Expand Up @@ -590,8 +591,6 @@ instance TD.ToExpr Notable where toExpr = TD.defaultExprViaShow

----- orphans

instance TD.ToExpr SI.Time where toExpr = TD.defaultExprViaShow

deriving instance Read LedgerStateJudgement

instance QC.Arbitrary LedgerStateJudgement where
Expand Down
1 change: 1 addition & 0 deletions ouroboros-consensus/ouroboros-consensus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ library unstable-consensus-testlib
quiet,
random,
serialise,
si-timers,
sop-core,
sop-extras,
strict-checked-vars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

module Test.Util.Orphans.ToExpr () where

import qualified Control.Monad.Class.MonadTime.SI as SI
import Data.TreeDiff
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.HeaderValidation
Expand Down Expand Up @@ -37,3 +38,9 @@ instance ( ToExpr (ChainDepState (BlockProtocol blk))

instance ( ToExpr (TipInfo blk)
) => ToExpr (AnnTip blk)

{-------------------------------------------------------------------------------
si-timers
--------------------------------------------------------------------------------}

instance ToExpr SI.Time where toExpr = defaultExprViaShow

0 comments on commit 76a4a10

Please sign in to comment.