From 03df25bb7ac2f57a5382cda44dbaef8170543758 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Tue, 4 Oct 2022 16:46:36 +0200 Subject: Add support for ghc-9.2.4 --- src/runtime/haskell/Data/Binary/Get.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/runtime/haskell/Data/Binary/Get.hs') 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) -- cgit v1.2.3