From bcc4dbdbf86f7ddfd83199286bad47956b313456 Mon Sep 17 00:00:00 2001 From: Nicolas Frisby Date: Mon, 20 Jan 2020 19:48:23 -0800 Subject: [PATCH] consensus: orphan NFData SlotNo --- .../src/Ouroboros/Consensus/Util/Orphans.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ouroboros-consensus/src/Ouroboros/Consensus/Util/Orphans.hs b/ouroboros-consensus/src/Ouroboros/Consensus/Util/Orphans.hs index d64c7a48ebc..54eef730627 100644 --- a/ouroboros-consensus/src/Ouroboros/Consensus/Util/Orphans.hs +++ b/ouroboros-consensus/src/Ouroboros/Consensus/Util/Orphans.hs @@ -11,6 +11,7 @@ module Ouroboros.Consensus.Util.Orphans () where import Codec.CBOR.Decoding (Decoder) import Codec.Serialise (Serialise (..)) import Control.Concurrent.STM (readTVarIO) +import Control.DeepSeq (NFData (..)) import Control.Monad.Identity import Control.Monad.Trans import Crypto.Random @@ -33,7 +34,8 @@ import Cardano.Prelude (NoUnexpectedThunks (..), OnlyCheckIsWHNF (..), import Ouroboros.Network.AnchoredFragment (AnchoredFragment) import qualified Ouroboros.Network.AnchoredFragment as AF -import Ouroboros.Network.Block (HasHeader, HeaderHash, Point (..)) +import Ouroboros.Network.Block (HasHeader, HeaderHash, Point (..), + SlotNo (..)) import Ouroboros.Network.MockChain.Chain (Chain (..)) import Ouroboros.Network.Point (WithOrigin (..), blockPointHash, blockPointSlot) @@ -112,3 +114,9 @@ deriving via OnlyCheckIsWHNF "Decoder" (Decoder s a) instance NoUnexpectedThunks deriving via OnlyCheckIsWHNF "Tracer" (Tracer m ev) instance NoUnexpectedThunks (Tracer m ev) deriving newtype instance NoUnexpectedThunks Time + +{------------------------------------------------------------------------------- + NFData +-------------------------------------------------------------------------------} + +deriving newtype instance NFData SlotNo