summaryrefslogtreecommitdiff
path: root/graphql.cabal
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2021-12-24 13:35:18 +0100
committerEugen Wissner <belka@caraus.de>2021-12-24 13:35:18 +0100
commit116aa1f6bbcaa010fdc227df4cde3b39c5d07153 (patch)
tree0d10b96943b392ad857d54ed0b49575cc95c83ba /graphql.cabal
parentdf078a59d0ea80b383df251a789df8f6f539b072 (diff)
downloadgraphql-116aa1f6bbcaa010fdc227df4cde3b39c5d07153.tar.gz
Put JSON support behind a flag
Diffstat (limited to 'graphql.cabal')
-rw-r--r--graphql.cabal17
1 files changed, 13 insertions, 4 deletions
diff --git a/graphql.cabal b/graphql.cabal
index 232b537..a78bced 100644
--- a/graphql.cabal
+++ b/graphql.cabal
@@ -28,6 +28,11 @@ source-repository head
type: git
location: git://caraus.tech/pub/graphql.git
+flag Json
+ description: Whether to build against @aeson 1.x@
+ default: True
+ manual: True
+
library
exposed-modules:
Language.GraphQL
@@ -57,8 +62,8 @@ library
hs-source-dirs:
src
ghc-options: -Wall
+
build-depends:
- aeson >= 1.5.6 && < 1.6,
base >= 4.7 && < 5,
conduit >= 1.3.4 && < 1.4,
containers >= 0.6.2 && < 0.7,
@@ -66,12 +71,17 @@ library
hspec-expectations >= 0.8.2 && < 0.9,
megaparsec >= 9.0.1 && < 9.1,
parser-combinators >= 1.3.0 && < 1.4,
- scientific >= 0.3.7 && < 0.4,
template-haskell >= 2.16 && < 2.18,
text >= 1.2.4 && < 1.3,
transformers >= 0.5.6 && < 0.6,
unordered-containers >= 0.2.14 && < 0.3,
vector >= 0.12.3 && < 0.13
+ if flag(Json)
+ build-depends:
+ aeson >= 1.5.6 && < 1.6,
+ scientific >= 0.3.7 && < 0.4
+ cpp-options: -DWITH_JSON
+
default-language: Haskell2010
test-suite graphql-test
@@ -91,9 +101,9 @@ test-suite graphql-test
hs-source-dirs:
tests
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
+
build-depends:
QuickCheck >= 2.14.1 && < 2.15,
- aeson,
base >= 4.8 && < 5,
conduit,
exceptions,
@@ -101,7 +111,6 @@ test-suite graphql-test
hspec >= 2.9.1 && < 3,
hspec-megaparsec >= 2.2.0 && < 2.3,
megaparsec,
- scientific,
text,
unordered-containers
default-language: Haskell2010