From 12c564f97c13d644590b86c8e26b80d962bd1773 Mon Sep 17 00:00:00 2001 From: 2jacobtan Date: Tue, 6 Jul 2021 05:00:18 +0800 Subject: [PATCH 1/4] specify version bounds in gf.cabal --- gf.cabal | 58 +++++++++++++++++++++++++------------------- stack-ghc8.10.4.yaml | 14 +++++++++++ stack.yaml | 15 +----------- 3 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 stack-ghc8.10.4.yaml diff --git a/gf.cabal b/gf.cabal index 9a9e3903e..0eba0ead3 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,7 +1,7 @@ name: gf -version: 3.10.4-git +version: 3.11.0-git -cabal-version: >= 1.22 +cabal-version: 1.22 build-type: Custom license: OtherLicense license-file: LICENSE @@ -11,7 +11,7 @@ description: GF, Grammatical Framework, is a programming language for multilingu homepage: http://www.grammaticalframework.org/ bug-reports: https://github.com/GrammaticalFramework/gf-core/issues maintainer: Thomas Hallgren -tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3 +tested-with: GHC==8.0.2, GHC==8.10.4 data-dir: src extra-source-files: WebSetup.hs @@ -74,20 +74,22 @@ flag c-runtime library default-language: Haskell2010 - build-depends: base >= 4.6 && <5, - array, - containers, - bytestring, - utf8-string, - random, - pretty, - mtl, - exceptions, - fail, - -- For compatability with ghc < 8 - -- We need transformers-compat >= 0.6.3, but that is only in newer snapshots where it is redundant. - transformers-compat, - ghc-prim + build-depends: + -- | GHC 8.0.2 to GHC 8.10.4 + base >= 4.9.1 && <4.15, + array >= 0.5.1 && < 0.6, + containers >= 0.5.7 && < 0.7, + bytestring >= 0.10.8 && < 0.11, + utf8-string >= 1.0.1.1 && < 1.1, + random >= 1.1 && < 1.3, + pretty >= 1.1.3 && < 1.2, + mtl >= 2.2.1 && < 2.3, + exceptions >= 0.8.3 && < 0.11, + fail >= 4.9.0 && < 4.10, + -- For compatability with ghc < 8 + -- We need transformers-compat >= 0.6.3, but that is only in newer snapshots where it is redundant. + transformers-compat >= 0.5.1.4 && < 0.7, + ghc-prim >= 0.5.0 && < 0.7 hs-source-dirs: src/runtime/haskell other-modules: @@ -146,8 +148,14 @@ library ---- GF compiler as a library: - build-depends: filepath, directory>=1.2, time, - process, haskeline, parallel>=3, json + build-depends: + filepath >= 1.4.1 && < 1.5, + directory >= 1.3.0 && < 1.4, + time >= 1.6.0 && < 1.10, + process >= 1.4.3 && < 1.7, + haskeline >= 0.7.3 && < 0.9, + parallel >= 3.2.1.1 && < 3.3, + json >= 0.9.1 && < 0.11 hs-source-dirs: src/compiler exposed-modules: @@ -274,12 +282,12 @@ library cpp-options: -DC_RUNTIME if flag(server) - build-depends: httpd-shed>=0.4.0.3, network>=2.3 && <2.7, - cgi>=3001.2.2.0 + build-depends: httpd-shed >= 0.4.0 && < 0.5, network>=2.3 && <2.7, + cgi >= 3001.3.0.2 && < 3001.6 if flag(network-uri) - build-depends: network-uri>=2.6, network>=2.6 + build-depends: network-uri >= 2.6.1.0 && < 2.7, network>=2.6 && <2.7 else - build-depends: network<2.6 + build-depends: network >= 2.5 && <2.6 cpp-options: -DSERVER_MODE other-modules: @@ -313,9 +321,9 @@ library ghc-options: -fno-warn-tabs if os(windows) - build-depends: Win32 + build-depends: Win32 >= 2.3.1.1 && < 2.7 else - build-depends: unix, terminfo>=0.4 + build-depends: unix >= 2.7.2 && < 2.8, terminfo >=0.4.0 && < 0.5 if impl(ghc>=8.2) ghc-options: -fhide-source-paths diff --git a/stack-ghc8.10.4.yaml b/stack-ghc8.10.4.yaml new file mode 100644 index 000000000..b10f66e4f --- /dev/null +++ b/stack-ghc8.10.4.yaml @@ -0,0 +1,14 @@ +resolver: lts-18.0 # ghc 8.10.4 + +extra-deps: +- network-2.6.3.6 +- httpd-shed-0.4.0.3 +- cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990 +- json-0.10@sha256:d9fc6b07ce92b8894825a17d2cf14799856767eb30c8bf55962baa579207d799,3210 +- multipart-0.2.0@sha256:b8770e3ff6089be4dd089a8250894b31287cca671f3d258190a505f9351fa8a9,1084 + +# flags: +# gf: +# c-runtime: true +# extra-lib-dirs: +# - /usr/local/lib diff --git a/stack.yaml b/stack.yaml index 69b8c8790..cfb0330a0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,16 +1,3 @@ -# This default stack file is a copy of stack-ghc8.6.5.yaml -# But committing a symlink can be problematic on Windows, so it's a real copy. -# See: https://github.com/GrammaticalFramework/gf-core/pull/106 -resolver: lts-14.27 # ghc 8.6.5 +resolver: lts-9.21 # ghc 8.0.2 -extra-deps: -- network-2.6.3.6 -- httpd-shed-0.4.0.3 -- cgi-3001.5.0.0 - -# flags: -# gf: -# c-runtime: true -# extra-lib-dirs: -# - /usr/local/lib From be231584f61a1c6134b6163b1198be556fafc0fb Mon Sep 17 00:00:00 2001 From: 2jacobtan Date: Tue, 6 Jul 2021 05:20:09 +0800 Subject: [PATCH 2/4] set stack.yaml to lts-18.0 --- stack.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index cfb0330a0..3a79afdf0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,3 +1,18 @@ +# This default stack file is a copy of stack-ghc8.10.4.yaml +# But committing a symlink can be problematic on Windows, so it's a real copy. +# See: https://github.com/GrammaticalFramework/gf-core/pull/106 -resolver: lts-9.21 # ghc 8.0.2 +resolver: lts-18.0 # ghc 8.10.4 +extra-deps: +- network-2.6.3.6 +- httpd-shed-0.4.0.3 +- cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990 +- json-0.10@sha256:d9fc6b07ce92b8894825a17d2cf14799856767eb30c8bf55962baa579207d799,3210 +- multipart-0.2.0@sha256:b8770e3ff6089be4dd089a8250894b31287cca671f3d258190a505f9351fa8a9,1084 + +# flags: +# gf: +# c-runtime: true +# extra-lib-dirs: +# - /usr/local/lib From e1a40640cd55b6047f2aa36bf3394017d8867fd6 Mon Sep 17 00:00:00 2001 From: 2jacobtan Date: Tue, 6 Jul 2021 05:42:34 +0800 Subject: [PATCH 3/4] specify version bounds in pgf.cabal and pgf2.cabal --- src/runtime/haskell-bind/pgf2.cabal | 6 +++--- src/runtime/haskell/pgf.cabal | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/runtime/haskell-bind/pgf2.cabal b/src/runtime/haskell-bind/pgf2.cabal index c8d5d8c6c..fcd854d72 100644 --- a/src/runtime/haskell-bind/pgf2.cabal +++ b/src/runtime/haskell-bind/pgf2.cabal @@ -23,9 +23,9 @@ library PGF2.Expr, PGF2.Type build-depends: - base >=4.3 && <5, - containers, - pretty + base >= 4.9.1 && <4.15, + containers >= 0.5.7 && < 0.7, + pretty >= 1.1.3 && < 1.2 default-language: Haskell2010 build-tools: hsc2hs extra-libraries: pgf gu diff --git a/src/runtime/haskell/pgf.cabal b/src/runtime/haskell/pgf.cabal index f829a6e35..9a59502c4 100644 --- a/src/runtime/haskell/pgf.cabal +++ b/src/runtime/haskell/pgf.cabal @@ -14,16 +14,16 @@ tested-with: GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.4.4 library default-language: Haskell2010 build-depends: - array, - base >= 4.6 && <5, - bytestring, - containers, + base >= 4.9.1 && <4.15, + array >= 0.5.1 && < 0.6, + containers >= 0.5.7 && < 0.7, + bytestring >= 0.10.8 && < 0.11, + utf8-string >= 1.0.1.1 && < 1.1, + random >= 1.1 && < 1.3, + pretty >= 1.1.3 && < 1.2, + mtl >= 2.2.1 && < 2.3, + ghc-prim >= 0.5.0 && < 0.7 -- exceptions, - ghc-prim, - mtl, - pretty, - random, - utf8-string other-modules: -- not really part of GF but I have changed the original binary library From 84b4b6fab93a2ef9367878a6055595f81552791d Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 6 Jul 2021 14:11:30 +0200 Subject: [PATCH 4/4] Some more cabal file cleanup. Add stack files for pgf, pgf2. --- gf.cabal | 9 ++++----- src/runtime/haskell-bind/pgf2.cabal | 15 +++++++++------ src/runtime/haskell-bind/stack-ghc7.10.3.yaml | 3 +++ src/runtime/haskell-bind/stack-ghc8.0.2.yaml | 1 + src/runtime/haskell-bind/stack-ghc8.10.4.yaml | 1 + src/runtime/haskell/pgf.cabal | 13 +++++++------ src/runtime/haskell/stack-ghc7.10.3.yaml | 3 +++ src/runtime/haskell/stack-ghc8.0.2.yaml | 1 + src/runtime/haskell/stack-ghc8.10.4.yaml | 1 + 9 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 src/runtime/haskell-bind/stack-ghc7.10.3.yaml create mode 100644 src/runtime/haskell-bind/stack-ghc8.0.2.yaml create mode 100644 src/runtime/haskell-bind/stack-ghc8.10.4.yaml create mode 100644 src/runtime/haskell/stack-ghc7.10.3.yaml create mode 100644 src/runtime/haskell/stack-ghc8.0.2.yaml create mode 100644 src/runtime/haskell/stack-ghc8.10.4.yaml diff --git a/gf.cabal b/gf.cabal index 0eba0ead3..b9c7d9631 100644 --- a/gf.cabal +++ b/gf.cabal @@ -8,10 +8,9 @@ license-file: LICENSE category: Natural Language Processing, Compiler synopsis: Grammatical Framework description: GF, Grammatical Framework, is a programming language for multilingual grammar applications -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==8.0.2, GHC==8.10.4 +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4 data-dir: src extra-source-files: WebSetup.hs @@ -75,7 +74,7 @@ flag c-runtime library default-language: Haskell2010 build-depends: - -- | GHC 8.0.2 to GHC 8.10.4 + -- GHC 8.0.2 to GHC 8.10.4 base >= 4.9.1 && <4.15, array >= 0.5.1 && < 0.6, containers >= 0.5.7 && < 0.7, @@ -84,9 +83,9 @@ library random >= 1.1 && < 1.3, pretty >= 1.1.3 && < 1.2, mtl >= 2.2.1 && < 2.3, + -- For compatability with GHC < 8 exceptions >= 0.8.3 && < 0.11, fail >= 4.9.0 && < 4.10, - -- For compatability with ghc < 8 -- We need transformers-compat >= 0.6.3, but that is only in newer snapshots where it is redundant. transformers-compat >= 0.5.1.4 && < 0.7, ghc-prim >= 0.5.0 && < 0.7 diff --git a/src/runtime/haskell-bind/pgf2.cabal b/src/runtime/haskell-bind/pgf2.cabal index fcd854d72..eb1e3c708 100644 --- a/src/runtime/haskell-bind/pgf2.cabal +++ b/src/runtime/haskell-bind/pgf2.cabal @@ -1,18 +1,21 @@ name: pgf2 version: 1.3.0 + +cabal-version: 1.22 +build-type: Simple +license: LGPL-3 +license-file: LICENSE +category: Natural Language Processing synopsis: Bindings to the C version of the PGF runtime description: GF, Grammatical Framework, is a programming language for multilingual grammar applications. GF grammars are compiled into Portable Grammar Format (PGF) which can be used with the PGF runtime, written in C. This package provides Haskell bindings to that runtime. -homepage: https://www.grammaticalframework.org -license: LGPL-3 -license-file: LICENSE +homepage: https://www.grammaticalframework.org/ +bug-reports: https://github.com/GrammaticalFramework/gf-core/issues author: Krasimir Angelov -category: Natural Language Processing -build-type: Simple extra-source-files: CHANGELOG.md, README.md -cabal-version: >=1.10 +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4 library exposed-modules: diff --git a/src/runtime/haskell-bind/stack-ghc7.10.3.yaml b/src/runtime/haskell-bind/stack-ghc7.10.3.yaml new file mode 100644 index 000000000..c916b4bb0 --- /dev/null +++ b/src/runtime/haskell-bind/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-bind/stack-ghc8.0.2.yaml b/src/runtime/haskell-bind/stack-ghc8.0.2.yaml new file mode 100644 index 000000000..af08206d9 --- /dev/null +++ b/src/runtime/haskell-bind/stack-ghc8.0.2.yaml @@ -0,0 +1 @@ +resolver: lts-9.21 # ghc 8.0.2 diff --git a/src/runtime/haskell-bind/stack-ghc8.10.4.yaml b/src/runtime/haskell-bind/stack-ghc8.10.4.yaml new file mode 100644 index 000000000..195e90993 --- /dev/null +++ b/src/runtime/haskell-bind/stack-ghc8.10.4.yaml @@ -0,0 +1 @@ +resolver: lts-18.0 # ghc 8.10.4 diff --git a/src/runtime/haskell/pgf.cabal b/src/runtime/haskell/pgf.cabal index 9a59502c4..56c1ca04a 100644 --- a/src/runtime/haskell/pgf.cabal +++ b/src/runtime/haskell/pgf.cabal @@ -1,15 +1,15 @@ name: pgf -version: 3.10.1-git +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 -tested-with: GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.4.4 +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4 library default-language: Haskell2010 @@ -22,8 +22,9 @@ library random >= 1.1 && < 1.3, pretty >= 1.1.3 && < 1.2, mtl >= 2.2.1 && < 2.3, - ghc-prim >= 0.5.0 && < 0.7 - -- exceptions, + ghc-prim >= 0.5.0 && < 0.7, + -- For compatability with GHC < 8 + fail >= 4.9.0 && < 4.10 other-modules: -- not really part of GF but I have changed the original binary library 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