diff options
| author | krangelov <kr.angelov@gmail.com> | 2021-07-26 16:52:11 +0200 |
|---|---|---|
| committer | krangelov <kr.angelov@gmail.com> | 2021-07-26 16:52:11 +0200 |
| commit | e47042424ee2450c69c509601ddc3c1cc8cd9a39 (patch) | |
| tree | 5cfad2acca46f8c9aafa3a5f97600ae26bbe0e1c /src/runtime/haskell | |
| parent | ecf309a28e9935923308da4b6aa2b1cc6c4b52e2 (diff) | |
| parent | d0a881f9038d2ca1620e0d95f90c297a452774d5 (diff) | |
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
Diffstat (limited to 'src/runtime/haskell')
| -rw-r--r-- | src/runtime/haskell/Data/Binary/Builder.hs | 4 | ||||
| -rw-r--r-- | src/runtime/haskell/Data/Binary/Get.hs | 2 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/Binary.hs | 3 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/TypeCheck.hs | 2 | ||||
| -rw-r--r-- | src/runtime/haskell/pgf.cabal | 37 | ||||
| -rw-r--r-- | src/runtime/haskell/stack-ghc7.10.3.yaml | 3 | ||||
| -rw-r--r-- | src/runtime/haskell/stack-ghc8.0.2.yaml | 1 | ||||
| -rw-r--r-- | src/runtime/haskell/stack-ghc8.10.4.yaml | 1 |
8 files changed, 31 insertions, 22 deletions
diff --git a/src/runtime/haskell/Data/Binary/Builder.hs b/src/runtime/haskell/Data/Binary/Builder.hs index b69371f0e..a74428f20 100644 --- a/src/runtime/haskell/Data/Binary/Builder.hs +++ b/src/runtime/haskell/Data/Binary/Builder.hs @@ -68,7 +68,7 @@ import qualified Data.ByteString.Lazy as L import Data.ByteString.Base (inlinePerformIO) import qualified Data.ByteString.Base as S #else -import Data.ByteString.Internal (inlinePerformIO) +import Data.ByteString.Internal (accursedUnutterablePerformIO) import qualified Data.ByteString.Internal as S --import qualified Data.ByteString.Lazy.Internal as L #endif @@ -199,7 +199,7 @@ defaultSize = 32 * k - overhead -- | Sequence an IO operation on the buffer unsafeLiftIO :: (Buffer -> IO Buffer) -> Builder -unsafeLiftIO f = Builder $ \ k buf -> inlinePerformIO $ do +unsafeLiftIO f = Builder $ \ k buf -> accursedUnutterablePerformIO $ do buf' <- f buf return (k buf') {-# INLINE unsafeLiftIO #-} diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs index 01561d7d9..54f17ae95 100644 --- a/src/runtime/haskell/Data/Binary/Get.hs +++ b/src/runtime/haskell/Data/Binary/Get.hs @@ -423,7 +423,7 @@ readN n f = fmap f $ getBytes n getPtr :: Storable a => Int -> Get a getPtr n = do (fp,o,_) <- readN n B.toForeignPtr - return . B.inlinePerformIO $ withForeignPtr fp $ \p -> peek (castPtr $ p `plusPtr` o) + return . B.accursedUnutterablePerformIO $ withForeignPtr fp $ \p -> peek (castPtr $ p `plusPtr` o) {- INLINE getPtr -} ------------------------------------------------------------------------ diff --git a/src/runtime/haskell/PGF/Binary.hs b/src/runtime/haskell/PGF/Binary.hs index e0e50f4be..a78472ea9 100644 --- a/src/runtime/haskell/PGF/Binary.hs +++ b/src/runtime/haskell/PGF/Binary.hs @@ -28,7 +28,7 @@ instance Binary PGF where let v = (major,minor)
if major==pgfMajorVersion && minor<=pgfMinorVersion
then getPGF'
- else if v==Old.version
+ else if v==Old.version
then Old.getPGF'
else fail $ "Unsupported PGF version "++show (major,minor)
@@ -185,6 +185,7 @@ instance Binary Instr where put (PUSH_ACCUM (LFlt d)) = putWord8 78 >> put d
put (POP_ACCUM ) = putWord8 80
put (ADD ) = putWord8 84
+ get = fail "Missing implementation for ‘get’ in the instance declaration for ‘Binary Instr’"
instance Binary Type where
put (DTyp hypos cat exps) = put (hypos,cat,exps)
diff --git a/src/runtime/haskell/PGF/TypeCheck.hs b/src/runtime/haskell/PGF/TypeCheck.hs index 5db4ef439..c5cc44b4e 100644 --- a/src/runtime/haskell/PGF/TypeCheck.hs +++ b/src/runtime/haskell/PGF/TypeCheck.hs @@ -41,7 +41,7 @@ import Control.Applicative import Control.Monad --import Control.Monad.Identity import Control.Monad.State -import Control.Monad.Error +import Control.Monad.Except import Text.PrettyPrint ----------------------------------------------------- diff --git a/src/runtime/haskell/pgf.cabal b/src/runtime/haskell/pgf.cabal index 76e12bd2c..41e67f6ae 100644 --- a/src/runtime/haskell/pgf.cabal +++ b/src/runtime/haskell/pgf.cabal @@ -1,28 +1,32 @@ name: pgf -version: 3.10 +version: 3.11.0-git -cabal-version: >= 1.20 +cabal-version: 1.22 build-type: Simple license: OtherLicense category: Natural Language Processing synopsis: Grammatical Framework description: A library for interpreting the Portable Grammar Format (PGF) -homepage: http://www.grammaticalframework.org/ +homepage: https://www.grammaticalframework.org/ bug-reports: https://github.com/GrammaticalFramework/gf-core/issues -maintainer: Thomas Hallgren -tested-with: GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2 +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4 -Library - default-language: Haskell2010 - build-depends: base >= 4.6 && <5, - array, - containers, - bytestring, - utf8-string, - random, - pretty, - mtl, - exceptions +library + default-language: Haskell2010 + build-depends: + array >= 0.5.1 && < 0.6, + base >= 4.9.1 && < 4.15, + bytestring >= 0.10.8 && < 0.11, + containers >= 0.5.7 && < 0.7, + ghc-prim >= 0.5.0 && < 0.7, + mtl >= 2.2.1 && < 2.3, + pretty >= 1.1.3 && < 1.2, + random >= 1.1 && < 1.3, + utf8-string >= 1.0.1.1 && < 1.1 + + if impl(ghc<8.0) + build-depends: + fail >= 4.9.0 && < 4.10 other-modules: -- not really part of GF but I have changed the original binary library @@ -37,7 +41,6 @@ Library --if impl(ghc>=7.8) -- ghc-options: +RTS -A20M -RTS ghc-prof-options: -fprof-auto - extensions: exposed-modules: PGF diff --git a/src/runtime/haskell/stack-ghc7.10.3.yaml b/src/runtime/haskell/stack-ghc7.10.3.yaml new file mode 100644 index 000000000..c916b4bb0 --- /dev/null +++ b/src/runtime/haskell/stack-ghc7.10.3.yaml @@ -0,0 +1,3 @@ +resolver: lts-6.35 # ghc 7.10.3 + +allow-newer: true diff --git a/src/runtime/haskell/stack-ghc8.0.2.yaml b/src/runtime/haskell/stack-ghc8.0.2.yaml new file mode 100644 index 000000000..af08206d9 --- /dev/null +++ b/src/runtime/haskell/stack-ghc8.0.2.yaml @@ -0,0 +1 @@ +resolver: lts-9.21 # ghc 8.0.2 diff --git a/src/runtime/haskell/stack-ghc8.10.4.yaml b/src/runtime/haskell/stack-ghc8.10.4.yaml new file mode 100644 index 000000000..195e90993 --- /dev/null +++ b/src/runtime/haskell/stack-ghc8.10.4.yaml @@ -0,0 +1 @@ +resolver: lts-18.0 # ghc 8.10.4 |
