From 396b48080643a07f96e960f52635797940314f2f Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 15 Jan 2022 11:50:20 +0100 Subject: [PATCH] Add cabal.project to build with the correct flags --- cabal.project | 4 ++++ graphql-spice.cabal | 8 +++++--- src/Language/GraphQL.hs | 3 --- src/Language/GraphQL/Foundation.hs | 5 +++++ src/Language/GraphQL/Serialize.hs | 7 +++++++ tests/Language/GraphQL/DirectiveSpec.hs | 2 +- tests/Language/GraphQL/FragmentSpec.hs | 2 +- tests/Language/GraphQL/RootOperationSpec.hs | 2 +- 8 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 cabal.project delete mode 100644 src/Language/GraphQL.hs create mode 100644 src/Language/GraphQL/Foundation.hs create mode 100644 src/Language/GraphQL/Serialize.hs diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..566a70e --- /dev/null +++ b/cabal.project @@ -0,0 +1,4 @@ +packages: . + +constraints: graphql -json +tests: False diff --git a/graphql-spice.cabal b/graphql-spice.cabal index 67ec4de..0622ea7 100644 --- a/graphql-spice.cabal +++ b/graphql-spice.cabal @@ -24,14 +24,15 @@ source-repository head library exposed-modules: - Language.GraphQL + Language.GraphQL.Foundation, + Language.GraphQL.Serialize other-modules: hs-source-dirs: src ghc-options: -Wall build-depends: --- aeson >= 2.0.2.0 && < 2.1 + aeson ^>= 2.0.3, base ^>=4.14.3.0, - graphql >= 1.0.1.0 && < 1.1 + graphql ^>= 1.0.2 default-language: Haskell2010 test-suite graphql-test @@ -48,6 +49,7 @@ test-suite graphql-test aeson, base >= 4.8 && < 5, graphql, + graphql-spice, hspec >= 2.9.1 && < 3, text, unordered-containers diff --git a/src/Language/GraphQL.hs b/src/Language/GraphQL.hs deleted file mode 100644 index 478c4c2..0000000 --- a/src/Language/GraphQL.hs +++ /dev/null @@ -1,3 +0,0 @@ -module Language.GraphQL - ( - ) where diff --git a/src/Language/GraphQL/Foundation.hs b/src/Language/GraphQL/Foundation.hs new file mode 100644 index 0000000..4647a47 --- /dev/null +++ b/src/Language/GraphQL/Foundation.hs @@ -0,0 +1,5 @@ +module Language.GraphQL.Foundation + ( module Language.GraphQL.Serialize + ) where + +import Language.GraphQL.Serialize diff --git a/src/Language/GraphQL/Serialize.hs b/src/Language/GraphQL/Serialize.hs new file mode 100644 index 0000000..b15e1f0 --- /dev/null +++ b/src/Language/GraphQL/Serialize.hs @@ -0,0 +1,7 @@ +module Language.GraphQL.Serialize + ( JSON(..) + ) where + +import qualified Data.Aeson as Aeson + +newtype JSON = JSON Aeson.Value diff --git a/tests/Language/GraphQL/DirectiveSpec.hs b/tests/Language/GraphQL/DirectiveSpec.hs index 40f6215..6727c50 100644 --- a/tests/Language/GraphQL/DirectiveSpec.hs +++ b/tests/Language/GraphQL/DirectiveSpec.hs @@ -11,7 +11,7 @@ module Language.GraphQL.DirectiveSpec import Data.Aeson (object, (.=)) import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as HashMap -import Language.GraphQL +import Language.GraphQL.Foundation import Language.GraphQL.TH import Language.GraphQL.Type import qualified Language.GraphQL.Type.Out as Out diff --git a/tests/Language/GraphQL/FragmentSpec.hs b/tests/Language/GraphQL/FragmentSpec.hs index b7902d9..dd13bea 100644 --- a/tests/Language/GraphQL/FragmentSpec.hs +++ b/tests/Language/GraphQL/FragmentSpec.hs @@ -12,7 +12,7 @@ import Data.Aeson ((.=)) import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as HashMap import Data.Text (Text) -import Language.GraphQL +import Language.GraphQL.Foundation import Language.GraphQL.Type import qualified Language.GraphQL.Type.Out as Out import Language.GraphQL.TH diff --git a/tests/Language/GraphQL/RootOperationSpec.hs b/tests/Language/GraphQL/RootOperationSpec.hs index 3c4779d..4c54b40 100644 --- a/tests/Language/GraphQL/RootOperationSpec.hs +++ b/tests/Language/GraphQL/RootOperationSpec.hs @@ -10,7 +10,7 @@ module Language.GraphQL.RootOperationSpec import Data.Aeson ((.=), object) import qualified Data.HashMap.Strict as HashMap -import Language.GraphQL +import Language.GraphQL.Foundation import Test.Hspec (Spec, describe, it) import Language.GraphQL.TH import Language.GraphQL.Type