Compare commits
34 Commits
master
...
release-0.
Author | SHA1 | Date |
---|---|---|
Oleg Grenrus | 135d993ea5 | |
Oleg Grenrus | 8ed0e9e258 | |
Oleg Grenrus | e0b448706d | |
Oleg Grenrus | 2c23e87119 | |
Oleg Grenrus | 0003bd122d | |
Oleg Grenrus | 1836172655 | |
Oleg Grenrus | 226154218b | |
Oleg Grenrus | e8e1efb67e | |
Oleg Grenrus | 589c65fb99 | |
Oleg Grenrus | 9c6911150a | |
Oleg Grenrus | fbe09bedb1 | |
Oleg Grenrus | 12b3849048 | |
Oleg Grenrus | 759b85a1c5 | |
Oleg Grenrus | 87247211e6 | |
Oleg Grenrus | 598dc79492 | |
Oleg Grenrus | 2563aa508c | |
Oleg Grenrus | 5285011233 | |
Oleg Grenrus | 3615acb53e | |
Oleg Grenrus | 4cc4641dc1 | |
Oleg Grenrus | e0d3f7850e | |
Oleg Grenrus | b34355df7c | |
Oleg Grenrus | e5f0e7b799 | |
Oleg Grenrus | e5adb20a8b | |
Oleg Grenrus | 6d8a7d6b90 | |
Oleg Grenrus | 9142c7375d | |
Science! | 8e2be01ba9 | |
Oleg Grenrus | ae94e0ea2b | |
Felix Yan | 002b096fdb | |
Oleg Grenrus | 24778daeef | |
Oleg Grenrus | 269da4f7be | |
Oleg Grenrus | 62fa0bec91 | |
Oleg Grenrus | 05d975c20e | |
Oleg Grenrus | 8907d44c34 | |
Oleg Grenrus | 9cb6765976 |
|
@ -0,0 +1,51 @@
|
|||
# Control which extensions/flags/modules/functions can be used
|
||||
#
|
||||
- extensions:
|
||||
- default: false # all extension are banned by default
|
||||
- name:
|
||||
- CPP
|
||||
- DataKinds
|
||||
- DeriveDataTypeable
|
||||
- DeriveFoldable
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- DeriveTraversable
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- FunctionalDependencies
|
||||
- GADTs
|
||||
- KindSignatures
|
||||
- MultiParamTypeClasses
|
||||
- OverloadedStrings
|
||||
- PolyKinds
|
||||
- RankNTypes
|
||||
- ScopedTypeVariables
|
||||
- TypeFamilies
|
||||
- TypeOperators
|
||||
- UndecidableInstances
|
||||
|
||||
- modules:
|
||||
- {name: [Data.Set], as: Set}
|
||||
- {name: Control.Arrow, within: []} # Certain modules are banned entirely
|
||||
|
||||
- functions:
|
||||
- {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
|
||||
|
||||
# Turn on hints that are off by default
|
||||
#
|
||||
# Ban "module X(module X) where", to require a real export list
|
||||
- warn: {name: Use explicit module export list}
|
||||
|
||||
# Ignore some builtin hints
|
||||
- ignore: {name: Redundant do}
|
||||
- ignore: {name: Parse error}
|
||||
- ignore: {name: Use fmap}
|
||||
- ignore: {name: "Use <$>"}
|
||||
- ignore: {name: Use list comprehension}
|
||||
- ignore: {name: Use lambda-case}
|
||||
- ignore: {name: Eta reduce}
|
||||
|
||||
# Add custom hints for this project
|
||||
#
|
||||
# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
|
||||
# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
|
313
.travis.yml
313
.travis.yml
|
@ -4,23 +4,21 @@
|
|||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
# version: 0.2.1
|
||||
# version: 0.5.20190908
|
||||
#
|
||||
language: c
|
||||
dist: xenial
|
||||
|
||||
git:
|
||||
submodules: false # whether to recursively clone submodules
|
||||
|
||||
# whether to recursively clone submodules
|
||||
submodules: false
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
- release-0.16
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cabal/packages
|
||||
- $HOME/.cabal/store
|
||||
|
||||
before_cache:
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
|
||||
# remove files that are regenerated by 'cabal update'
|
||||
|
@ -29,79 +27,120 @@ before_cache:
|
|||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
|
||||
|
||||
- rm -rfv $CABALHOME/packages/head.hackage
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: "ghc-8.6.4"
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.4.4"
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.2.2"
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.0.2"
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
|
||||
|
||||
- compiler: ghc-8.8.1
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.6.5
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.4.4
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.2.2
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.0.2
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
|
||||
before_install:
|
||||
- HC=/opt/ghc/bin/${CC}
|
||||
- HCPKG=${HC/ghc/ghc-pkg}
|
||||
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
|
||||
- WITHCOMPILER="-w $HC"
|
||||
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
|
||||
- HCPKG="$HC-pkg"
|
||||
- unset CC
|
||||
- CABAL=/opt/ghc/bin/cabal
|
||||
- CABALHOME=$HOME/.cabal
|
||||
- export PATH="$CABALHOME/bin:$PATH"
|
||||
- ROOTDIR=$(pwd)
|
||||
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
|
||||
- TOP=$(pwd)
|
||||
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
|
||||
- echo $HCNUMVER
|
||||
|
||||
- CABAL="$CABAL -vnormal+nowrap+markoutput"
|
||||
- set -o pipefail
|
||||
- |
|
||||
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
|
||||
echo 'BEGIN { state = "output"; }' >> .colorful.awk
|
||||
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
|
||||
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
|
||||
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
|
||||
echo ' if (state == "cabal") {' >> .colorful.awk
|
||||
echo ' print blue($0)' >> .colorful.awk
|
||||
echo ' } else {' >> .colorful.awk
|
||||
echo ' print $0' >> .colorful.awk
|
||||
echo ' }' >> .colorful.awk
|
||||
echo '}' >> .colorful.awk
|
||||
- cat .colorful.awk
|
||||
- |
|
||||
color_cabal_output () {
|
||||
awk -f $TOP/.colorful.awk
|
||||
}
|
||||
- echo text | color_cabal_output
|
||||
install:
|
||||
- ${CABAL} --version
|
||||
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||
- TEST=--enable-tests
|
||||
- BENCH=--enable-benchmarks
|
||||
- GHCHEAD=${GHCHEAD-false}
|
||||
- travis_retry ${CABAL} update -v
|
||||
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
|
||||
- rm -fv cabal.project cabal.project.local
|
||||
- "sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' $CABALHOME/config"
|
||||
- grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
|
||||
- rm -f cabal.project
|
||||
- HEADHACKAGE=false
|
||||
- rm -f $CABALHOME/config
|
||||
- |
|
||||
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
|
||||
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
|
||||
echo "write-ghc-environment-files: always" >> $CABALHOME/config
|
||||
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
|
||||
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
|
||||
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
|
||||
echo " prefix: $CABALHOME" >> $CABALHOME/config
|
||||
echo "repository hackage.haskell.org" >> $CABALHOME/config
|
||||
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
|
||||
- GHCJOBS=-j2
|
||||
- |
|
||||
echo "program-default-options" >> $CABALHOME/config
|
||||
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
|
||||
- cat $CABALHOME/config
|
||||
- rm -fv cabal.project cabal.project.local cabal.project.freeze
|
||||
- travis_retry ${CABAL} v2-update -v
|
||||
# Generate cabal.project
|
||||
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
||||
- touch cabal.project
|
||||
- "printf 'packages: \"servant\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-client\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-client-core\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-http-streams\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-docs\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-foreign\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-server\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"doc/tutorial\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-machines\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-conduit\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-pipes\"\\n' >> cabal.project"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/basic-auth\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/curl-mock\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/basic-streaming\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/db-postgres-pool\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/db-sqlite-simple\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/file-upload\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/generic\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/https\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/pagination\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/testing\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/structuring-apis\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/using-custom-monad\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/using-free-client\"\\n' >> cabal.project ; fi"
|
||||
- "echo 'constraints: foundation >=0.0.14' >> cabal.project"
|
||||
- "echo 'constraints: memory <0.14.12 || >0.14.12' >> cabal.project"
|
||||
- "echo 'allow-newer: servant-quickcheck:servant' >> cabal.project"
|
||||
- "echo 'allow-newer: servant-quickcheck:servant-client' >> cabal.project"
|
||||
- "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 'optimization: False' >> cabal.project "
|
||||
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
|
||||
- touch cabal.project.local
|
||||
- "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"
|
||||
- |
|
||||
echo "packages: servant" >> cabal.project
|
||||
echo "packages: servant-client" >> cabal.project
|
||||
echo "packages: servant-client-core" >> cabal.project
|
||||
echo "packages: servant-http-streams" >> cabal.project
|
||||
echo "packages: servant-docs" >> cabal.project
|
||||
echo "packages: servant-foreign" >> cabal.project
|
||||
echo "packages: servant-server" >> cabal.project
|
||||
echo "packages: doc/tutorial" >> cabal.project
|
||||
echo "packages: servant-machines" >> cabal.project
|
||||
echo "packages: servant-conduit" >> cabal.project
|
||||
echo "packages: servant-pipes" >> cabal.project
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-auth" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/curl-mock" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-streaming" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/db-postgres-pool" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/file-upload" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/generic" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/testing" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/structuring-apis" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/using-custom-monad" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; 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
|
||||
echo "constraints: sqlite-simple < 0" >> cabal.project
|
||||
echo "allow-newer: aeson-pretty-0.8.7:base-compat" >> 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: io-streams-1.5.1.0:primitive" >> cabal.project
|
||||
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
|
||||
echo "optimization: False" >> 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-file-upload|cookbook-generic|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
|
||||
|
@ -119,81 +158,103 @@ install:
|
|||
- if [ -f "doc/cookbook/curl-mock/configure.ac" ]; then (cd "doc/cookbook/curl-mock" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/basic-streaming/configure.ac" ]; then (cd "doc/cookbook/basic-streaming" && 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/db-sqlite-simple/configure.ac" ]; then (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/file-upload/configure.ac" ]; then (cd "doc/cookbook/file-upload" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/generic/configure.ac" ]; then (cd "doc/cookbook/generic" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/https/configure.ac" ]; then (cd "doc/cookbook/https" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/pagination/configure.ac" ]; then (cd "doc/cookbook/pagination" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/testing/configure.ac" ]; then (cd "doc/cookbook/testing" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then (cd "doc/cookbook/structuring-apis" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then (cd "doc/cookbook/using-custom-monad" && autoreconf -i); fi
|
||||
- if [ -f "doc/cookbook/using-free-client/configure.ac" ]; then (cd "doc/cookbook/using-free-client" && autoreconf -i); fi
|
||||
- rm -f cabal.project.freeze
|
||||
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-http-streams"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "servant-machines"/dist "servant-conduit"/dist "servant-pipes"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/curl-mock"/dist "doc/cookbook/basic-streaming"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/file-upload"/dist "doc/cookbook/generic"/dist "doc/cookbook/https"/dist "doc/cookbook/pagination"/dist "doc/cookbook/testing"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/using-free-client"/dist
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
|
||||
# Here starts the actual work to be performed for the package under test;
|
||||
# any command which exits with a non-zero exit code causes the build to fail.
|
||||
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
|
||||
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
||||
- rm cabal.project.freeze
|
||||
script:
|
||||
# test that source-distributions can be generated
|
||||
- echo Packaging... && echo -en 'travis_fold:start:sdist\\r'
|
||||
- ${CABAL} new-sdist all
|
||||
- echo -en 'travis_fold:end:sdist\\r'
|
||||
- echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
# Packaging...
|
||||
- ${CABAL} v2-sdist all | color_cabal_output
|
||||
# Unpacking...
|
||||
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
|
||||
- cd ${DISTDIR} || false
|
||||
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
|
||||
- rm -f cabal.project
|
||||
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
|
||||
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
|
||||
- PKGDIR_servant="$(find . -maxdepth 1 -type d -regex '.*/servant-[0-9.]*')"
|
||||
- PKGDIR_servant_client="$(find . -maxdepth 1 -type d -regex '.*/servant-client-[0-9.]*')"
|
||||
- PKGDIR_servant_client_core="$(find . -maxdepth 1 -type d -regex '.*/servant-client-core-[0-9.]*')"
|
||||
- PKGDIR_servant_http_streams="$(find . -maxdepth 1 -type d -regex '.*/servant-http-streams-[0-9.]*')"
|
||||
- PKGDIR_servant_docs="$(find . -maxdepth 1 -type d -regex '.*/servant-docs-[0-9.]*')"
|
||||
- PKGDIR_servant_foreign="$(find . -maxdepth 1 -type d -regex '.*/servant-foreign-[0-9.]*')"
|
||||
- PKGDIR_servant_server="$(find . -maxdepth 1 -type d -regex '.*/servant-server-[0-9.]*')"
|
||||
- PKGDIR_tutorial="$(find . -maxdepth 1 -type d -regex '.*/tutorial-[0-9.]*')"
|
||||
- PKGDIR_servant_machines="$(find . -maxdepth 1 -type d -regex '.*/servant-machines-[0-9.]*')"
|
||||
- PKGDIR_servant_conduit="$(find . -maxdepth 1 -type d -regex '.*/servant-conduit-[0-9.]*')"
|
||||
- PKGDIR_servant_pipes="$(find . -maxdepth 1 -type d -regex '.*/servant-pipes-[0-9.]*')"
|
||||
- PKGDIR_cookbook_basic_auth="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-auth-[0-9.]*')"
|
||||
- PKGDIR_cookbook_curl_mock="$(find . -maxdepth 1 -type d -regex '.*/cookbook-curl-mock-[0-9.]*')"
|
||||
- PKGDIR_cookbook_basic_streaming="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-streaming-[0-9.]*')"
|
||||
- PKGDIR_cookbook_db_postgres_pool="$(find . -maxdepth 1 -type d -regex '.*/cookbook-db-postgres-pool-[0-9.]*')"
|
||||
- PKGDIR_cookbook_file_upload="$(find . -maxdepth 1 -type d -regex '.*/cookbook-file-upload-[0-9.]*')"
|
||||
- PKGDIR_cookbook_generic="$(find . -maxdepth 1 -type d -regex '.*/cookbook-generic-[0-9.]*')"
|
||||
- PKGDIR_cookbook_testing="$(find . -maxdepth 1 -type d -regex '.*/cookbook-testing-[0-9.]*')"
|
||||
- PKGDIR_cookbook_structuring_apis="$(find . -maxdepth 1 -type d -regex '.*/cookbook-structuring-apis-[0-9.]*')"
|
||||
- PKGDIR_cookbook_using_custom_monad="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-custom-monad-[0-9.]*')"
|
||||
- PKGDIR_cookbook_using_free_client="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-free-client-[0-9.]*')"
|
||||
# Generate cabal.project
|
||||
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
||||
- touch cabal.project
|
||||
- "printf 'packages: \"servant-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-client-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-client-core-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-http-streams-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-docs-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-foreign-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-server-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"tutorial-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-machines-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-conduit-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'packages: \"servant-pipes-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-basic-auth-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-curl-mock-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-basic-streaming-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-db-postgres-pool-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-db-sqlite-simple-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-file-upload-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-generic-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-https-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-pagination-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-testing-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-structuring-apis-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-using-custom-monad-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-using-free-client-*/*.cabal\"\\n' >> cabal.project ; fi"
|
||||
- "echo 'constraints: foundation >=0.0.14' >> cabal.project"
|
||||
- "echo 'constraints: memory <0.14.12 || >0.14.12' >> cabal.project"
|
||||
- "echo 'allow-newer: servant-quickcheck:servant' >> cabal.project"
|
||||
- "echo 'allow-newer: servant-quickcheck:servant-client' >> cabal.project"
|
||||
- "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 'optimization: False' >> cabal.project "
|
||||
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
|
||||
- touch cabal.project.local
|
||||
- "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"
|
||||
- |
|
||||
echo "packages: ${PKGDIR_servant}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_client}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_client_core}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_http_streams}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_docs}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_foreign}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_server}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_tutorial}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_machines}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_conduit}" >> cabal.project
|
||||
echo "packages: ${PKGDIR_servant_pipes}" >> cabal.project
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_auth}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_curl_mock}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_streaming}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_db_postgres_pool}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_file_upload}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_generic}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_testing}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_structuring_apis}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_using_custom_monad}" >> cabal.project ; fi
|
||||
if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_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
|
||||
echo "constraints: sqlite-simple < 0" >> cabal.project
|
||||
echo "allow-newer: aeson-pretty-0.8.7:base-compat" >> 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: io-streams-1.5.1.0:primitive" >> cabal.project
|
||||
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
|
||||
echo "optimization: False" >> 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-file-upload|cookbook-generic|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'
|
||||
|
||||
- echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
|
||||
# Building with tests and benchmarks...
|
||||
# build & run tests, build benchmarks
|
||||
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
|
||||
- echo -en 'travis_fold:end:build-everything\\r'
|
||||
- if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
|
||||
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
|
||||
# Testing...
|
||||
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
|
||||
# haddock...
|
||||
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
|
||||
# Constraint sets
|
||||
- rm -rf cabal.project.local
|
||||
# Constraint set http-media-0.8
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-media ==0.8.*' all | color_cabal_output
|
||||
# Constraint set http-media-0.7
|
||||
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-media ==0.7.*' all | color_cabal_output ; fi
|
||||
# Constraint set base-compat-0.10
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='base-compat ==0.10.*' all | color_cabal_output
|
||||
# Constraint set base-compat-0.11
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='base-compat ==0.11.*' all | color_cabal_output
|
||||
|
||||
- echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
|
||||
# haddock
|
||||
- ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
|
||||
|
||||
- echo -en 'travis_fold:end:haddock\\r'
|
||||
# REGENDATA ["--config=cabal.haskell-ci","--output=.travis.yml","cabal.project"]
|
||||
# EOF
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
folds: all-but-test
|
||||
branches: master
|
||||
branches: master release-0.16
|
||||
jobs-selection: any
|
||||
|
||||
-- We have inplace packages (servant-js) so we skip installing dependencies in a separate step
|
||||
|
@ -14,3 +13,16 @@ cabal-check: False
|
|||
|
||||
-- ghc-options: -j2
|
||||
jobs: :2
|
||||
|
||||
constraint-set http-media-0.8
|
||||
constraints: http-media ==0.8.*
|
||||
|
||||
constraint-set http-media-0.7
|
||||
ghc: <8.8
|
||||
constraints: http-media ==0.7.*
|
||||
|
||||
constraint-set base-compat-0.10
|
||||
constraints: base-compat ==0.10.*
|
||||
|
||||
constraint-set base-compat-0.11
|
||||
constraints: base-compat ==0.11.*
|
||||
|
|
|
@ -18,13 +18,13 @@ packages:
|
|||
doc/cookbook/curl-mock
|
||||
doc/cookbook/basic-streaming
|
||||
doc/cookbook/db-postgres-pool
|
||||
doc/cookbook/db-sqlite-simple
|
||||
-- doc/cookbook/db-sqlite-simple
|
||||
doc/cookbook/file-upload
|
||||
doc/cookbook/generic
|
||||
-- doc/cookbook/hoist-server-with-context
|
||||
doc/cookbook/https
|
||||
-- doc/cookbook/https
|
||||
-- doc/cookbook/jwt-and-basic-auth/
|
||||
doc/cookbook/pagination
|
||||
-- doc/cookbook/pagination
|
||||
-- doc/cookbook/sentry
|
||||
doc/cookbook/testing
|
||||
doc/cookbook/structuring-apis
|
||||
|
@ -40,14 +40,16 @@ constraints:
|
|||
foundation >=0.0.14,
|
||||
memory <0.14.12 || >0.14.12
|
||||
|
||||
allow-newer:
|
||||
-- servant-pagination:servant, servant-pagination:servant-server,
|
||||
-- servant-multipart:servant, servant-multipart:servant-server,
|
||||
-- servant-auth-server:servant, servant-auth-server:servant-server,
|
||||
-- servant-js:servant, servant-js:servant-foreign
|
||||
allow-newer: aeson-pretty-0.8.7:base-compat
|
||||
|
||||
-- servant-quickcheck
|
||||
allow-newer:
|
||||
servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,
|
||||
servant-quickcheck:hspec,
|
||||
servant-quickcheck:http-client
|
||||
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: io-streams-1.5.1.0:primitive
|
||||
allow-newer: openssl-streams-1.2.2.0:network
|
||||
|
||||
-- MonadFail
|
||||
-- https://github.com/nurpax/sqlite-simple/issues/74
|
||||
constraints: sqlite-simple < 0
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-basic-auth
|
||||
main-is: BasicAuth.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-basic-streaming
|
||||
main-is: Streaming.lhs
|
||||
|
@ -17,7 +17,7 @@ executable cookbook-basic-streaming
|
|||
ghc-options: -Wall -pgmL markdown-unlit -threaded -rtsopts
|
||||
|
||||
hs-source-dirs: .
|
||||
build-depends: base >= 4.8 && <4.13
|
||||
build-depends: base >= 4.8 && <5
|
||||
, aeson
|
||||
, bytestring
|
||||
, servant
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbock-curl-mock
|
||||
main-is: CurlMock.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-db-postgres-pool
|
||||
main-is: PostgresPool.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-db-sqlite-simple
|
||||
main-is: DBConnection.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-file-upload
|
||||
main-is: FileUpload.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-using-custom-monad
|
||||
main-is: Generic.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-hoist-server-with-context
|
||||
main-is: HoistServerWithContext.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-https
|
||||
main-is: Https.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-jwt-and-basic-auth
|
||||
main-is: JWTAndBasicAuth.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-pagination
|
||||
main-is: Pagination.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-sentry
|
||||
main-is: Sentry.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-structuring-apis
|
||||
main-is: StructuringApis.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-testing
|
||||
main-is: Testing.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-using-custom-monad
|
||||
main-is: UsingCustomMonad.lhs
|
||||
|
|
|
@ -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, GHC==8.8.1
|
||||
|
||||
executable cookbook-using-free-client
|
||||
main-is: UsingFreeClient.lhs
|
||||
|
|
|
@ -16,7 +16,8 @@ tested-with:
|
|||
GHC==8.0.2
|
||||
GHC==8.2.2
|
||||
GHC==8.4.4
|
||||
GHC==8.6.4
|
||||
GHC==8.6.5
|
||||
GHC==8.8.1
|
||||
extra-source-files:
|
||||
static/index.html
|
||||
static/ui.js
|
||||
|
@ -34,7 +35,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.13
|
||||
base >= 4.7 && <5
|
||||
, aeson
|
||||
, attoparsec
|
||||
, base-compat
|
||||
|
@ -69,7 +70,7 @@ library
|
|||
, lucid >= 2.9.11 && < 2.10
|
||||
, random >= 1.1 && < 1.2
|
||||
, servant-js >= 0.9 && < 0.10
|
||||
, time >= 1.6.0.1 && < 1.9
|
||||
, time >= 1.6.0.1 && < 1.10
|
||||
|
||||
-- For legacy tools, we need to specify build-depends too
|
||||
build-depends: markdown-unlit >= 0.5.0 && <0.6
|
||||
|
|
65
hlint.yaml
65
hlint.yaml
|
@ -1,65 +0,0 @@
|
|||
# HLint configuration file
|
||||
# https://github.com/ndmitchell/hlint
|
||||
##########################
|
||||
|
||||
# This file contains a template configuration file, which is typically
|
||||
# placed as .hlint.yaml in the root of your project
|
||||
|
||||
|
||||
# Specify additional command line arguments
|
||||
#
|
||||
# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
|
||||
|
||||
|
||||
# Control which extensions/flags/modules/functions can be used
|
||||
#
|
||||
# - extensions:
|
||||
# - default: false # all extension are banned by default
|
||||
# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
|
||||
# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
|
||||
#
|
||||
# - flags:
|
||||
# - {name: -w, within: []} # -w is allowed nowhere
|
||||
#
|
||||
# - modules:
|
||||
# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
|
||||
# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
|
||||
#
|
||||
# - functions:
|
||||
# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
|
||||
|
||||
|
||||
# Add custom hints for this project
|
||||
#
|
||||
# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
|
||||
# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
|
||||
|
||||
|
||||
# Turn on hints that are off by default
|
||||
#
|
||||
# Ban "module X(module X) where", to require a real export list
|
||||
# - warn: {name: Use explicit module export list}
|
||||
#
|
||||
# Replace a $ b $ c with a . b $ c
|
||||
# - group: {name: dollar, enabled: true}
|
||||
#
|
||||
# Generalise map to fmap, ++ to <>
|
||||
# - group: {name: generalise, enabled: true}
|
||||
|
||||
|
||||
# Ignore some builtin hints
|
||||
- ignore: {name: Redundant do}
|
||||
- ignore: {name: Parse error}
|
||||
- ignore: {name: Use fmap}
|
||||
- ignore: {name: Use list comprehension}
|
||||
- ignore: {name: Use lambda-case}
|
||||
- ignore: {name: Eta reduce}
|
||||
# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
|
||||
|
||||
|
||||
# Define some custom infix operators
|
||||
# - fixity: infixr 3 ~^#^~
|
||||
|
||||
|
||||
# To generate a suitable file for HLint do:
|
||||
# $ hlint --default > .hlint.yaml
|
|
@ -1,6 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-client-core
|
||||
version: 0.16
|
||||
x-revision: 2
|
||||
|
||||
synopsis: Core functionality and class for client function generation for servant APIs
|
||||
category: Servant, Web
|
||||
|
@ -20,7 +21,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -53,13 +55,13 @@ library
|
|||
--
|
||||
-- note: mtl lower bound is so low because of GHC-7.8
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, containers >= 0.5.7.1 && < 0.7
|
||||
, deepseq >= 1.4.2.0 && < 1.5
|
||||
, text >= 1.2.3.0 && < 1.3
|
||||
, transformers >= 0.5.2.0 && < 0.6
|
||||
, template-haskell >= 2.11.1.0 && < 2.15
|
||||
, template-haskell >= 2.11.1.0 && < 2.16
|
||||
|
||||
if !impl(ghc >= 8.2)
|
||||
build-depends:
|
||||
|
@ -73,11 +75,11 @@ library
|
|||
-- Here can be exceptions if we really need features from the newer versions.
|
||||
build-depends:
|
||||
aeson >= 1.4.1.0 && < 1.5
|
||||
, base-compat >= 0.10.5 && < 0.11
|
||||
, base-compat >= 0.10.5 && < 0.12
|
||||
, base64-bytestring >= 1.0.0.1 && < 1.1
|
||||
, exceptions >= 0.10.0 && < 0.11
|
||||
, free >= 5.1 && < 5.2
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, http-media >= 0.7.1.3 && < 0.9
|
||||
, http-types >= 0.12.2 && < 0.13
|
||||
, network-uri >= 2.6.1.0 && < 2.7
|
||||
, safe >= 0.3.17 && < 0.4
|
||||
|
@ -105,7 +107,7 @@ test-suite spec
|
|||
build-depends:
|
||||
deepseq >= 1.4.2.0 && < 1.5
|
||||
, hspec >= 2.6.0 && < 2.8
|
||||
, QuickCheck >= 2.12.6.1 && < 2.13
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
|
||||
build-tool-depends:
|
||||
hspec-discover:hspec-discover >= 2.6.0 && <2.8
|
||||
|
|
|
@ -45,7 +45,7 @@ library
|
|||
, 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
|
||||
, http-media >=0.6.2 && <0.9
|
||||
, http-types >=0.12 && <0.13
|
||||
, monad-control >=1.0.0.4 && <1.1
|
||||
, mtl >=2.2.2 && <2.3
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client/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.16.0.1
|
||||
--------
|
||||
|
||||
- Allow `base-compat-0.11`
|
||||
|
||||
0.16
|
||||
----
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-client
|
||||
version: 0.16
|
||||
version: 0.16.0.1
|
||||
|
||||
synopsis: Automatic derivation of querying functions for servant
|
||||
category: Servant, Web
|
||||
|
@ -24,7 +24,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -44,14 +45,14 @@ library
|
|||
-- Bundled with GHC: Lower bound to not force re-installs
|
||||
-- text and mtl are bundled starting with GHC-8.4
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, containers >= 0.5.7.1 && < 0.7
|
||||
, deepseq >= 1.4.2.0 && < 1.5
|
||||
, mtl >= 2.2.2 && < 2.3
|
||||
, stm >= 2.4.5.1 && < 2.6
|
||||
, text >= 1.2.3.0 && < 1.3
|
||||
, time >= 1.6.0.1 && < 1.9
|
||||
, time >= 1.6.0.1 && < 1.10
|
||||
, transformers >= 0.5.2.0 && < 0.6
|
||||
|
||||
if !impl(ghc >= 8.2)
|
||||
|
@ -67,9 +68,9 @@ 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:
|
||||
base-compat >= 0.10.5 && < 0.11
|
||||
base-compat >= 0.10.5 && < 0.12
|
||||
, http-client >= 0.5.13.1 && < 0.7
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, http-media >= 0.7.1.3 && < 0.9
|
||||
, http-types >= 0.12.2 && < 0.13
|
||||
, exceptions >= 0.10.0 && < 0.11
|
||||
, kan-extensions >= 5.2 && < 5.3
|
||||
|
@ -117,8 +118,8 @@ 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
|
||||
, QuickCheck >= 2.12.6.1 && < 2.13
|
||||
, network >= 2.8.0.0 && < 3.2
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
, servant == 0.16.*
|
||||
, servant-server == 0.16.*
|
||||
, tdigest >= 0.2 && < 0.3
|
||||
|
|
|
@ -16,10 +16,11 @@ import Prelude.Compat
|
|||
|
||||
import Control.Concurrent.MVar
|
||||
(modifyMVar, newMVar)
|
||||
import qualified Data.ByteString as BS
|
||||
import Control.Concurrent.STM.TVar
|
||||
import Control.Exception
|
||||
(SomeException (..), catch)
|
||||
import Control.Monad
|
||||
(unless)
|
||||
import Control.Monad.Base
|
||||
(MonadBase (..))
|
||||
import Control.Monad.Catch
|
||||
|
@ -27,15 +28,18 @@ import Control.Monad.Catch
|
|||
import Control.Monad.Error.Class
|
||||
(MonadError (..))
|
||||
import Control.Monad.IO.Class
|
||||
(liftIO)
|
||||
(MonadIO (..))
|
||||
import Control.Monad.Reader
|
||||
(MonadReader, ReaderT, ask, runReaderT)
|
||||
import Control.Monad.STM
|
||||
(STM, atomically)
|
||||
import Control.Monad.Trans.Control
|
||||
(MonadBaseControl (..))
|
||||
import Control.Monad.Trans.Except
|
||||
(ExceptT, runExceptT)
|
||||
import Data.Bifunctor
|
||||
(bimap)
|
||||
import qualified Data.ByteString as BS
|
||||
import Data.ByteString.Builder
|
||||
(toLazyByteString)
|
||||
import qualified Data.ByteString.Lazy as BSL
|
||||
|
@ -64,8 +68,8 @@ import Network.HTTP.Types
|
|||
(hContentType, renderQuery, statusCode)
|
||||
import Servant.Client.Core
|
||||
|
||||
import qualified Servant.Types.SourceT as S
|
||||
import qualified Network.HTTP.Client as Client
|
||||
import qualified Servant.Types.SourceT as S
|
||||
|
||||
-- | The environment in which a request is run.
|
||||
data ClientEnv
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-conduit
|
||||
version: 0.15
|
||||
x-revision: 1
|
||||
x-revision: 2
|
||||
|
||||
synopsis: Servant Stream support for conduit.
|
||||
category: Servant, Web, Enumerator
|
||||
|
@ -21,7 +21,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -62,6 +63,6 @@ test-suite example
|
|||
, servant-server >=0.15 && <0.17
|
||||
, servant-client >=0.15 && <0.17
|
||||
, wai >=3.2.1.2 && <3.3
|
||||
, warp >=3.2.25 && <3.3
|
||||
, warp >=3.2.25 && <3.4
|
||||
, http-client
|
||||
default-language: Haskell2010
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-docs/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.4
|
||||
------
|
||||
|
||||
- Drop dependency on `control-monad-omega` in favor of `Data.Universe.Helpers` from `universe-base`.
|
||||
|
||||
0.11.3
|
||||
------
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-docs
|
||||
version: 0.11.3
|
||||
x-revision: 1
|
||||
version: 0.11.4
|
||||
|
||||
synopsis: generate API docs for your servant webservice
|
||||
category: Servant, Web
|
||||
|
@ -24,7 +23,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -46,7 +46,7 @@ library
|
|||
--
|
||||
-- note: mtl lower bound is so low because of GHC-7.8
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, text >= 1.2.3.0 && < 1.3
|
||||
|
||||
|
@ -59,14 +59,14 @@ library
|
|||
build-depends:
|
||||
aeson >= 1.4.1.0 && < 1.5
|
||||
, aeson-pretty >= 0.8.5 && < 0.9
|
||||
, base-compat >= 0.10.5 && < 0.11
|
||||
, base-compat >= 0.10.5 && < 0.12
|
||||
, case-insensitive >= 1.2.0.11 && < 1.3
|
||||
, control-monad-omega >= 0.3.1 && < 0.4
|
||||
, hashable >= 1.2.7.0 && < 1.3
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, 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
|
||||
, lens >= 4.17 && < 4.19
|
||||
, string-conversions >= 0.4.0.1 && < 0.5
|
||||
, universe-base >= 1.1.1 && < 1.2
|
||||
, unordered-containers >= 0.2.9.0 && < 0.3
|
||||
|
||||
hs-source-dirs: src
|
||||
|
|
|
@ -27,7 +27,6 @@ import Control.Arrow
|
|||
import Control.Lens
|
||||
(makeLenses, mapped, over, traversed, view, (%~), (&), (.~),
|
||||
(<>~), (^.), (|>))
|
||||
import qualified Control.Monad.Omega as Omega
|
||||
import qualified Data.ByteString.Char8 as BSC
|
||||
import Data.ByteString.Lazy.Char8
|
||||
(ByteString)
|
||||
|
@ -65,6 +64,8 @@ import Servant.API
|
|||
import Servant.API.ContentTypes
|
||||
import Servant.API.TypeLevel
|
||||
|
||||
import qualified Data.Universe.Helpers as U
|
||||
|
||||
import qualified Data.HashMap.Strict as HM
|
||||
import qualified Data.Text as T
|
||||
import qualified Network.HTTP.Media as M
|
||||
|
@ -479,22 +480,22 @@ samples = map ("",)
|
|||
|
||||
-- | Default sample Generic-based inputs/outputs.
|
||||
defaultSamples :: forall a. (Generic a, GToSample (Rep a)) => Proxy a -> [(Text, a)]
|
||||
defaultSamples _ = Omega.runOmega $ second to <$> gtoSamples (Proxy :: Proxy (Rep a))
|
||||
defaultSamples _ = second to <$> gtoSamples (Proxy :: Proxy (Rep a))
|
||||
|
||||
-- | @'ToSample'@ for Generics.
|
||||
--
|
||||
-- The use of @'Omega'@ allows for more productive sample generation.
|
||||
-- Note: we use combinators from "Universe.Data.Helpers" for more productive sample generation.
|
||||
class GToSample t where
|
||||
gtoSamples :: proxy t -> Omega.Omega (Text, t x)
|
||||
gtoSamples :: proxy t -> [(Text, t x)]
|
||||
|
||||
instance GToSample U1 where
|
||||
gtoSamples _ = Omega.each (singleSample U1)
|
||||
gtoSamples _ = singleSample U1
|
||||
|
||||
instance GToSample V1 where
|
||||
gtoSamples _ = empty
|
||||
|
||||
instance (GToSample p, GToSample q) => GToSample (p :*: q) where
|
||||
gtoSamples _ = render <$> ps <*> qs
|
||||
gtoSamples _ = U.cartesianProduct render ps qs
|
||||
where
|
||||
ps = gtoSamples (Proxy :: Proxy p)
|
||||
qs = gtoSamples (Proxy :: Proxy q)
|
||||
|
@ -503,13 +504,13 @@ instance (GToSample p, GToSample q) => GToSample (p :*: q) where
|
|||
| otherwise = (ta <> ", " <> tb, a :*: b)
|
||||
|
||||
instance (GToSample p, GToSample q) => GToSample (p :+: q) where
|
||||
gtoSamples _ = lefts <|> rights
|
||||
gtoSamples _ = lefts U.+++ rights
|
||||
where
|
||||
lefts = second L1 <$> gtoSamples (Proxy :: Proxy p)
|
||||
rights = second R1 <$> gtoSamples (Proxy :: Proxy q)
|
||||
|
||||
instance ToSample a => GToSample (K1 i a) where
|
||||
gtoSamples _ = second K1 <$> Omega.each (toSamples (Proxy :: Proxy a))
|
||||
gtoSamples _ = second K1 <$> toSamples (Proxy :: Proxy a)
|
||||
|
||||
instance (GToSample f) => GToSample (M1 i a f) where
|
||||
gtoSamples _ = second M1 <$> gtoSamples (Proxy :: Proxy f)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-foreign
|
||||
version: 0.15
|
||||
x-revision: 1
|
||||
x-revision: 2
|
||||
|
||||
synopsis: Helpers for generating clients for servant APIs in any programming language
|
||||
category: Servant, Web
|
||||
|
@ -26,7 +26,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -46,7 +47,7 @@ library
|
|||
--
|
||||
-- note: mtl lower bound is so low because of GHC-7.8
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, text >= 1.2.3.0 && < 1.3
|
||||
|
||||
-- Servant dependencies
|
||||
|
@ -56,8 +57,8 @@ 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:
|
||||
base-compat >= 0.10.5 && < 0.11
|
||||
, lens >= 4.17 && < 4.18
|
||||
base-compat >= 0.10.5 && < 0.12
|
||||
, lens >= 4.17 && < 4.19
|
||||
, http-types >= 0.12.2 && < 0.13
|
||||
|
||||
hs-source-dirs: src
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-http-streams/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.16.0.1
|
||||
--------
|
||||
|
||||
- Allow `base-compat-0.11`
|
||||
|
||||
0.16
|
||||
----
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-http-streams
|
||||
version: 0.16
|
||||
version: 0.16.0.1
|
||||
|
||||
synopsis: Automatic derivation of querying functions for servant
|
||||
category: Servant, Web
|
||||
|
@ -24,7 +24,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -42,13 +43,13 @@ library
|
|||
-- Bundled with GHC: Lower bound to not force re-installs
|
||||
-- text and mtl are bundled starting with GHC-8.4
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, containers >= 0.5.7.1 && < 0.7
|
||||
, deepseq >= 1.4.2.0 && < 1.5
|
||||
, mtl >= 2.2.2 && < 2.3
|
||||
, text >= 1.2.3.0 && < 1.3
|
||||
, time >= 1.6.0.1 && < 1.9
|
||||
, time >= 1.6.0.1 && < 1.10
|
||||
, transformers >= 0.5.2.0 && < 0.6
|
||||
|
||||
if !impl(ghc >= 8.2)
|
||||
|
@ -64,10 +65,10 @@ 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:
|
||||
base-compat >= 0.10.5 && < 0.11
|
||||
base-compat >= 0.10.5 && < 0.12
|
||||
, case-insensitive
|
||||
, http-streams >= 0.8.6.1 && < 0.9
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, http-media >= 0.7.1.3 && < 0.9
|
||||
, io-streams >= 1.5.0.1 && < 1.6
|
||||
, http-types >= 0.12.2 && < 0.13
|
||||
, http-common >= 0.8.2.0 && < 0.9
|
||||
|
@ -118,8 +119,8 @@ 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
|
||||
, QuickCheck >= 2.12.6.1 && < 2.13
|
||||
, network >= 2.8.0.0 && < 3.2
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
, servant == 0.16.*
|
||||
, servant-server == 0.16.*
|
||||
, tdigest >= 0.2 && < 0.3
|
||||
|
|
|
@ -18,6 +18,8 @@ import Control.DeepSeq
|
|||
(NFData, force)
|
||||
import Control.Exception
|
||||
(IOException, SomeException (..), catch, evaluate, throwIO)
|
||||
import Control.Monad
|
||||
(unless)
|
||||
import Control.Monad.Base
|
||||
(MonadBase (..))
|
||||
import Control.Monad.Codensity
|
||||
|
@ -25,9 +27,13 @@ import Control.Monad.Codensity
|
|||
import Control.Monad.Error.Class
|
||||
(MonadError (..))
|
||||
import Control.Monad.IO.Class
|
||||
(liftIO)
|
||||
(MonadIO (..))
|
||||
import Control.Monad.Reader
|
||||
(MonadReader, ReaderT, ask, runReaderT)
|
||||
import Control.Monad.Trans.Class
|
||||
(lift)
|
||||
import Control.Monad.Trans.Except
|
||||
(ExceptT, runExceptT)
|
||||
import Data.Bifunctor
|
||||
(bimap, first)
|
||||
import Data.ByteString.Builder
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-machines
|
||||
version: 0.15
|
||||
x-revision: 1
|
||||
x-revision: 3
|
||||
|
||||
synopsis: Servant Stream support for machines
|
||||
category: Servant, Web, Enumerator
|
||||
|
@ -21,7 +21,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -35,7 +36,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
|
||||
|
@ -59,6 +60,6 @@ test-suite example
|
|||
, servant-server >=0.15 && <0.17
|
||||
, servant-client >=0.15 && <0.17
|
||||
, wai >=3.2.1.2 && <3.3
|
||||
, warp >=3.2.25 && <3.3
|
||||
, warp >=3.2.25 && <3.4
|
||||
, http-client
|
||||
default-language: Haskell2010
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
0.15.1
|
||||
------
|
||||
|
||||
- `FromSourceIO Proxy` (`ListT`) instance `fail`s in `IO`, not in `m`.
|
||||
This works around `MonadFail` proposal, and makes `servant-pipes`
|
||||
behave like `servant-conduit` and `servant-machines`.
|
||||
|
||||
0.15
|
||||
----
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-pipes
|
||||
version: 0.15
|
||||
x-revision: 1
|
||||
version: 0.15.1
|
||||
|
||||
synopsis: Servant Stream support for pipes
|
||||
category: Servant, Web, Pipes
|
||||
|
@ -21,7 +20,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -63,6 +63,6 @@ test-suite example
|
|||
, servant-server >=0.15 && <0.17
|
||||
, servant-client >=0.15 && <0.17
|
||||
, wai >=3.2.1.2 && <3.3
|
||||
, warp >=3.2.25 && <3.3
|
||||
, warp >=3.2.25 && <3.4
|
||||
, http-client
|
||||
default-language: Haskell2010
|
||||
|
|
|
@ -65,7 +65,7 @@ instance (MonadIO m, a' ~ X, a ~ (), b' ~ (), r ~ ())
|
|||
fromSourceIO src = M $ liftIO $ S.unSourceT src (return . go) where
|
||||
go :: S.StepT IO b -> Proxy X () () b m ()
|
||||
go S.Stop = Pure ()
|
||||
go (S.Error err) = M (fail err)
|
||||
go (S.Error err) = M (liftIO (fail err))
|
||||
go (S.Skip s) = go s -- drives
|
||||
go (S.Effect ms) = M (liftIO (fmap go ms))
|
||||
go (S.Yield x s) = Respond x (const (go s))
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/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.16.2
|
||||
------
|
||||
|
||||
* `singleton-bool-0.1.5` (`SBool` is re-exported)
|
||||
- Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
|
||||
- Add `Show`, `Eq`, `Ord` `SBool b` instances.
|
||||
* dependencies update
|
||||
|
||||
0.16.1
|
||||
------
|
||||
|
||||
* Use `http-api-data-0.4.1` (a part of its API is re-exported)
|
||||
[#1181](https://github.com/haskell-servant/servant/pull/1181)
|
||||
|
||||
0.16
|
||||
----
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant-server
|
||||
version: 0.16
|
||||
version: 0.16.2
|
||||
x-revision: 1
|
||||
|
||||
synopsis: A family of combinators for defining webservices APIs and serving them
|
||||
category: Servant, Web
|
||||
|
@ -27,7 +28,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -68,7 +70,7 @@ library
|
|||
-- Bundled with GHC: Lower bound to not force re-installs
|
||||
-- text and mtl are bundled starting with GHC-8.4
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, containers >= 0.5.7.1 && < 0.7
|
||||
, mtl >= 2.2.2 && < 2.3
|
||||
|
@ -79,20 +81,20 @@ 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.2 && < 0.16.3
|
||||
, 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.
|
||||
build-depends:
|
||||
base-compat >= 0.10.5 && < 0.11
|
||||
base-compat >= 0.10.5 && < 0.12
|
||||
, base64-bytestring >= 1.0.0.1 && < 1.1
|
||||
, exceptions >= 0.10.0 && < 0.11
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, http-media >= 0.7.1.3 && < 0.9
|
||||
, 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
|
||||
|
@ -120,7 +122,7 @@ executable greet
|
|||
|
||||
build-depends:
|
||||
aeson >= 1.4.1.0 && < 1.5
|
||||
, warp >= 3.2.25 && < 3.3
|
||||
, warp >= 3.2.25 && < 3.4
|
||||
|
||||
test-suite spec
|
||||
type: exitcode-stdio-1.0
|
||||
|
@ -165,7 +167,7 @@ test-suite spec
|
|||
, directory >= 1.3.0.0 && < 1.4
|
||||
, hspec >= 2.6.0 && < 2.8
|
||||
, hspec-wai >= 0.9.0 && < 0.10
|
||||
, QuickCheck >= 2.12.6.1 && < 2.13
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
, should-not-typecheck >= 2.1.0 && < 2.2
|
||||
, temporary >= 1.3 && < 1.4
|
||||
, wai-extra >= 3.0.24.3 && < 3.1
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
|
||||
|
||||
0.16.2
|
||||
------
|
||||
|
||||
* `singleton-bool-0.1.5` (`SBool` is re-exported)
|
||||
- Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
|
||||
- Add `Show`, `Eq`, `Ord` `SBool b` instances.
|
||||
* dependencies update
|
||||
|
||||
0.16.1
|
||||
------
|
||||
|
||||
* Add `Semigroup` and `Monoid` `SourceT` instances
|
||||
[#1158](https://github.com/haskell-servant/servant/pull/1158)
|
||||
[#1159](https://github.com/haskell-servant/servant/pull/1159)
|
||||
* Use `http-api-data-0.4.1`
|
||||
[#1181](https://github.com/haskell-servant/servant/pull/1181)
|
||||
* Allow newer dependencies
|
||||
|
||||
0.16.0.1
|
||||
--------
|
||||
|
||||
- Make tests work with `http-media-0.8`
|
||||
|
||||
0.16
|
||||
----
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
name: servant
|
||||
version: 0.16
|
||||
version: 0.16.2
|
||||
x-revision: 1
|
||||
|
||||
synopsis: A family of combinators for defining webservices APIs
|
||||
category: Servant, Web
|
||||
|
@ -24,7 +25,8 @@ tested-with:
|
|||
GHC ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.4
|
||||
|| ==8.6.5
|
||||
|| ==8.8.1
|
||||
|
||||
extra-source-files:
|
||||
CHANGELOG.md
|
||||
|
@ -88,7 +90,7 @@ library
|
|||
--
|
||||
-- note: mtl lower bound is so low because of GHC-7.8
|
||||
build-depends:
|
||||
base >= 4.9 && < 4.13
|
||||
base >= 4.9 && < 4.14
|
||||
, bytestring >= 0.10.8.1 && < 0.11
|
||||
, mtl >= 2.2.2 && < 2.3
|
||||
, transformers >= 0.5.2.0 && < 0.6
|
||||
|
@ -98,23 +100,23 @@ 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
|
||||
, singleton-bool >= 0.1.4 && < 0.1.5
|
||||
http-api-data >= 0.4.1 && < 0.4.2
|
||||
, singleton-bool >= 0.1.5 && < 0.1.6
|
||||
|
||||
-- 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:
|
||||
base-compat >= 0.10.5 && < 0.11
|
||||
base-compat >= 0.10.5 && < 0.12
|
||||
, aeson >= 1.4.1.0 && < 1.5
|
||||
, attoparsec >= 0.13.2.2 && < 0.14
|
||||
, bifunctors >= 5.5.3 && < 5.6
|
||||
, case-insensitive >= 1.2.0.11 && < 1.3
|
||||
, deepseq >= 1.4.2.0 && < 1.5
|
||||
, http-media >= 0.7.1.3 && < 0.8
|
||||
, http-media >= 0.7.1.3 && < 0.9
|
||||
, http-types >= 0.12.2 && < 0.13
|
||||
, mmorph >= 1.1.2 && < 1.2
|
||||
, network-uri >= 2.6.1.0 && < 2.7
|
||||
, QuickCheck >= 2.12.6.1 && <2.13
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
, string-conversions >= 0.4.0.1 && < 0.5
|
||||
, tagged >= 0.8.6 && < 0.9
|
||||
, vault >= 0.3.1.2 && < 0.4
|
||||
|
@ -161,6 +163,7 @@ test-suite spec
|
|||
, base-compat
|
||||
, aeson
|
||||
, bytestring
|
||||
, http-media
|
||||
, mtl
|
||||
, servant
|
||||
, string-conversions
|
||||
|
@ -170,7 +173,7 @@ test-suite spec
|
|||
-- Additonal dependencies
|
||||
build-depends:
|
||||
hspec >= 2.6.0 && < 2.8
|
||||
, QuickCheck >= 2.12.6.1 && < 2.13
|
||||
, QuickCheck >= 2.12.6.1 && < 2.14
|
||||
, quickcheck-instances >= 0.3.19 && < 0.4
|
||||
|
||||
build-tool-depends:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE KindSignatures #-}
|
||||
{-# LANGUAGE PolyKinds #-}
|
||||
module Servant.API.Experimental.Auth where
|
||||
|
||||
|
|
|
@ -89,6 +89,21 @@ 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
|
||||
mappend = (<>)
|
||||
|
||||
-- | 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 +165,23 @@ 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
|
||||
mappend = (<>)
|
||||
|
||||
-- | Doesn't generate 'Error' constructors.
|
||||
instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (StepT m a) where
|
||||
arbitrary = QC.sized arb where
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
|
@ -20,7 +21,7 @@ import Data.Either
|
|||
import Data.Function
|
||||
(on)
|
||||
import Data.List
|
||||
(maximumBy)
|
||||
(sortBy)
|
||||
import qualified Data.List.NonEmpty as NE
|
||||
import Data.Maybe
|
||||
(fromJust, isJust, isNothing)
|
||||
|
@ -134,17 +135,29 @@ spec = describe "Servant.API.ContentTypes" $ do
|
|||
== Just ("application/json;charset=utf-8", encode x)
|
||||
|
||||
it "respects the Accept spec ordering" $ do
|
||||
let highest a b c = maximumBy (compare `on` snd)
|
||||
let highest a b c = last $ sortBy (compare `on` snd)
|
||||
-- when qualities are same, http-media-0.8 picks first; 0.7 last.
|
||||
#if MIN_VERSION_http_media(0,8,0)
|
||||
[ ("text/plain;charset=utf-8", c)
|
||||
, ("application/json;charset=utf-8", b)
|
||||
, ("application/octet-stream", a)
|
||||
]
|
||||
#else
|
||||
[ ("application/octet-stream", a)
|
||||
, ("application/json;charset=utf-8", b)
|
||||
, ("text/plain;charset=utf-8", c)
|
||||
]
|
||||
#endif
|
||||
let acceptH a b c = addToAccept (Proxy :: Proxy OctetStream) a $
|
||||
addToAccept (Proxy :: Proxy JSON) b $
|
||||
addToAccept (Proxy :: Proxy PlainText ) c ""
|
||||
addToAccept (Proxy :: Proxy JSON) b $
|
||||
addToAccept (Proxy :: Proxy PlainText ) c $
|
||||
""
|
||||
let val a b c i = handleAcceptH (Proxy :: Proxy '[OctetStream, JSON, PlainText])
|
||||
(acceptH a b c) (i :: Int)
|
||||
property $ \a b c i -> fst (fromJust $ val a b c i) == fst (highest a b c)
|
||||
property $ \a b c i ->
|
||||
let acc = acceptH a b c
|
||||
in counterexample (show acc) $
|
||||
fst (fromJust $ val a b c i) === fst (highest a b c)
|
||||
|
||||
describe "handleCTypeH" $ do
|
||||
|
||||
|
|
Loading…
Reference in New Issue