Support GHC-8.4.1 and newer deps

This commit is contained in:
Oleg Grenrus 2018-03-15 10:46:30 +02:00
parent 1d55429f25
commit c34bd1cfde
12 changed files with 67 additions and 59 deletions

View File

@ -70,9 +70,9 @@ install:
- rm -fv cabal.project cabal.project.local
- "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/basic-auth\" \"doc/cookbook/https\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/file-upload\"\\n' > cabal.project"
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/https\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/file-upload\"\\n' > cabal.project"
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server, http-media:base' >> cabal.project"
- cat cabal.project
- if [ -f "servant/configure.ac" ]; then
(cd "servant" && autoreconf -i);
@ -95,18 +95,6 @@ install:
- if [ -f "doc/tutorial/configure.ac" ]; then
(cd "doc/tutorial" && autoreconf -i);
fi
- if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then
(cd "doc/cookbook/db-postgres-pool" && autoreconf -i);
fi
- if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
(cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
fi
- if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
(cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
fi
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
(cd "doc/cookbook/basic-auth" && autoreconf -i);
fi
- if [ -f "doc/cookbook/https/configure.ac" ]; then
(cd "doc/cookbook/https" && autoreconf -i);
fi
@ -120,7 +108,7 @@ install:
(cd "doc/cookbook/file-upload" && autoreconf -i);
fi
- rm -f cabal.project.freeze
- rm -rf "servant"/.ghc.environment.* "servant-client"/.ghc.environment.* "servant-client-core"/.ghc.environment.* "servant-docs"/.ghc.environment.* "servant-foreign"/.ghc.environment.* "servant-server"/.ghc.environment.* "doc/tutorial"/.ghc.environment.* "doc/cookbook/db-postgres-pool"/.ghc.environment.* "doc/cookbook/jwt-and-basic-auth"/.ghc.environment.* "doc/cookbook/db-sqlite-simple"/.ghc.environment.* "doc/cookbook/basic-auth"/.ghc.environment.* "doc/cookbook/https"/.ghc.environment.* "doc/cookbook/structuring-apis"/.ghc.environment.* "doc/cookbook/using-custom-monad"/.ghc.environment.* "doc/cookbook/file-upload"/.ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/https"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/file-upload"/dist
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/https"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/file-upload"/dist
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
# Here starts the actual work to be performed for the package under test;
@ -135,22 +123,18 @@ script:
- (cd "servant-foreign" && cabal sdist)
- (cd "servant-server" && cabal sdist)
- (cd "doc/tutorial" && cabal sdist)
- (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
- (cd "doc/cookbook/jwt-and-basic-auth" && cabal sdist)
- (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
- (cd "doc/cookbook/basic-auth" && cabal sdist)
- (cd "doc/cookbook/https" && cabal sdist)
- (cd "doc/cookbook/structuring-apis" && cabal sdist)
- (cd "doc/cookbook/using-custom-monad" && cabal sdist)
- (cd "doc/cookbook/file-upload" && cabal sdist)
- echo -en 'travis_fold:end:sdist\\r'
- echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/jwt-and-basic-auth"/dist/cookbook-jwt-and-basic-auth-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz ${DISTDIR}/
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-https-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-file-upload-*/*.cabal\\n' > cabal.project"
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-https-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-file-upload-*/*.cabal\\n' > cabal.project"
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server, http-media:base' >> cabal.project"
- cat cabal.project
- echo -en 'travis_fold:end:unpack\\r'

View File

@ -5,7 +5,18 @@ packages: servant/
servant-foreign/
servant-server/
doc/tutorial/
doc/cookbook/*/*.cabal
-- doc/cookbook/*/*.cabal
-- doc/cookbook/db-postgres-pool
-- doc/cookbook/jwt-and-basic-auth
-- doc/cookbook/db-sqlite-simple
-- doc/cookbook/basic-auth
doc/cookbook/https
doc/cookbook/structuring-apis
doc/cookbook/using-custom-monad
doc/cookbook/file-upload
allow-newer:
servant-js:servant,
@ -21,3 +32,6 @@ constraints:
-- see https://github.com/haskell-infra/hackage-trustees/issues/119
foundation >=0.0.14,
memory <0.14.12 || >0.14.12
allow-newer:
http-media:base

View File

@ -34,7 +34,7 @@ library
-- Packages `servant` depends on.
-- We don't need to specify bounds here as this package is never released.
build-depends:
base >= 4.7 && <4.11
base >= 4.7 && <4.12
, aeson
, aeson-compat
, attoparsec

View File

@ -45,7 +45,7 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10.4.0 && < 0.11
, containers >= 0.5.5.1 && < 0.6
, mtl >= 2.1 && < 2.3
@ -64,7 +64,7 @@ library
build-depends:
base-compat >= 0.9.3 && < 0.10
, base64-bytestring >= 1.0.0.1 && < 1.1
, exceptions >= 0.8.3 && < 0.9
, exceptions >= 0.8.3 && < 0.11
, generics-sop >= 0.3.1.0 && < 0.4
, http-api-data >= 0.3.7.1 && < 0.4
, http-media >= 0.7.1.1 && < 0.8
@ -95,8 +95,8 @@ test-suite spec
-- Additonal dependencies
build-depends:
deepseq >= 1.3.0.2 && <1.5
, hspec >= 2.4.4 && <2.5
, hspec >= 2.4.4 && <2.6
, QuickCheck >= 2.10.1 && < 2.12
build-tool-depends:
hspec-discover:hspec-discover >= 2.4.4 && <2.5
hspec-discover:hspec-discover >= 2.4.4 && <2.6

View File

@ -31,11 +31,11 @@ library
Servant.Client.Ghcjs
Servant.Client.Internal.XhrClient
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10 && < 0.11
, case-insensitive >= 1.2.0.0 && < 1.3.0.0
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.9
, exceptions >= 0.8 && < 0.11
, ghcjs-base >= 0.2.0.0 && < 0.3.0.0
, ghcjs-prim >= 0.1.0.0 && < 0.2.0.0
, http-media >= 0.6.2 && < 0.8

View File

@ -41,7 +41,7 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10.4.0 && < 0.11
, containers >= 0.5.5.1 && < 0.6
, mtl >= 2.1 && < 2.3
@ -59,19 +59,19 @@ library
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.
-- Here can be exceptions if we really need features from the newer versions.
build-depends:
aeson >= 1.2.3.0 && < 1.3
aeson >= 1.2.3.0 && < 1.4
, base-compat >= 0.9.3 && < 0.10
, attoparsec >= 0.13.2.0 && < 0.14
, http-client >= 0.5.7.1 && < 0.6
, http-client-tls >= 0.3.5.1 && < 0.4
, http-media >= 0.7.1.1 && < 0.8
, http-types >= 0.12 && < 0.13
, exceptions >= 0.8.3 && < 0.9
, exceptions >= 0.8.3 && < 0.11
, monad-control >= 1.0.0.4 && < 1.1
, semigroupoids >= 5.2.1 && < 5.3
, stm >= 2.4.4.1 && < 2.5
, transformers-base >= 0.4.4 && < 0.5
, transformers-compat >= 0.5.1 && < 0.6
, transformers-compat >= 0.5.1 && < 0.7
hs-source-dirs: src
default-language: Haskell2010
@ -114,7 +114,7 @@ test-suite spec
build-depends:
deepseq >= 1.3.0.2 && < 1.5
, generics-sop >= 0.3.1.0 && < 0.4
, hspec >= 2.4.4 && < 2.5
, hspec >= 2.4.4 && < 2.6
, HUnit >= 1.6 && < 1.7
, network >= 2.6.3.2 && < 2.7
, QuickCheck >= 2.10.1 && < 2.12
@ -122,4 +122,4 @@ test-suite spec
, servant-server == 0.13.*
build-tool-depends:
hspec-discover:hspec-discover >= 2.4.4 && < 2.5
hspec-discover:hspec-discover >= 2.4.4 && < 2.6

View File

@ -41,7 +41,7 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10.4.0 && < 0.11
, text >= 1.2.3.0 && < 1.3
@ -56,7 +56,7 @@ library
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.
-- Here can be exceptions if we really need features from the newer versions.
build-depends:
aeson >= 1.2.3.0 && < 1.3
aeson >= 1.2.3.0 && < 1.4
, aeson-pretty >= 0.8.5 && < 0.9
, base-compat >= 0.9.3 && < 0.10
, case-insensitive >= 1.2.0.10 && < 1.3
@ -108,7 +108,7 @@ test-suite spec
-- Additonal dependencies
build-depends:
hspec >= 2.4.4 && < 2.5
hspec >= 2.4.4 && < 2.6
build-tool-depends:
hspec-discover:hspec-discover >=2.4.4 && <2.5
hspec-discover:hspec-discover >=2.4.4 && <2.6

View File

@ -1,6 +1,11 @@
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-foreign/CHANGELOG.md)
[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
0.11.1
------
- Add missing `Semigroup` instances
0.11
----

View File

@ -1,5 +1,5 @@
name: servant-foreign
version: 0.11
version: 0.11.1
synopsis: Helpers for generating clients for servant APIs in any programming language
description:
Helper types and functions for generating client functions for servant APIs in any programming language
@ -42,9 +42,13 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && <4.11
base >= 4.7 && <4.12
, text >= 1.2.3.0 && < 1.3
if !impl(ghc >= 8.0)
build-depends:
semigroups >=0.18.3 && <0.19
-- Servant dependencies
build-depends:
servant == 0.13.*
@ -79,8 +83,8 @@ test-suite spec
-- Additonal dependencies
build-depends:
hspec >= 2.4.4 && <2.5
hspec >= 2.4.4 && <2.6
build-tool-depends:
hspec-discover:hspec-discover >=2.4.4 && <2.5
hspec-discover:hspec-discover >=2.4.4 && <2.6
default-language: Haskell2010

View File

@ -27,6 +27,7 @@ import Control.Lens (makePrisms, makeLenses, Getter, (&), (<>~), (%~),
(.~))
import Data.Data (Data)
import Data.Proxy
import Data.Semigroup (Semigroup)
import Data.String
import Data.Text
import Data.Typeable (Typeable)
@ -38,12 +39,12 @@ import Servant.API.TypeLevel
import Servant.API.Modifiers (RequiredArgument)
newtype FunctionName = FunctionName { unFunctionName :: [Text] }
deriving (Data, Show, Eq, Monoid, Typeable)
deriving (Data, Show, Eq, Semigroup, Monoid, Typeable)
makePrisms ''FunctionName
newtype PathSegment = PathSegment { unPathSegment :: Text }
deriving (Data, Show, Eq, IsString, Monoid, Typeable)
deriving (Data, Show, Eq, IsString, Semigroup, Monoid, Typeable)
makePrisms ''PathSegment

View File

@ -60,7 +60,7 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10.4.0 && < 0.11
, containers >= 0.5.5.1 && < 0.6
, mtl >= 2.1 && < 2.3
@ -75,11 +75,11 @@ library
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.
-- Here can be exceptions if we really need features from the newer versions.
build-depends:
aeson >= 1.2.3.0 && < 1.3
aeson >= 1.2.3.0 && < 1.4
, base-compat >= 0.9.3 && < 0.10
, attoparsec >= 0.13.2.0 && < 0.14
, base64-bytestring >= 1.0.0.1 && < 1.1
, exceptions >= 0.8.3 && < 0.9
, exceptions >= 0.8.3 && < 0.11
, http-api-data >= 0.3.7.1 && < 0.4
, http-media >= 0.7.1.1 && < 0.8
, http-types >= 0.12 && < 0.13
@ -93,7 +93,7 @@ library
, resourcet >= 1.1.9 && < 1.3
, tagged >= 0.8.5 && < 0.9
, transformers-base >= 0.4.4 && < 0.5
, transformers-compat >= 0.5.1 && < 0.6
, transformers-compat >= 0.5.1 && < 0.7
, wai >= 3.2.1.1 && < 3.3
, wai-app-static >= 3.1.6.1 && < 3.2
, warp >= 3.2.13 && < 3.3
@ -164,7 +164,7 @@ test-suite spec
-- Additonal dependencies
build-depends:
directory >= 1.2.1.0 && < 1.4
, hspec >= 2.4.4 && < 2.5
, hspec >= 2.4.4 && < 2.6
, hspec-wai >= 0.9 && < 0.10
, should-not-typecheck >= 2.1.0 && < 2.2
, parsec >= 3.1.11 && < 3.2
@ -173,13 +173,13 @@ test-suite spec
, temporary >= 1.2.0.3 && < 1.3
build-tool-depends:
hspec-discover:hspec-discover >=2.4.4 && <2.5
hspec-discover:hspec-discover >=2.4.4 && <2.6
test-suite doctests
build-depends:
base
, servant-server
, doctest >= 0.13.0 && <0.14
, doctest >= 0.13.0 && <0.16
type: exitcode-stdio-1.0
main-is: test/doctests.hs
buildable: True

View File

@ -69,7 +69,7 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
base >= 4.7 && < 4.11
base >= 4.7 && < 4.12
, bytestring >= 0.10.4.0 && < 0.11
, mtl >= 2.1 && < 2.3
, text >= 1.2.3.0 && < 1.3
@ -82,7 +82,7 @@ library
-- Here can be exceptions if we really need features from the newer versions.
build-depends:
base-compat >= 0.9.3 && < 0.10
, aeson >= 1.2.3.0 && < 1.3
, aeson >= 1.2.3.0 && < 1.4
, attoparsec >= 0.13.2.0 && < 0.14
, case-insensitive >= 1.2.0.10 && < 1.3
, http-api-data >= 0.3.7.1 && < 0.4
@ -153,22 +153,22 @@ test-suite spec
-- Additonal dependencies
build-depends:
aeson-compat >= 0.3.3 && < 0.4
, hspec >= 2.4.4 && < 2.5
, hspec >= 2.4.4 && < 2.6
, QuickCheck >= 2.10.1 && < 2.12
, quickcheck-instances >= 0.3.16 && < 0.4
build-tool-depends:
hspec-discover:hspec-discover >= 2.4.4 && < 2.5
hspec-discover:hspec-discover >= 2.4.4 && < 2.6
test-suite doctests
build-depends:
base
, servant
, doctest >= 0.13.0 && <0.14
, doctest >= 0.13.0 && <0.16
-- We test Links failure with doctest, so we need extra dependencies
build-depends:
hspec >= 2.4.4 && < 2.5
hspec >= 2.4.4 && < 2.6
type: exitcode-stdio-1.0
main-is: test/doctests.hs