Skip to content

Commit 5c6d8f1

Browse files
Add GHC 9.12 support to clash-cosim
1 parent 5a28ec7 commit 5c6d8f1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

clash-cosim/src/Clash/CoSim/Types.hs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE ConstraintKinds #-}
23
{-# LANGUAGE DeriveDataTypeable #-}
4+
{-# LANGUAGE DerivingStrategies #-}
35
{-# LANGUAGE FlexibleContexts #-}
46

57
{-|
@@ -11,7 +13,10 @@ be housed in Simulator.hs, but FFI code crashes Template Haskell.
1113
-}
1214
module Clash.CoSim.Types where
1315

14-
import Data.Data (Data, Typeable)
16+
import Data.Data (Data)
17+
#if __GLASGOW_HASKELL__ <= 910
18+
import Data.Data (Typeable)
19+
#endif
1520

1621
import Clash.Prelude (BitPack, BitSize, KnownNat)
1722
import Clash.XException (NFDataX)
@@ -28,7 +33,10 @@ data CoSimSettings = CoSimSettings
2833
-- ^ Include files while running simulator
2934
, enableStdout :: Bool
3035
-- ^ Print verbose output to stdout
31-
} deriving (Show, Typeable, Data)
36+
} deriving (Show, Data)
37+
#if __GLASGOW_HASKELL__ <= 910
38+
deriving Typeable
39+
#endif
3240

3341
-- | Default simulator settings use Icarus, have a period of 20 and all other
3442
-- options disabled.
@@ -53,4 +61,7 @@ data CoSimulator = Icarus
5361
-- ^ https://github.com/steveicarus/iverilog
5462
| ModelSim
5563
-- ^ https://www.mentor.com/products/fv/modelsim/
56-
deriving (Show, Eq, Typeable, Data)
64+
deriving (Show, Eq, Data)
65+
#if __GLASGOW_HASKELL__ <= 910
66+
deriving Typeable
67+
#endif

0 commit comments

Comments
 (0)