diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2022-10-10 12:00:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-10 12:00:40 +0200 |
| commit | 85038d01750c56241d45686d14c513f72421526c (patch) | |
| tree | 77e0dfac3e3e6801c2c8cfb50ec44282eb23be28 /src/runtime/haskell/Data/Binary/Get.hs | |
| parent | 6edd449d68a7dcf68eb3fff31370018dc6508a70 (diff) | |
| parent | 03df25bb7ac2f57a5382cda44dbaef8170543758 (diff) | |
Merge pull request #149 from anka-213/ghc-9.2
Add support for ghc-9.2.4
Diffstat (limited to 'src/runtime/haskell/Data/Binary/Get.hs')
| -rw-r--r-- | src/runtime/haskell/Data/Binary/Get.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs index 895789061..8faf249a9 100644 --- a/src/runtime/haskell/Data/Binary/Get.hs +++ b/src/runtime/haskell/Data/Binary/Get.hs @@ -101,6 +101,9 @@ import Data.STRef import GHC.Base import GHC.Word --import GHC.Int +#if MIN_VERSION_base(4,16,0) +import GHC.Exts (wordToWord16#, word16ToWord#, wordToWord32#, word32ToWord#) +#endif #endif -- Control.Monad.Fail import will become redundant in GHC 8.8+ @@ -532,8 +535,13 @@ shiftl_w32 :: Word32 -> Int -> Word32 shiftl_w64 :: Word64 -> Int -> Word64 #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) +#if MIN_VERSION_base(4,16,0) +shiftl_w16 (W16# w) (I# i) = W16# (wordToWord16# ((word16ToWord# w) `uncheckedShiftL#` i)) +shiftl_w32 (W32# w) (I# i) = W32# (wordToWord32# ((word32ToWord# w) `uncheckedShiftL#` i)) +#else shiftl_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftL#` i) shiftl_w32 (W32# w) (I# i) = W32# (w `uncheckedShiftL#` i) +#endif #if WORD_SIZE_IN_BITS < 64 shiftl_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftL64#` i) |
