Skip to content

Commit 7337851

Browse files
authored
Merge pull request #5214 from IntersectMBO/node-to-node-version-nothunks
Derive NoThunks for NodeToNodeVersion
2 parents b56b1a6 + 464173f commit 7337851

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Added `NoThunks` instance for `NodeToNodeVersion`.
4+

ouroboros-network-api/src/Ouroboros/Network/NodeToNode/Version.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Codec.CBOR.Term qualified as CBOR
1919

2020
import Control.DeepSeq
2121
import GHC.Generics
22+
import NoThunks.Class (NoThunks)
2223
import Ouroboros.Network.CodecCBORTerm
2324
import Ouroboros.Network.Handshake.Acceptable (Accept (..), Acceptable (..))
2425
import Ouroboros.Network.Handshake.Queryable (Queryable (..))
@@ -70,7 +71,7 @@ data NodeToNodeVersion =
7071
-- ^ Plomin HF, mandatory on mainnet as of 2025.01.29
7172
| NodeToNodeV_15
7273
-- ^ SRV support
73-
deriving (Eq, Ord, Enum, Bounded, Show, Generic, NFData)
74+
deriving (Eq, Ord, Enum, Bounded, Show, Generic, NFData, NoThunks)
7475

7576
nodeToNodeVersionCodec :: CodecCBORTerm (Text, Maybe Int) NodeToNodeVersion
7677
nodeToNodeVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }

0 commit comments

Comments
 (0)