Skip to content

Commit

Permalink
try Word32# for base 4.15.0 and later.
Browse files Browse the repository at this point in the history
  • Loading branch information
julialongtin committed Dec 15, 2023
1 parent 292de95 commit 4b3d01f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Data/Bits/Floating/Prim.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@ module Data.Bits.Floating.Prim (
import GHC.Exts (Double#, Double(D#), Float#, Float(F#))
import GHC.Word (Word32(W32#), Word64(W64#))


#if WORD_SIZE_IN_BITS == 64 && MIN_VERSION_base(4,17,0)
-- The name of Word# changed to Word64# in ghc 9.4.1
import GHC.Exts (Word64#, Word32#)

#define WORD64 Word64
#define WORD32 Word32
#elif WORD_SIZE_IN_BITS == 64
import GHC.Exts (Word#)

#define WORD64 Word
#if MIN_VERSION_base(4,15,0)
#define WORD32 Word
#else
import GHC.Exts (Word32#)
#define WORD32 Word32
#endif
#else
#error non-X86_64 architectures not supported
#endif

Expand Down

0 comments on commit 4b3d01f

Please sign in to comment.