Skip to content

Commit 773ae8d

Browse files
Add NFDataX (SimOnly a)
1 parent 1346ac6 commit 773ae8d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ADDED: Added instance `NFDataX (SimOnly a)`

clash-prelude/src/Clash/Magic.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Refer to "Clash.Annotations.TopEntity" for controlling naming of entities
1717
-}
1818

1919
{-# LANGUAGE CPP #-}
20+
{-# LANGUAGE DeriveAnyClass #-}
2021
{-# LANGUAGE QuasiQuotes #-}
2122
{-# LANGUAGE TemplateHaskellQuotes #-}
2223

@@ -46,7 +47,9 @@ module Clash.Magic
4647
import Clash.Annotations.Primitive (Primitive(..), hasBlackBox)
4748
import Clash.NamedTypes ((:::))
4849
import Clash.Promoted.Symbol (SSymbol)
50+
import Clash.XException (NFDataX)
4951
import Data.String.Interpolate (__i)
52+
import GHC.Generics (Generic)
5053
import GHC.Magic (noinline)
5154
import GHC.Stack (HasCallStack, withFrozenCallStack)
5255
import GHC.TypeLits (Nat,Symbol)
@@ -272,7 +275,7 @@ clashSimulation = noinline True
272275
-- * Co-simulation state or meta-data
273276
-- * etc.
274277
data SimOnly a = SimOnly a
275-
deriving (Eq, Ord, Foldable, Traversable)
278+
deriving (Generic, Eq, Ord, Foldable, Traversable, NFDataX)
276279
{-# ANN SimOnly hasBlackBox #-}
277280

278281
instance Functor SimOnly where

0 commit comments

Comments
 (0)