Put JSON support behind a flag
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user