git.iko.soy/servant-quickcheck
on master help sign in
5 files changed+42−15
since splitsnapshots
unifiedsplit
.travis.yml+18−10 CHANGELOG.yaml+10 cabal.project+2 servant-quickcheck.cabal+5−5 src/Servant/QuickCheck/Internal/QuickCheck.hs+7
.travis.yml+18−10
@@ -2,9 +2,13 @@
22#
33# haskell-ci '--config=cabal.haskell-ci' 'servant-quickcheck.cabal'
44#
5+# To regenerate the script (for example after adjusting tested-with) run
6+#
7+# haskell-ci regenerate
8+#
59# For more information, see https://github.com/haskell-CI/haskell-ci
610#
7−# version: 0.9.20200121
11+# version: 0.10.1
812#
913version: ~> 1.0
1014language: c
@@ -32,20 +36,20 @@ before_cache:
3236 - rm -rfv $CABALHOME/packages/head.hackage
3337jobs:
3438 include:
35− - compiler: ghc-8.8.1
36− addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
39+ - compiler: ghc-8.8.3
40+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
3741 os: linux
3842 - compiler: ghc-8.6.5
39− addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
43+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
4044 os: linux
4145 - compiler: ghc-8.4.4
42− addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
46+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
4347 os: linux
4448 - compiler: ghc-8.2.2
45− addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
49+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
4650 os: linux
4751 - compiler: ghc-8.0.2
48− addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
52+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
4953 os: linux
5054before_install:
5155 - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
@@ -95,6 +99,8 @@ install:
9599 - touch cabal.project
96100 - |
97101 echo "packages: ." >> cabal.project
102+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-quickcheck' >> cabal.project ; fi
103+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
98104 - |
99105 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-quickcheck)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
100106 - cat cabal.project || true
@@ -103,8 +109,8 @@ install:
103109 - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
104110 - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
105111 - rm cabal.project.freeze
106− - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
107− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
112+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
113+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
108114script:
109115 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
110116 # Packaging...
@@ -120,6 +126,8 @@ script:
120126 - touch cabal.project
121127 - |
122128 echo "packages: ${PKGDIR_servant_quickcheck}" >> cabal.project
129+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-quickcheck' >> cabal.project ; fi
130+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
123131 - |
124132 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-quickcheck)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
125133 - cat cabal.project || true
@@ -146,5 +154,5 @@ script:
146154 # Constraint set base-compat-0.11
147155 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='base-compat ==0.11.*' all
148156
149−# REGENDATA ("0.9.20200121",["--config=cabal.haskell-ci","servant-quickcheck.cabal"])
157+# REGENDATA ("0.10.1",["--config=cabal.haskell-ci","servant-quickcheck.cabal"])
150158# EOF
CHANGELOG.yaml+10
@@ -1,4 +1,14 @@
11releases:
2+ - version: "0.0.9.0"
3+ changes:
4+ - description: "Support servant-0.15 (#65)"
5+ authors: fizruk
6+ date: 2020-06-25
7+
8+ - description: "Relax constraints for GHC 8.10 (#70)"
9+ authors: felixmulder
10+ date: 2020-06-20
11+
212 - version: "0.0.8.0"
313 changes:
414 - description: Support for servant-0.17
cabal.project+2
@@ -1,2 +1,4 @@
11packages: .
22tests: true
3+
4+allow-newer: servant-blaze:servant
servant-quickcheck.cabal+5−5
@@ -1,5 +1,5 @@
11name: servant-quickcheck
2−version: 0.0.8.0
2+version: 0.0.9.1
33synopsis: QuickCheck entire APIs
44description:
55 This packages provides QuickCheck properties that are tested across an entire
@@ -13,7 +13,7 @@ category: Web
1313build-type: Simple
1414cabal-version: >=1.10
1515extra-source-files: CHANGELOG.yaml
16−tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || == 8.8.1
16+tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || == 8.8.3
1717
1818source-repository head
1919 type: git
@@ -49,9 +49,9 @@ library
4949 , pretty >=1.1 && <1.2
5050 , process >=1.2 && <1.7
5151 , QuickCheck >=2.7 && <2.15
52− , servant >=0.15 && <0.18
53− , servant-client >=0.15 && <0.18
54− , servant-server >=0.15 && <0.18
52+ , servant >=0.17 && <0.19
53+ , servant-client >=0.17 && <0.19
54+ , servant-server >=0.17 && <0.19
5555 , split >=0.2 && <0.3
5656 , string-conversions >=0.3 && <0.5
5757 , temporary >=1.2 && <1.4
src/Servant/QuickCheck/Internal/QuickCheck.hs+7
@@ -11,6 +11,9 @@ import Network.Wai.Handler.Warp (withApplication)
1111import Prelude.Compat
1212import Servant (Context (EmptyContext), HasServer,
1313 Server, serveWithContext)
14+#if MIN_VERSION_servant_server(0,18,0)
15+import Servant (DefaultErrorFormatters, ErrorFormatters, HasContextEntry, type (.++))
16+#endif
1417import Servant.Client (BaseUrl (..), Scheme (..))
1518import System.IO.Unsafe (unsafePerformIO)
1619import Test.Hspec (Expectation, expectationFailure)
@@ -37,7 +40,11 @@ withServantServer api = withServantServerAndContext api EmptyContext
3740-- application.
3841--
3942-- /Since 0.0.0.0/
43+#if MIN_VERSION_servant_server(0,18,0)
44+withServantServerAndContext :: (HasServer a ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters)
45+#else
4046withServantServerAndContext :: HasServer a ctx
47+#endif
4148 => Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r
4249withServantServerAndContext api ctx server t
4350 = withApplication (return . serveWithContext api ctx =<< server) $ \port ->