Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GHC 9.4 for the PGF library #164

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/runtime/haskell/Data/Binary/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
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 @@ -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+
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/runtime/haskell/pgf.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ synopsis: Grammatical Framework
description: A library for interpreting the Portable Grammar Format (PGF)
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
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC==9.4.5

library
default-language: Haskell2010
build-depends:
array >= 0.5.1 && < 0.6,
base >= 4.9.1 && < 4.16,
bytestring >= 0.10.8 && < 0.11,
containers >= 0.5.7 && < 0.7,
ghc-prim >= 0.5.0 && < 0.7,
array >= 0.5.1 && < 0.7,
base >= 4.9.1 && < 5.0,
bytestring >= 0.10.8 && < 0.12,
containers >= 0.5.7 && < 0.8,
ghc-prim >= 0.5.0 && < 0.10,
mtl >= 2.2.1 && < 2.3,
pretty >= 1.1.3 && < 1.2,
random >= 1.1 && < 1.3,
Expand Down
Loading