Skip to content

Commit

Permalink
Fix for machines with 64bit word and base >= 4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
kubek2k committed Feb 8, 2023
1 parent 4bdc818 commit 7b94c5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cborg/src/Codec/CBOR/Magic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,15 @@ grabWord64 (Ptr ip#) =
#endif

#if WORD_SIZE_IN_BITS == 64
#if MIN_VERSION_base(4,17,0)
-- case taken from Codec.CBOR.Decoding
w64 w# = W64# (wordToWord64# (toWord w#))
#else
w64 w# = W64# (toWord w#)
#endif
#else
w64 w# = W64# (wordToWord64# (toWord w#))
#endif

#endif

--------------------------------------------------------------------------------
Expand Down

0 comments on commit 7b94c5a

Please sign in to comment.