Make whitespace uniform in Cabal files, add a few more dependency bounds

This commit is contained in:
John J. Camilleri
2021-07-07 09:11:46 +02:00
parent 0886eb520d
commit a2b23d5897

120
gf.cabal
View File

@@ -43,21 +43,21 @@ custom-setup
setup-depends: setup-depends:
base, base,
Cabal >=1.22.0.0, Cabal >=1.22.0.0,
directory, directory >= 1.3.0 && < 1.4,
filepath, filepath >= 1.4.1 && < 1.5,
process >=1.0.1.1 process >=1.0.1.1
source-repository head source-repository head
type: git type: git
location: https://github.com/GrammaticalFramework/gf-core.git location: https://github.com/GrammaticalFramework/gf-core.git
flag interrupt flag interrupt
Description: Enable Ctrl+Break in the shell Description: Enable Ctrl+Break in the shell
Default: True Default: True
flag server flag server
Description: Include --server mode Description: Include --server mode
Default: True Default: True
flag network-uri flag network-uri
description: Get Network.URI from the network-uri package description: Get Network.URI from the network-uri package
@@ -69,13 +69,13 @@ flag network-uri
flag c-runtime flag c-runtime
Description: Include functionality from the C run-time library (which must be installed already) Description: Include functionality from the C run-time library (which must be installed already)
Default: False Default: False
library library
default-language: Haskell2010 default-language: Haskell2010
build-depends: 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, base >= 4.9.1 && < 4.15,
array >= 0.5.1 && < 0.6, array >= 0.5.1 && < 0.6,
containers >= 0.5.7 && < 0.7, containers >= 0.5.7 && < 0.7,
bytestring >= 0.10.8 && < 0.11, bytestring >= 0.10.8 && < 0.11,
@@ -137,13 +137,17 @@ library
if flag(c-runtime) if flag(c-runtime)
exposed-modules: PGF2 exposed-modules: PGF2
other-modules: PGF2.FFI PGF2.Expr PGF2.Type other-modules:
GF.Interactive2 GF.Command.Commands2 PGF2.FFI
hs-source-dirs: src/runtime/haskell-bind PGF2.Expr
build-tools: hsc2hs PGF2.Type
GF.Interactive2
GF.Command.Commands2
hs-source-dirs: src/runtime/haskell-bind
build-tools: hsc2hs
extra-libraries: pgf gu extra-libraries: pgf gu
c-sources: src/runtime/haskell-bind/utils.c c-sources: src/runtime/haskell-bind/utils.c
cc-options: -std=c99 cc-options: -std=c99
---- GF compiler as a library: ---- GF compiler as a library:
@@ -165,12 +169,19 @@ library
GF.Grammar.Canonical GF.Grammar.Canonical
other-modules: other-modules:
GF.Main GF.Compiler GF.Interactive GF.Main
GF.Compiler
GF.Interactive
GF.Compile GF.CompileInParallel GF.CompileOne GF.Compile.GetGrammar GF.Compile
GF.CompileInParallel
GF.CompileOne
GF.Compile.GetGrammar
GF.Grammar GF.Grammar
GF.Data.Operations GF.Infra.Option GF.Infra.UseIO GF.Data.Operations
GF.Infra.Option
GF.Infra.UseIO
GF.Command.Abstract GF.Command.Abstract
GF.Command.CommandInfo GF.Command.CommandInfo
@@ -280,12 +291,17 @@ library
cpp-options: -DC_RUNTIME cpp-options: -DC_RUNTIME
if flag(server) if flag(server)
build-depends: httpd-shed >= 0.4.0 && < 0.5, network>=2.3 && <2.7, build-depends:
cgi >= 3001.3.0.2 && < 3001.6 httpd-shed >= 0.4.0 && < 0.5,
network>=2.3 && <2.7,
cgi >= 3001.3.0.2 && < 3001.6
if flag(network-uri) if flag(network-uri)
build-depends: network-uri >= 2.6.1.0 && < 2.7, network>=2.6 && <2.7 build-depends:
network-uri >= 2.6.1.0 && < 2.7,
network>=2.6 && <2.7
else else
build-depends: network >= 2.5 && <2.6 build-depends:
network >= 2.5 && <2.6
cpp-options: -DSERVER_MODE cpp-options: -DSERVER_MODE
other-modules: other-modules:
@@ -302,7 +318,10 @@ library
Fold Fold
ExampleDemo ExampleDemo
ExampleService ExampleService
hs-source-dirs: src/server src/server/transfer src/example-based hs-source-dirs:
src/server
src/server/transfer
src/example-based
if flag(interrupt) if flag(interrupt)
cpp-options: -DUSE_INTERRUPT cpp-options: -DUSE_INTERRUPT
@@ -311,17 +330,24 @@ library
other-modules: GF.System.NoSignal other-modules: GF.System.NoSignal
if impl(ghc>=7.8) if impl(ghc>=7.8)
build-tools: happy>=1.19, alex>=3.1 build-tools:
happy>=1.19,
alex>=3.1
-- ghc-options: +RTS -A20M -RTS -- ghc-options: +RTS -A20M -RTS
else else
build-tools: happy, alex>=3 build-tools:
happy,
alex>=3
ghc-options: -fno-warn-tabs ghc-options: -fno-warn-tabs
if os(windows) if os(windows)
build-depends: Win32 >= 2.3.1.1 && < 2.7 build-depends:
Win32 >= 2.3.1.1 && < 2.7
else else
build-depends: unix >= 2.7.2 && < 2.8, terminfo >=0.4.0 && < 0.5 build-depends:
unix >= 2.7.2 && < 2.8,
terminfo >=0.4.0 && < 0.5
if impl(ghc>=8.2) if impl(ghc>=8.2)
ghc-options: -fhide-source-paths ghc-options: -fhide-source-paths
@@ -329,8 +355,10 @@ library
executable gf executable gf
hs-source-dirs: src/programs hs-source-dirs: src/programs
main-is: gf-main.hs main-is: gf-main.hs
default-language: Haskell2010 default-language: Haskell2010
build-depends: gf, base build-depends:
gf,
base
ghc-options: -threaded ghc-options: -threaded
--ghc-options: -fwarn-unused-imports --ghc-options: -fwarn-unused-imports
@@ -344,20 +372,30 @@ executable gf
if impl(ghc>=8.2) if impl(ghc>=8.2)
ghc-options: -fhide-source-paths ghc-options: -fhide-source-paths
executable pgf-shell -- executable pgf-shell
--if !flag(c-runtime) -- --if !flag(c-runtime)
buildable: False -- buildable: False
main-is: pgf-shell.hs -- main-is: pgf-shell.hs
hs-source-dirs: src/runtime/haskell-bind/examples -- hs-source-dirs: src/runtime/haskell-bind/examples
build-depends: gf, base, containers, mtl, lifted-base -- build-depends:
default-language: Haskell2010 -- gf,
if impl(ghc>=7.0) -- base,
ghc-options: -rtsopts -- containers,
-- mtl,
-- lifted-base
-- default-language: Haskell2010
-- if impl(ghc>=7.0)
-- ghc-options: -rtsopts
test-suite gf-tests test-suite gf-tests
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: run.hs main-is: run.hs
hs-source-dirs: testsuite hs-source-dirs: testsuite
build-depends: base>=4.3 && <5, Cabal>=1.8, directory, filepath, process build-depends:
base >= 4.9.1 && < 4.15,
Cabal >= 1.8,
directory >= 1.3.0 && < 1.4,
filepath >= 1.4.1 && < 1.5,
process >= 1.4.3 && < 1.7
build-tool-depends: gf:gf build-tool-depends: gf:gf
default-language: Haskell2010 default-language: Haskell2010