Skip to content

Commit de224fd

Browse files
Use data for Signed/Unsigned on GHC >= 9.12
Prevents `Numbers.Strict` test case from failing
1 parent c4f7c36 commit de224fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clash-prelude/src/Clash/Sized/Internal/Signed.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ type role Signed nominal
184184
--
185185
-- as it is not safe to coerce between different width Signed. To change the
186186
-- width, use the functions in the 'Clash.Class.Resize.Resize' class.
187-
#if MIN_VERSION_base(4,15,0) && !MIN_VERSION_base(4,17,0)
187+
#if (__GLASGOW_HASKELL__ >= 900 && __GLASGOW_HASKELL__ < 904) || __GLASGOW_HASKELL__ >= 912
188188
data Signed (n :: Nat) =
189189
-- | The constructor, 'S', and the field, 'unsafeToInteger', are not
190190
-- synthesizable.

clash-prelude/src/Clash/Sized/Internal/Unsigned.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ type role Unsigned nominal
200200
--
201201
-- as it is not safe to coerce between different width Unsigned. To change the
202202
-- width, use the functions in the 'Clash.Class.Resize.Resize' class.
203-
#if MIN_VERSION_base(4,15,0) && !MIN_VERSION_base(4,17,0)
203+
#if (__GLASGOW_HASKELL__ >= 900 && __GLASGOW_HASKELL__ < 904) || __GLASGOW_HASKELL__ >= 912
204204
data Unsigned (n :: Nat) =
205205
-- | The constructor, 'U', and the field, 'unsafeToNatural', are not
206206
-- synthesizable.

0 commit comments

Comments
 (0)