Merge pull request #1184 from haskell-servant/backport-bouns

Backport bouns
This commit is contained in:
Oleg Grenrus 2019-05-28 17:57:39 +03:00 committed by GitHub
commit 6d8a7d6b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 124 additions and 73 deletions

View File

@ -4,7 +4,7 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.3.20190413
# version: 0.3.20190521
#
language: c
dist: xenial
@ -30,8 +30,8 @@ before_cache:
- rm -rfv $CABALHOME/packages/head.hackage
matrix:
include:
- compiler: ghc-8.6.4
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.4","cabal-install-2.4"]}}
- compiler: ghc-8.6.5
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
- compiler: ghc-8.4.4
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
- compiler: ghc-8.2.2
@ -83,6 +83,7 @@ install:
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
@ -110,19 +111,19 @@ install:
echo 'packages: "servant-machines"' >> cabal.project
echo 'packages: "servant-conduit"' >> cabal.project
echo 'packages: "servant-pipes"' >> cabal.project
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/basic-auth"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/curl-mock"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/basic-streaming"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/db-postgres-pool"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/db-sqlite-simple"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/file-upload"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/generic"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/https"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/pagination"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/testing"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/structuring-apis"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/using-custom-monad"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "doc/cookbook/using-free-client"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/basic-auth"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/curl-mock"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/basic-streaming"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/db-postgres-pool"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/db-sqlite-simple"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/file-upload"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/generic"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/https"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/pagination"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/testing"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/structuring-apis"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/using-custom-monad"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "doc/cookbook/using-free-client"' >> cabal.project ; fi
- |
echo "constraints: foundation >=0.0.14" >> cabal.project
echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
@ -131,10 +132,15 @@ install:
echo "allow-newer: servant-quickcheck:servant-server" >> cabal.project
echo "allow-newer: servant-quickcheck:hspec" >> cabal.project
echo "allow-newer: servant-quickcheck:http-client" >> cabal.project
echo "allow-newer: http-media" >> cabal.project
echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
echo "optimization: False" >> cabal.project
echo "write-ghc-environment-files: always" >> cabal.project
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "servant/configure.ac" ]; then (cd "servant" && autoreconf -i); fi
@ -190,19 +196,19 @@ script:
echo 'packages: "servant-machines-*/*.cabal"' >> cabal.project
echo 'packages: "servant-conduit-*/*.cabal"' >> cabal.project
echo 'packages: "servant-pipes-*/*.cabal"' >> cabal.project
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-basic-auth-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-curl-mock-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-basic-streaming-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-db-postgres-pool-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-db-sqlite-simple-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-file-upload-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-generic-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-https-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-pagination-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-testing-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-structuring-apis-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-using-custom-monad-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then echo 'packages: "cookbook-using-free-client-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-basic-auth-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-curl-mock-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-basic-streaming-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-db-postgres-pool-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-db-sqlite-simple-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-file-upload-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-generic-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-https-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-pagination-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-testing-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-structuring-apis-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-using-custom-monad-*/*.cabal"' >> cabal.project ; fi
if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80605 ] ; then echo 'packages: "cookbook-using-free-client-*/*.cabal"' >> cabal.project ; fi
- |
echo "constraints: foundation >=0.0.14" >> cabal.project
echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
@ -211,10 +217,15 @@ script:
echo "allow-newer: servant-quickcheck:servant-server" >> cabal.project
echo "allow-newer: servant-quickcheck:hspec" >> cabal.project
echo "allow-newer: servant-quickcheck:http-client" >> cabal.project
echo "allow-newer: http-media" >> cabal.project
echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
echo "optimization: False" >> cabal.project
echo "write-ghc-environment-files: always" >> cabal.project
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
- echo -en 'travis_fold:end:unpack\\r'

View File

@ -52,4 +52,15 @@ allow-newer:
servant-quickcheck:hspec,
servant-quickcheck:http-client
allow-newer: http-media
-- constraints: semigroups ^>=0.19
-- constraints: hashable ^>=1.3
-- constraints: network ^>=3.1
-- constraints: machines ^>=0.7
-- constraints: http-media ^>=0.8
allow-newer: vault-0.3.1.2:hashable
allow-newer: psqueues-0.2.7.1:hashable
allow-newer: sqlite-simple-0.4.16.0:semigroups
allow-newer: direct-sqlite-2.3.24:semigroups
allow-newer: io-streams-1.5.1.0:network
allow-newer: openssl-streams-1.2.2.0:network

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-basic-auth
main-is: BasicAuth.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-basic-streaming
main-is: Streaming.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbock-curl-mock
main-is: CurlMock.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-db-postgres-pool
main-is: PostgresPool.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-db-sqlite-simple
main-is: DBConnection.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-file-upload
main-is: FileUpload.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-using-custom-monad
main-is: Generic.lhs

View File

@ -11,7 +11,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
category: Servant
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-hoist-server-with-context
main-is: HoistServerWithContext.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-https
main-is: Https.lhs

View File

@ -11,7 +11,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
category: Servant
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-jwt-and-basic-auth
main-is: JWTAndBasicAuth.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-pagination
main-is: Pagination.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-sentry
main-is: Sentry.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-structuring-apis
main-is: StructuringApis.lhs

View File

@ -10,7 +10,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
category: Servant
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-testing
main-is: Testing.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-using-custom-monad
main-is: UsingCustomMonad.lhs

View File

@ -8,7 +8,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==8.4.4, GHC==8.6.4
tested-with: GHC==8.4.4, GHC==8.6.5
executable cookbook-using-free-client
main-is: UsingFreeClient.lhs

View File

@ -16,7 +16,7 @@ tested-with:
GHC==8.0.2
GHC==8.2.2
GHC==8.4.4
GHC==8.6.4
GHC==8.6.5
extra-source-files:
static/index.html
static/ui.js

View File

@ -21,7 +21,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md

View File

@ -25,7 +25,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -118,7 +118,7 @@ test-suite spec
entropy >= 0.4.1.3 && < 0.5
, hspec >= 2.6.0 && < 2.8
, HUnit >= 1.6.0.0 && < 1.7
, network >= 2.8.0.0 && < 3.1
, network >= 2.8.0.0 && < 3.2
, QuickCheck >= 2.12.6.1 && < 2.14
, servant == 0.16.*
, servant-server == 0.16.*

View File

@ -21,7 +21,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md

View File

@ -24,7 +24,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -62,7 +62,7 @@ library
, base-compat >= 0.10.5 && < 0.11
, case-insensitive >= 1.2.0.11 && < 1.3
, control-monad-omega >= 0.3.1 && < 0.4
, hashable >= 1.2.7.0 && < 1.3
, hashable >= 1.2.7.0 && < 1.4
, http-media >= 0.7.1.3 && < 0.9
, http-types >= 0.12.2 && < 0.13
, lens >= 4.17 && < 4.18

View File

@ -26,7 +26,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md

View File

@ -25,7 +25,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -119,7 +119,7 @@ test-suite spec
entropy >= 0.4.1.3 && < 0.5
, hspec >= 2.6.0 && < 2.8
, HUnit >= 1.6.0.0 && < 1.7
, network >= 2.8.0.0 && < 3.1
, network >= 2.8.0.0 && < 3.2
, QuickCheck >= 2.12.6.1 && < 2.14
, servant == 0.16.*
, servant-server == 0.16.*

View File

@ -1,7 +1,7 @@
cabal-version: >=1.10
name: servant-machines
version: 0.15
x-revision: 1
x-revision: 2
synopsis: Servant Stream support for machines
category: Servant, Web, Enumerator
@ -21,7 +21,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -35,7 +35,7 @@ library
build-depends:
base >=4.9 && <5
, bytestring >=0.10.8.1 && <0.11
, machines >=0.6.4 && <0.7
, machines >=0.6.4 && <0.8
, mtl >=2.2.2 && <2.3
, servant >=0.15 && <0.17
hs-source-dirs: src

View File

@ -21,7 +21,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md

View File

@ -1,7 +1,6 @@
cabal-version: >=1.10
name: servant-server
version: 0.16
x-revision: 1
version: 0.16.1
synopsis: A family of combinators for defining webservices APIs and serving them
category: Servant, Web
@ -28,7 +27,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -80,8 +79,8 @@ library
-- Servant dependencies
-- strict dependency as we re-export 'servant' things.
build-depends:
servant >= 0.16 && < 0.17.1
, http-api-data >= 0.4 && < 0.4.1
servant >= 0.16.1 && < 0.16.2
, http-api-data >= 0.4.1 && < 0.4.2
-- 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.
@ -93,7 +92,7 @@ library
, http-types >= 0.12.2 && < 0.13
, network-uri >= 2.6.1.0 && < 2.8
, monad-control >= 1.0.2.3 && < 1.1
, network >= 2.8 && < 3.1
, network >= 2.8 && < 3.2
, string-conversions >= 0.4.0.1 && < 0.5
, resourcet >= 1.2.2 && < 1.3
, tagged >= 0.8.6 && < 0.9

View File

@ -1,6 +1,6 @@
cabal-version: >=1.10
name: servant
version: 0.16.0.1
version: 0.16.1
synopsis: A family of combinators for defining webservices APIs
category: Servant, Web
@ -24,7 +24,7 @@ tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.4
|| ==8.6.5
extra-source-files:
CHANGELOG.md
@ -98,7 +98,7 @@ library
-- We depend (heavily) on the API of these packages:
-- i.e. re-export, or allow using without direct dependency
build-depends:
http-api-data >= 0.4 && < 0.4.1
http-api-data >= 0.4.1 && < 0.4.2
, singleton-bool >= 0.1.4 && < 0.1.5
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.

View File

@ -89,6 +89,20 @@ instance MFunctor SourceT where
hoist f (SourceT m) = SourceT $ \k -> k $
Effect $ f $ fmap (hoist f) $ m return
-- | >>> source "xy" <> source "z" :: SourceT Identity Char
-- fromStepT (Effect (Identity (Yield 'x' (Yield 'y' (Yield 'z' Stop)))))
--
instance Functor m => Semigroup (SourceT m a) where
SourceT withL <> SourceT withR = SourceT $ \ret ->
withL $ \l ->
withR $ \r ->
ret $ l <> r
-- | >>> mempty :: SourceT Maybe Int
-- fromStepT (Effect (Just Stop))
instance Functor m => Monoid (SourceT m a) where
mempty = fromStepT mempty
-- | Doesn't generate 'Error' constructors. 'SourceT' doesn't shrink.
instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (SourceT m a) where
arbitrary = fromStepT <$> QC.arbitrary
@ -150,6 +164,22 @@ instance MFunctor StepT where
go (Yield x s) = Yield x (go s)
go (Effect ms) = Effect (f (fmap go ms))
instance Functor m => Semigroup (StepT m a) where
Stop <> r = r
Error err <> _ = Error err
Skip s <> r = Skip (s <> r)
Yield x s <> r = Yield x (s <> r)
Effect ms <> r = Effect ((<> r) <$> ms)
-- | >>> mempty :: StepT [] Int
-- Stop
--
-- >>> mempty :: StepT Identity Int
-- Stop
--
instance Functor m => Monoid (StepT m a) where
mempty = Stop
-- | Doesn't generate 'Error' constructors.
instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (StepT m a) where
arbitrary = QC.sized arb where