diff options
Diffstat (limited to 'src/runtime/haskell/Data')
| -rw-r--r-- | src/runtime/haskell/Data/Binary/Builder.hs | 11 | ||||
| -rw-r--r-- | src/runtime/haskell/Data/Binary/Get.hs | 8 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/runtime/haskell/Data/Binary/Builder.hs b/src/runtime/haskell/Data/Binary/Builder.hs index 5f8983c0c..8dc46f816 100644 --- a/src/runtime/haskell/Data/Binary/Builder.hs +++ b/src/runtime/haskell/Data/Binary/Builder.hs @@ -74,13 +74,16 @@ import qualified Data.ByteString.Internal as S #endif #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) -import GHC.Base(Int(..),uncheckedShiftRL# ) +import GHC.Base(Int(..),uncheckedShiftRL#,) import GHC.Word (Word32(..),Word16(..),Word64(..)) #if MIN_VERSION_base(4,16,0) import GHC.Exts (wordToWord16#, word16ToWord#, wordToWord32#, word32ToWord#) #endif -#if WORD_SIZE_IN_BITS < 64 && __GLASGOW_HASKELL__ >= 608 +#if WORD_SIZE_IN_BITS < 64 && __GLASGOW_HASKELL__ >= 608 +import GHC.Word (uncheckedShiftRL64#) +#endif +#if __GLASGOW_HASKELL__ >= 900 import GHC.Word (uncheckedShiftRL64#) #endif #endif @@ -433,7 +436,11 @@ foreign import ccall unsafe "stg_uncheckedShiftRL64" #endif #else +#if __GLASGOW_HASKELL__ <= 810 shiftr_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftRL#` i) +#else +shiftr_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftRL64#` i) +#endif #endif #else diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs index 8faf249a9..a33c5c5a3 100644 --- a/src/runtime/haskell/Data/Binary/Get.hs +++ b/src/runtime/haskell/Data/Binary/Get.hs @@ -104,6 +104,9 @@ import GHC.Word #if MIN_VERSION_base(4,16,0) import GHC.Exts (wordToWord16#, word16ToWord#, wordToWord32#, word32ToWord#) #endif +#if __GLASGOW_HASKELL__ >= 900 +import GHC.Word (uncheckedShiftL64#) +#endif #endif -- Control.Monad.Fail import will become redundant in GHC 8.8+ @@ -553,7 +556,12 @@ foreign import ccall unsafe "stg_uncheckedShiftL64" #endif #else +#if __GLASGOW_HASKELL__ <= 810 shiftl_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftL#` i) +#else +shiftl_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftL64#` i) +#endif + #endif #else |
