word-compat 0.0.5 → 0.0.6
raw patch · 4 files changed
+24/−3 lines, 4 files
Files
- CHANGELOG.md +4/−0
- src/GHC/Word/Compat.hs +16/−2
- tests/test.hs +3/−0
- word-compat.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for word-compat +## 0.0.6++* Added a pattern synonym for `Word64#`+ ## 0.0.5 * Supported `Word64#` on GHC 9.4 and older
src/GHC/Word/Compat.hs view
@@ -5,7 +5,7 @@ module GHC.Word.Compat (W.Word8, W.Word16, W.Word32,- W.Word64(..),+ W.Word64, W.Word(..), #if MIN_VERSION_ghc_prim(0,8,0) pattern GHC.Word.Compat.W8#,@@ -16,6 +16,11 @@ pattern W.W16#, pattern W.W32#, #endif+#if MIN_VERSION_ghc_prim(0,9,0)+ pattern GHC.Word.Compat.W64#,+#else+ pattern W.W64#,+#endif -- * Shifts uncheckedShiftL64#, uncheckedShiftRL64#,@@ -41,7 +46,7 @@ eqWord32, neWord32, gtWord32, geWord32, ltWord32, leWord32, eqWord64, neWord64, gtWord64, geWord64, ltWord64, leWord64) where -import GHC.Word hiding (Word8(..), Word16(..), Word32(..))+import GHC.Word hiding (Word8(..), Word16(..), Word32(..), Word64(..)) import qualified GHC.Word as W #if MIN_VERSION_ghc_prim(0,8,0)@@ -62,5 +67,14 @@ pattern W32# x <- (W.W32# (word32ToWord# -> x)) where W32# x = W.W32# (wordToWord32# x) {-# COMPLETE W32# #-}++#endif++#if MIN_VERSION_ghc_prim(0,9,0)++pattern W64# :: Word# -> W.Word64+pattern W64# x <- (W.W64# (word64ToWord# -> x)) where+ W64# x = W.W64# (wordToWord64# x)+{-# COMPLETE W64# #-} #endif
tests/test.hs view
@@ -23,5 +23,8 @@ _w32 :: Word32 -> Word# _w32 (W32# x) = x +_w64 :: Word64 -> Word#+_w64 (W64# x) = x+ main :: IO () main = pure ()
word-compat.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: word-compat-version: 0.0.5+version: 0.0.6 -- A short (one-line) description of the package. synopsis: Compatibility shim for the Int/Word internal change in GHC 9.2