diff options
| author | Danny Navarro <j@dannynavarro.net> | 2015-09-16 10:36:44 +0200 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2015-09-16 10:36:59 +0200 |
| commit | f88948e801d5b12ba7ec3b46bf10cd6e0363ce1a (patch) | |
| tree | 1b5bdf0f4ff4285835f4ea9992e00a111e596779 | |
| parent | ee0e0c3d1f1c259555d246df1be1c9e5b9be0e35 (diff) | |
| download | graphql-f88948e801d5b12ba7ec3b46bf10cd6e0363ce1a.tar.gz | |
Support ghc-7.8
| -rw-r--r-- | Data/GraphQL/Parser.hs | 7 | ||||
| -rw-r--r-- | graphql.cabal | 2 | ||||
| -rw-r--r-- | stack-7.10.yaml | 5 | ||||
| -rw-r--r-- | stack-7.8.yaml | 5 | ||||
| l---------[-rw-r--r--] | stack.yaml | 6 | ||||
| -rw-r--r-- | tests/golden.hs | 4 |
6 files changed, 22 insertions, 7 deletions
diff --git a/Data/GraphQL/Parser.hs b/Data/GraphQL/Parser.hs index 66d913d..c999004 100644 --- a/Data/GraphQL/Parser.hs +++ b/Data/GraphQL/Parser.hs @@ -1,12 +1,17 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} module Data.GraphQL.Parser where import Prelude hiding (takeWhile) + +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative ((<$>), (<*>), (*>), (<*), (<$), pure) +import Data.Monoid (Monoid, mempty) +#endif import Control.Applicative ((<|>), empty, many, optional) import Control.Monad (when) import Data.Char - import Data.Text (Text, pack) import Data.Attoparsec.Text ( Parser diff --git a/graphql.cabal b/graphql.cabal index d19731c..0a72430 100644 --- a/graphql.cabal +++ b/graphql.cabal @@ -14,7 +14,7 @@ copyright: Copyright (C) 2015 J. Daniel Navarro category: Web build-type: Simple cabal-version: >=1.10 -tested-with: GHC == 7.10 +tested-with: GHC == 7.8, GHC == 7.10 extra-source-files: README.md CHANGELOG.md stack.yaml data-files: tests/data/*.graphql tests/data/*.graphql.golden diff --git a/stack-7.10.yaml b/stack-7.10.yaml new file mode 100644 index 0000000..bee0443 --- /dev/null +++ b/stack-7.10.yaml @@ -0,0 +1,5 @@ +flags: {} +packages: +- '.' +extra-deps: [] +resolver: lts-3.4 diff --git a/stack-7.8.yaml b/stack-7.8.yaml new file mode 100644 index 0000000..809bd2e --- /dev/null +++ b/stack-7.8.yaml @@ -0,0 +1,5 @@ +flags: {} +packages: +- '.' +extra-deps: [] +resolver: lts-2.22 diff --git a/stack.yaml b/stack.yaml index bee0443..177aa94 100644..120000 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1 @@ -flags: {} -packages: -- '.' -extra-deps: [] -resolver: lts-3.4 +stack-7.10.yaml
\ No newline at end of file diff --git a/tests/golden.hs b/tests/golden.hs index 2323a97..98413eb 100644 --- a/tests/golden.hs +++ b/tests/golden.hs @@ -1,6 +1,10 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Main where +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative ((<$>), (<*>), pure) +#endif import Control.Monad ((>=>)) import Data.Attoparsec.Text (parseOnly) import Data.ByteString.Lazy.Char8 as B8 |
