git.iko.soy/typeable/servant
on 6ff70e2 help sign in
13 files changed+191−41
since splitsnapshots
unifiedsplit
.gitignore+1 .travis.yml+104−20 README.md+1−1 cabal.project+1−2 doc/tutorial/tutorial.cabal+13−2 servant-client/servant-client.cabal+11−4 servant-docs/CHANGELOG.md+5 servant-docs/servant-docs.cabal+8−2 servant-foreign/servant-foreign.cabal+8 servant-server/servant-server.cabal+10−4 servant-server/test/Servant/ServerSpec.hs+11−2 servant/servant.cabal+11−4 stack-ghc-8.2.1.yaml+7
.gitignore+1
@@ -1,4 +1,5 @@
11**/*/dist
2+.ghc.environment.*
23dist-newstyle
34/bin
45/lib
.travis.yml+104−20
@@ -1,29 +1,113 @@
1+# This Travis job script has been generated by a script via
2+#
3+# make_travis_yml_2.hs '-o' '.travis.yml' 'cabal.project'
4+#
5+# For more information, see https://github.com/hvr/multi-ghc-travis
6+#
7+language: c
18sudo: false
29
3−language: c
10+git:
11+ submodules: false # whether to recursively clone submodules
12+
13+cache:
14+ directories:
15+ - $HOME/.cabal/packages
16+ - $HOME/.cabal/store
17+
18+before_cache:
19+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
20+ # remove files that are regenerated by 'cabal update'
21+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
22+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
23+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
24+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
25+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
426
5−env:
6− - STACK_YAML=stack-ghc-7.8.4.yaml
7− - STACK_YAML=stack-ghc-7.10.3.yaml
8− - STACK_YAML=stack.yaml
27+matrix:
28+ include:
29+ - compiler: "ghc-7.8.4"
30+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
31+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
32+ - compiler: "ghc-7.10.3"
33+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
34+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
35+ - compiler: "ghc-8.0.2"
36+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
37+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
38+ - compiler: "ghc-8.2.1"
39+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
40+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
941
10−addons:
11− apt:
12− packages:
13− - libgmp-dev
42+before_install:
43+ - HC=${CC}
44+ - HCPKG=${HC/ghc/ghc-pkg}
45+ - unset CC
46+ - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
1447
1548install:
16− - mkdir -p ~/.local/bin
17− - export PATH=$HOME/.local/bin:$PATH
18− - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
19− - stack --version
20− - stack setup --no-terminal
21− - (cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc)
49+ - cabal --version
50+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
51+ - BENCH=${BENCH---enable-benchmarks}
52+ - TEST=${TEST---enable-tests}
53+ - HADDOCK=${HADDOCK-true}
54+ - INSTALLED=${INSTALLED-true}
55+ - travis_retry cabal update -v
56+ - sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
57+ - rm -fv cabal.project.local
58+ - if [ -f "servant/configure.ac" ]; then
59+ (cd "servant"; autoreconf -i);
60+ fi
61+ - if [ -f "servant-client/configure.ac" ]; then
62+ (cd "servant-client"; autoreconf -i);
63+ fi
64+ - if [ -f "servant-docs/configure.ac" ]; then
65+ (cd "servant-docs"; autoreconf -i);
66+ fi
67+ - if [ -f "servant-foreign/configure.ac" ]; then
68+ (cd "servant-foreign"; autoreconf -i);
69+ fi
70+ - if [ -f "servant-server/configure.ac" ]; then
71+ (cd "servant-server"; autoreconf -i);
72+ fi
73+ - if [ -f "doc/tutorial/configure.ac" ]; then
74+ (cd "doc/tutorial"; autoreconf -i);
75+ fi
76+ - rm -f cabal.project.freeze
77+ - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 servant-server servant-client
78+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 servant-server servant-client
79+ - rm -rf "servant"/.ghc.environment.* "servant-client"/.ghc.environment.* "servant-docs"/.ghc.environment.* "servant-foreign"/.ghc.environment.* "servant-server"/.ghc.environment.* "doc/tutorial"/.ghc.environment.* "servant"/dist "servant-client"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist
80+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
2281
82+# Here starts the actual work to be performed for the package under test;
83+# any command which exits with a non-zero exit code causes the build to fail.
2384script:
24− - if [ "$TRAVIS_EVENT_TYPE" = "cron" ] ; then ./scripts/ci-cron.sh ; else stack test --ghc-options=-Werror --no-terminal ; fi
85+ # test that source-distributions can be generated
86+ - (cd "servant"; cabal sdist)
87+ - (cd "servant-client"; cabal sdist)
88+ - (cd "servant-docs"; cabal sdist)
89+ - (cd "servant-foreign"; cabal sdist)
90+ - (cd "servant-server"; cabal sdist)
91+ - (cd "doc/tutorial"; cabal sdist)
92+ - mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz ${DISTDIR}/
93+ - cd ${DISTDIR}
94+ - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
95+ - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal\n' > cabal.project"
96+ # this builds all libraries and executables (without tests/benchmarks)
97+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
2598
26−cache:
27− directories:
28− - $HOME/.tinc/cache
29− - $HOME/.stack
99+ # Build with installed constraints for packages in global-db
100+ - if $INSTALLED; then
101+ echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh;
102+ else echo "Not building with installed constraints"; fi
103+
104+ # build & run tests, build benchmarks
105+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all
106+ - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
107+
108+ # haddock
109+ - rm -rf ./dist-newstyle
110+ - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
111+
112+# REGENDATA ["-o",".travis.yml","cabal.project"]
113+# EOF
README.md+1−1
@@ -27,7 +27,7 @@ release of `servant` package.
2727| servant-blaze | 0.7.1 | ? |
2828| servant-cassava | 0.7 | ? |
2929| servant-client | 0.10 | 0.11 |
30−| servant-docs | 0.10 | 0.10.1 |
30+| servant-docs | 0.10 | 0.11 |
3131| servant-foreign | 0.10 | 0.10.0.1 |
3232| servant-js | 0.9.1 | ? |
3333| servant-lucid | 0.7.1 | ? |
cabal.project+1−2
@@ -1,5 +1,4 @@
1−packages:
2− servant/
1+packages: servant/
32 servant-client/
43 servant-docs/
54 servant-foreign/
doc/tutorial/tutorial.cabal+13−2
@@ -8,6 +8,14 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with:
12+ GHC==7.8.4
13+ GHC==7.10.3
14+ GHC==8.0.2
15+ GHC==8.2.1
16+extra-source-files:
17+ static/index.html
18+ static/ui.js
1119
1220library
1321 exposed-modules: ApiType
@@ -28,7 +36,7 @@ library
2836 , servant == 0.11.*
2937 , servant-server == 0.11.*
3038 , servant-client == 0.11.*
31− , servant-docs == 0.10.*
39+ , servant-docs == 0.11.*
3240 , servant-js >= 0.9 && <0.10
3341 , warp
3442 , http-media
@@ -37,7 +45,8 @@ library
3745 , string-conversions
3846 , bytestring
3947 , attoparsec
40− , mtl
48+ , mtl >=2.1 && <2.3
49+ , mtl-compat
4150 , random
4251 , js-jquery
4352 , wai
@@ -56,6 +65,8 @@ test-suite spec
5665 hs-source-dirs: test
5766 main-is: Spec.hs
5867 other-modules: JavascriptSpec
68+ build-tool-depends:
69+ hspec-discover:hspec-discover
5970 build-depends: base == 4.*
6071 , tutorial
6172 , hspec
servant-client/servant-client.cabal+11−4
@@ -1,5 +1,6 @@
11name: servant-client
22version: 0.11
3+x-revision: 2
34synopsis: automatical derivation of querying functions for servant webservices
45description:
56 This library lets you derive automatically Haskell functions that
@@ -16,7 +17,11 @@ copyright: 2014-2016 Zalora South East Asia Pte Ltd, Servant Contribut
1617category: Servant Web
1718build-type: Simple
1819cabal-version: >=1.10
19−tested-with: GHC >= 7.8
20+tested-with:
21+ GHC==7.8.4
22+ GHC==7.10.3
23+ GHC==8.0.2
24+ GHC==8.2.1
2025homepage: http://haskell-servant.readthedocs.org/
2126Bug-reports: http://github.com/haskell-servant/servant/issues
2227extra-source-files:
@@ -36,7 +41,7 @@ library
3641 Servant.Common.BasicAuth
3742 Servant.Common.Req
3843 build-depends:
39− base >= 4.7 && < 4.10
44+ base >= 4.7 && < 4.11
4045 , base-compat >= 0.9.1 && < 0.10
4146 , aeson >= 0.7 && < 1.3
4247 , attoparsec >= 0.12 && < 0.14
@@ -47,8 +52,8 @@ library
4752 , http-api-data >= 0.3.6 && < 0.4
4853 , http-client >= 0.4.18.1 && < 0.6
4954 , http-client-tls >= 0.2.2 && < 0.4
50− , http-media >= 0.6.2 && < 0.7
51− , http-types >= 0.8.6 && < 0.10
55+ , http-media >= 0.6.2 && < 0.8
56+ , http-types >= 0.8.6 && < 0.11
5257 , monad-control >= 1.0.0.4 && < 1.1
5358 , network-uri >= 2.6 && < 2.7
5459 , safe >= 0.3.9 && < 0.4
@@ -76,6 +81,8 @@ test-suite spec
7681 default-language: Haskell2010
7782 hs-source-dirs: test
7883 main-is: Spec.hs
84+ build-tool-depends:
85+ hspec-discover:hspec-discover
7986 other-modules:
8087 Servant.ClientSpec
8188 , Servant.Common.BaseUrlSpec
servant-docs/CHANGELOG.md+5
@@ -1,3 +1,8 @@
1+0.11
2+----
3+
4+* changed the type of `rqbody`.
5+
160.10
27----
38
servant-docs/servant-docs.cabal+8−2
@@ -1,5 +1,5 @@
11name: servant-docs
2−version: 0.10.0.1
2+version: 0.11
33synopsis: generate API docs for your servant webservice
44description:
55 Library for generating API docs from a servant API definition.
@@ -15,7 +15,11 @@ copyright: 2014-2016 Zalora South East Asia Pte Ltd, Servant Contribut
1515category: Servant Web
1616build-type: Simple
1717cabal-version: >=1.10
18−tested-with: GHC >= 7.8
18+tested-with:
19+ GHC==7.8.4
20+ GHC==7.10.3
21+ GHC==8.0.2
22+ GHC==8.2.1
1923homepage: http://haskell-servant.readthedocs.org/
2024Bug-reports: http://github.com/haskell-servant/servant/issues
2125extra-source-files:
@@ -75,6 +79,8 @@ test-suite spec
7579 type: exitcode-stdio-1.0
7680 main-is: Spec.hs
7781 other-modules: Servant.DocsSpec
82+ build-tool-depends:
83+ hspec-discover:hspec-discover
7884 hs-source-dirs: test
7985 ghc-options: -Wall
8086 build-depends:
servant-foreign/servant-foreign.cabal+8
@@ -22,6 +22,12 @@ extra-source-files:
2222 CHANGELOG.md
2323 README.md
2424bug-reports: http://github.com/haskell-servant/servant/issues
25+tested-with:
26+ GHC==7.8.4
27+ GHC==7.10.3
28+ GHC==8.0.2
29+ GHC==8.2.1
30+
2531source-repository head
2632 type: git
2733 location: http://github.com/haskell-servant/servant.git
@@ -65,6 +71,8 @@ test-suite spec
6571 include-dirs: include
6672 main-is: Spec.hs
6773 other-modules: Servant.ForeignSpec
74+ build-tool-depends:
75+ hspec-discover:hspec-discover
6876 build-depends: base
6977 , hspec >= 2.1.8
7078 , servant
servant-server/servant-server.cabal+10−4
@@ -1,5 +1,5 @@
11name: servant-server
2−version: 0.11
2+version: 0.11.0.1
33synopsis: A family of combinators for defining webservices APIs and serving them
44description:
55 A family of combinators for defining webservices APIs and serving them
@@ -21,7 +21,11 @@ copyright: 2014-2016 Zalora South East Asia Pte Ltd, Servant Contribut
2121category: Servant Web
2222build-type: Custom
2323cabal-version: >=1.10
24−tested-with: GHC >= 7.8
24+tested-with:
25+ GHC==7.8.4
26+ GHC==7.10.3
27+ GHC==8.0.2
28+ GHC==8.2.1
2529extra-source-files:
2630 include/*.h
2731 CHANGELOG.md
@@ -51,7 +55,7 @@ library
5155 Servant.Server.Internal.ServantErr
5256 Servant.Utils.StaticFiles
5357 build-depends:
54− base >= 4.7 && < 4.10
58+ base >= 4.7 && < 4.11
5559 , base-compat >= 0.9 && < 0.10
5660 , aeson >= 0.7 && < 1.3
5761 , attoparsec >= 0.12 && < 0.14
@@ -60,7 +64,7 @@ library
6064 , containers >= 0.5 && < 0.6
6165 , exceptions >= 0.8 && < 0.9
6266 , http-api-data >= 0.3 && < 0.4
63− , http-types >= 0.8 && < 0.10
67+ , http-types >= 0.8 && < 0.11
6468 , network-uri >= 2.6 && < 2.7
6569 , monad-control >= 1.0.0.4 && < 1.1
6670 , mtl >= 2 && < 2.3
@@ -120,6 +124,8 @@ test-suite spec
120124 Servant.Server.UsingContextSpec.TestCombinators
121125 Servant.ServerSpec
122126 Servant.Utils.StaticFilesSpec
127+ build-tool-depends:
128+ hspec-discover:hspec-discover
123129 build-depends:
124130 base == 4.*
125131 , base-compat
servant-server/test/Servant/ServerSpec.hs+11−2
@@ -28,7 +28,11 @@ import Network.HTTP.Types (Status (..), hAccept, hContentType,
2828 methodDelete, methodGet,
2929 methodHead, methodPatch,
3030 methodPost, methodPut, ok200,
31+#if MIN_VERSION_http_types(0,10,0)
32+ imATeapot418,
33+#else
3134 imATeaPot418,
35+#endif
3236 parseQuery)
3337import Network.Wai (Application, Request, requestHeaders, pathInfo,
3438 queryString, rawQueryString,
@@ -65,6 +69,11 @@ import Servant.Server.Experimental.Auth
6569import Servant.Server.Internal.Context
6670 (NamedContext(..))
6771
72+#if !MIN_VERSION_http_types(0,10,0)
73+imATeapot418 :: Status
74+imATeapot418 = imATeaPot418
75+#endif
76+
6877-- * comprehensive api test
6978
7079-- This declaration simply checks that all instances are in place.
@@ -657,7 +666,7 @@ basicAuthApi = Proxy
657666basicAuthServer :: Server BasicAuthAPI
658667basicAuthServer =
659668 const (return jerry) :<|>
660− (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
669+ (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
661670
662671basicAuthContext :: Context '[ BasicAuthCheck () ]
663672basicAuthContext =
@@ -702,7 +711,7 @@ genAuthApi = Proxy
702711
703712genAuthServer :: Server GenAuthAPI
704713genAuthServer = const (return tweety)
705− :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
714+ :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
706715
707716type instance AuthServerData (AuthProtect "auth") = ()
708717
servant/servant.cabal+11−4
@@ -1,5 +1,6 @@
11name: servant
22version: 0.11
3+x-revision: 2
34synopsis: A family of combinators for defining webservices APIs
45description:
56 A family of combinators for defining webservices APIs and serving them
@@ -17,7 +18,11 @@ copyright: 2014-2016 Zalora South East Asia Pte Ltd, Servant Contribut
1718category: Servant Web
1819build-type: Custom
1920cabal-version: >=1.10
20−tested-with: GHC >= 7.8
21+tested-with:
22+ GHC==7.8.4
23+ GHC==7.10.3
24+ GHC==8.0.2
25+ GHC==8.2.1
2126extra-source-files:
2227 include/*.h
2328 CHANGELOG.md
@@ -57,15 +62,15 @@ library
5762 Servant.Utils.Links
5863 Servant.Utils.Enter
5964 build-depends:
60− base >= 4.7 && < 4.10
65+ base >= 4.7 && < 4.11
6166 , base-compat >= 0.9 && < 0.10
6267 , aeson >= 0.7 && < 1.3
6368 , attoparsec >= 0.12 && < 0.14
6469 , bytestring >= 0.10 && < 0.11
6570 , case-insensitive >= 1.2 && < 1.3
6671 , http-api-data >= 0.3 && < 0.4
67− , http-media >= 0.4 && < 0.7
68− , http-types >= 0.8 && < 0.10
72+ , http-media >= 0.4 && < 0.8
73+ , http-types >= 0.8 && < 0.11
6974 , natural-transformation >= 0.4 && < 0.5
7075 , mtl >= 2.0 && < 2.3
7176 , mmorph >= 1 && < 1.2
@@ -117,6 +122,8 @@ test-suite spec
117122 Servant.API.ResponseHeadersSpec
118123 Servant.Utils.LinksSpec
119124 Servant.Utils.EnterSpec
125+ build-tool-depends:
126+ hspec-discover:hspec-discover
120127 build-depends:
121128 base == 4.*
122129 , base-compat
stack-ghc-8.2.1.yamlnew file+7
@@ -0,0 +1,7 @@
1+resolver: nightly-2017-09-01
2+packages:
3+- servant-client/
4+- servant-docs/
5+- servant-foreign/
6+- servant-server/
7+- servant/