git.iko.soy/typeable/servant
on master help sign in
Merge pull request #842 from phadej/http-types-0.10b

Http types 0.10b

commitde965b208e469b3a9358c5d81ee4eaabb2648033 authorOleg Grenrus <oleg.grenrus@iki.fi> dateWed 25 Oct 2017, 13:08 (9 years ago) parentff5502f76616de
9 files changed+41−8
doc/tutorial/tutorial.cabal+12−1 servant-client-core/servant-client-core.cabal+3−1 servant-client/servant-client.cabal+3−1 servant-docs/servant-docs.cabal+2 servant-foreign/servant-foreign.cabal+2 servant-server/servant-server.cabal+3−1 servant-server/test/Servant/ServerSpec.hs+11−2 servant/servant.cabal+3−1 stack.yaml+2−1
doc/tutorial/tutorial.cabal+12−1
@@ -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
@@ -38,7 +46,8 @@ library
3846 , string-conversions
3947 , bytestring
4048 , attoparsec
41− , mtl
49+ , mtl >=2.1 && <2.3
50+ , mtl-compat
4251 , random
4352 , js-jquery
4453 , wai
@@ -57,6 +66,8 @@ test-suite spec
5766 hs-source-dirs: test
5867 main-is: Spec.hs
5968 other-modules: JavascriptSpec
69+ build-tool-depends:
70+ hspec-discover:hspec-discover
6071 build-depends: base == 4.*
6172 , tutorial
6273 , hspec
servant-client-core/servant-client-core.cabal+3−1
@@ -43,7 +43,7 @@ library
4343 , generics-sop >= 0.1.0.0 && < 0.4
4444 , http-api-data >= 0.3.6 && < 0.4
4545 , http-media >= 0.6.2 && < 0.8
46− , http-types >= 0.8.6 && < 0.10
46+ , http-types >= 0.8.6 && < 0.11
4747 , mtl >= 2.1 && < 2.3
4848 , network-uri >= 2.6 && < 2.7
4949 , safe >= 0.3.9 && < 0.4
@@ -70,5 +70,7 @@ test-suite spec
7070 , servant-client-core
7171 , hspec == 2.*
7272 , QuickCheck >= 2.7 && < 2.11
73+ build-tool-depends:
74+ hspec-discover:hspec-discover
7375 other-modules:
7476 Servant.Client.Core.Internal.BaseUrlSpec
servant-client/servant-client.cabal+3−1
@@ -41,7 +41,7 @@ library
4141 , http-client >= 0.4.30 && < 0.6
4242 , http-client-tls >= 0.2.2 && < 0.4
4343 , http-media >= 0.6.2 && < 0.8
44− , http-types >= 0.8.6 && < 0.10
44+ , http-types >= 0.8.6 && < 0.11
4545 , exceptions >= 0.8 && < 0.9
4646 , monad-control >= 1.0.0.4 && < 1.1
4747 , mtl >= 2.1 && < 2.3
@@ -64,6 +64,8 @@ test-suite spec
6464 default-language: Haskell2010
6565 hs-source-dirs: test
6666 main-is: Spec.hs
67+ build-tool-depends:
68+ hspec-discover:hspec-discover
6769 other-modules:
6870 Servant.ClientSpec
6971 build-depends:
servant-docs/servant-docs.cabal+2
@@ -75,6 +75,8 @@ test-suite spec
7575 type: exitcode-stdio-1.0
7676 main-is: Spec.hs
7777 other-modules: Servant.DocsSpec
78+ build-tool-depends:
79+ hspec-discover:hspec-discover
7880 hs-source-dirs: test
7981 ghc-options: -Wall
8082 build-depends:
servant-foreign/servant-foreign.cabal+2
@@ -65,6 +65,8 @@ test-suite spec
6565 include-dirs: include
6666 main-is: Spec.hs
6767 other-modules: Servant.ForeignSpec
68+ build-tool-depends:
69+ hspec-discover:hspec-discover
6870 build-depends: base
6971 , hspec >= 2.1.8
7072 , servant
servant-server/servant-server.cabal+3−1
@@ -60,7 +60,7 @@ library
6060 , containers >= 0.5 && < 0.6
6161 , exceptions >= 0.8 && < 0.9
6262 , http-api-data >= 0.3 && < 0.4
63− , http-types >= 0.8 && < 0.10
63+ , http-types >= 0.8 && < 0.11
6464 , network-uri >= 2.6 && < 2.7
6565 , monad-control >= 1.0.0.4 && < 1.1
6666 , mtl >= 2 && < 2.3
@@ -120,6 +120,8 @@ test-suite spec
120120 Servant.Server.UsingContextSpec.TestCombinators
121121 Servant.ServerSpec
122122 Servant.Utils.StaticFilesSpec
123+ build-tool-depends:
124+ hspec-discover:hspec-discover
123125 build-depends:
124126 base == 4.*
125127 , base-compat
servant-server/test/Servant/ServerSpec.hs+11−2
@@ -33,7 +33,11 @@ import Network.HTTP.Types (Status (..), hAccept, hContentType,
3333 methodDelete, methodGet,
3434 methodHead, methodPatch,
3535 methodPost, methodPut, ok200,
36+#if MIN_VERSION_http_types(0,10,0)
37+ imATeapot418,
38+#else
3639 imATeaPot418,
40+#endif
3741 parseQuery)
3842import Network.Wai (Application, Request, requestHeaders, pathInfo,
3943 queryString, rawQueryString,
@@ -70,6 +74,11 @@ import Servant.Server.Experimental.Auth
7074import Servant.Server.Internal.Context
7175 (NamedContext(..))
7276
77+#if !MIN_VERSION_http_types(0,10,0)
78+imATeapot418 :: Status
79+imATeapot418 = imATeaPot418
80+#endif
81+
7382-- * comprehensive api test
7483
7584-- This declaration simply checks that all instances are in place.
@@ -662,7 +671,7 @@ basicAuthApi = Proxy
662671basicAuthServer :: Server BasicAuthAPI
663672basicAuthServer =
664673 const (return jerry) :<|>
665− (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
674+ (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
666675
667676basicAuthContext :: Context '[ BasicAuthCheck () ]
668677basicAuthContext =
@@ -707,7 +716,7 @@ genAuthApi = Proxy
707716
708717genAuthServer :: Server GenAuthAPI
709718genAuthServer = const (return tweety)
710− :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
719+ :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
711720
712721type instance AuthServerData (AuthProtect "auth") = ()
713722
servant/servant.cabal+3−1
@@ -66,7 +66,7 @@ library
6666 , case-insensitive >= 1.2 && < 1.3
6767 , http-api-data >= 0.3 && < 0.4
6868 , http-media >= 0.4 && < 0.8
69− , http-types >= 0.8 && < 0.10
69+ , http-types >= 0.8 && < 0.11
7070 , natural-transformation >= 0.4 && < 0.5
7171 , mtl >= 2.0 && < 2.3
7272 , mmorph >= 1 && < 1.2
@@ -118,6 +118,8 @@ test-suite spec
118118 Servant.API.ResponseHeadersSpec
119119 Servant.Utils.LinksSpec
120120 Servant.Utils.EnterSpec
121+ build-tool-depends:
122+ hspec-discover:hspec-discover
121123 build-depends:
122124 base == 4.*
123125 , base-compat
stack.yaml+2−1
@@ -10,7 +10,8 @@ packages:
1010extra-deps:
1111- aeson-1.2.0.0
1212- attoparsec-iso8601-1.0.0.0
13−- http-media-0.7.0
1413- cabal-doctest-1.0.2
1514- http-api-data-0.3.7
15+- http-media-0.7.0
16+- http-types-0.10
1617- servant-js-0.9.3