Skip to content

Commit

Permalink
Merge pull request #149 from anka-213/ghc-9.2
Browse files Browse the repository at this point in the history
Add support for ghc-9.2.4
  • Loading branch information
inariksit authored Oct 10, 2022
2 parents 6edd449 + 03df25b commit 85038d0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gf.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: GF, Grammatical Framework, is a programming language for multilingu
maintainer: John J. Camilleri <[email protected]>
homepage: https://www.grammaticalframework.org/
bug-reports: https://github.com/GrammaticalFramework/gf-core/issues
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC==9.0.2
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC==9.0.2, GHC==9.2.4

data-dir: src
extra-source-files:
Expand Down Expand Up @@ -73,11 +73,11 @@ library
build-depends:
-- GHC 8.0.2 to GHC 8.10.4
array >= 0.5.1 && < 0.6,
base >= 4.9.1 && < 4.16,
bytestring >= 0.10.8 && < 0.11,
base >= 4.9.1 && < 4.17,
bytestring >= 0.10.8 && < 0.12,
containers >= 0.5.7 && < 0.7,
exceptions >= 0.8.3 && < 0.11,
ghc-prim >= 0.5.0 && < 0.7.1,
ghc-prim >= 0.5.0 && < 0.9.0,
mtl >= 2.2.1 && < 2.3,
pretty >= 1.1.3 && < 1.2,
random >= 1.1 && < 1.3,
Expand Down
9 changes: 9 additions & 0 deletions src/runtime/haskell/Data/Binary/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ import qualified Data.ByteString.Internal as S
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
import GHC.Word (uncheckedShiftRL64#)
#endif
Expand Down Expand Up @@ -411,8 +414,14 @@ shiftr_w32 :: Word32 -> Int -> Word32
shiftr_w64 :: Word64 -> Int -> Word64

#if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__)
#if MIN_VERSION_base(4,16,0)
shiftr_w16 (W16# w) (I# i) = W16# (wordToWord16# ((word16ToWord# w) `uncheckedShiftRL#` i))
shiftr_w32 (W32# w) (I# i) = W32# (wordToWord32# ((word32ToWord# w) `uncheckedShiftRL#` i))
#else
shiftr_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftRL#` i)
shiftr_w32 (W32# w) (I# i) = W32# (w `uncheckedShiftRL#` i)
#endif


#if WORD_SIZE_IN_BITS < 64
shiftr_w64 (W64# w) (I# i) = W64# (w `uncheckedShiftRL64#` i)
Expand Down
8 changes: 8 additions & 0 deletions src/runtime/haskell/Data/Binary/Get.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions stack-ghc9.2.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolver: nightly-2022-09-30 # GHC-9.2.4

extra-deps:
- multipart-0.2.0@sha256:b8770e3ff6089be4dd089a8250894b31287cca671f3d258190a505f9351fa8a9,1084
- cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990

allow-newer: true

0 comments on commit 85038d0

Please sign in to comment.