on master help sign in
Merge pull request #842 from phadej/http-types-0.10b
de965b2Oleg Grenrus
doc/tutorial/tutorial.cabal+12−1
@@ -8,6 +8,14 @@ author: Servant Contributors
8maintainer: haskell-servant-maintainers@googlegroups.com
8maintainer: haskell-servant-maintainers@googlegroups.com
9build-type: Simple
9build-type: Simple
10cabal-version: >=1.10
10cabal-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
11
19
12library
20library
13 exposed-modules: ApiType
21 exposed-modules: ApiType
@@ -38,7 +46,8 @@ library
38 , string-conversions
46 , string-conversions
39 , bytestring
47 , bytestring
40 , attoparsec
48 , attoparsec
41− , mtl
49+ , mtl >=2.1 && <2.3
50+ , mtl-compat
42 , random
51 , random
43 , js-jquery
52 , js-jquery
44 , wai
53 , wai
@@ -57,6 +66,8 @@ test-suite spec
57 hs-source-dirs: test
66 hs-source-dirs: test
58 main-is: Spec.hs
67 main-is: Spec.hs
59 other-modules: JavascriptSpec
68 other-modules: JavascriptSpec
69+ build-tool-depends:
70+ hspec-discover:hspec-discover
60 build-depends: base == 4.*
71 build-depends: base == 4.*
61 , tutorial
72 , tutorial
62 , hspec
73 , hspec
servant-client-core/servant-client-core.cabal+3−1
@@ -43,7 +43,7 @@ library
43 , generics-sop >= 0.1.0.0 && < 0.4
43 , generics-sop >= 0.1.0.0 && < 0.4
44 , http-api-data >= 0.3.6 && < 0.4
44 , http-api-data >= 0.3.6 && < 0.4
45 , http-media >= 0.6.2 && < 0.8
45 , http-media >= 0.6.2 && < 0.8
46− , http-types >= 0.8.6 && < 0.10
46+ , http-types >= 0.8.6 && < 0.11
47 , mtl >= 2.1 && < 2.3
47 , mtl >= 2.1 && < 2.3
48 , network-uri >= 2.6 && < 2.7
48 , network-uri >= 2.6 && < 2.7
49 , safe >= 0.3.9 && < 0.4
49 , safe >= 0.3.9 && < 0.4
@@ -70,5 +70,7 @@ test-suite spec
70 , servant-client-core
70 , servant-client-core
71 , hspec == 2.*
71 , hspec == 2.*
72 , QuickCheck >= 2.7 && < 2.11
72 , QuickCheck >= 2.7 && < 2.11
73+ build-tool-depends:
74+ hspec-discover:hspec-discover
73 other-modules:
75 other-modules:
74 Servant.Client.Core.Internal.BaseUrlSpec
76 Servant.Client.Core.Internal.BaseUrlSpec
servant-client/servant-client.cabal+3−1
@@ -41,7 +41,7 @@ library
41 , http-client >= 0.4.30 && < 0.6
41 , http-client >= 0.4.30 && < 0.6
42 , http-client-tls >= 0.2.2 && < 0.4
42 , http-client-tls >= 0.2.2 && < 0.4
43 , http-media >= 0.6.2 && < 0.8
43 , http-media >= 0.6.2 && < 0.8
44− , http-types >= 0.8.6 && < 0.10
44+ , http-types >= 0.8.6 && < 0.11
45 , exceptions >= 0.8 && < 0.9
45 , exceptions >= 0.8 && < 0.9
46 , monad-control >= 1.0.0.4 && < 1.1
46 , monad-control >= 1.0.0.4 && < 1.1
47 , mtl >= 2.1 && < 2.3
47 , mtl >= 2.1 && < 2.3
@@ -64,6 +64,8 @@ test-suite spec
64 default-language: Haskell2010
64 default-language: Haskell2010
65 hs-source-dirs: test
65 hs-source-dirs: test
66 main-is: Spec.hs
66 main-is: Spec.hs
67+ build-tool-depends:
68+ hspec-discover:hspec-discover
67 other-modules:
69 other-modules:
68 Servant.ClientSpec
70 Servant.ClientSpec
69 build-depends:
71 build-depends:
servant-docs/servant-docs.cabal+2
@@ -75,6 +75,8 @@ test-suite spec
75 type: exitcode-stdio-1.0
75 type: exitcode-stdio-1.0
76 main-is: Spec.hs
76 main-is: Spec.hs
77 other-modules: Servant.DocsSpec
77 other-modules: Servant.DocsSpec
78+ build-tool-depends:
79+ hspec-discover:hspec-discover
78 hs-source-dirs: test
80 hs-source-dirs: test
79 ghc-options: -Wall
81 ghc-options: -Wall
80 build-depends:
82 build-depends:
servant-foreign/servant-foreign.cabal+2
@@ -65,6 +65,8 @@ test-suite spec
65 include-dirs: include
65 include-dirs: include
66 main-is: Spec.hs
66 main-is: Spec.hs
67 other-modules: Servant.ForeignSpec
67 other-modules: Servant.ForeignSpec
68+ build-tool-depends:
69+ hspec-discover:hspec-discover
68 build-depends: base
70 build-depends: base
69 , hspec >= 2.1.8
71 , hspec >= 2.1.8
70 , servant
72 , servant
servant-server/servant-server.cabal+3−1
@@ -60,7 +60,7 @@ library
60 , containers >= 0.5 && < 0.6
60 , containers >= 0.5 && < 0.6
61 , exceptions >= 0.8 && < 0.9
61 , exceptions >= 0.8 && < 0.9
62 , http-api-data >= 0.3 && < 0.4
62 , http-api-data >= 0.3 && < 0.4
63− , http-types >= 0.8 && < 0.10
63+ , http-types >= 0.8 && < 0.11
64 , network-uri >= 2.6 && < 2.7
64 , network-uri >= 2.6 && < 2.7
65 , monad-control >= 1.0.0.4 && < 1.1
65 , monad-control >= 1.0.0.4 && < 1.1
66 , mtl >= 2 && < 2.3
66 , mtl >= 2 && < 2.3
@@ -120,6 +120,8 @@ test-suite spec
120 Servant.Server.UsingContextSpec.TestCombinators
120 Servant.Server.UsingContextSpec.TestCombinators
121 Servant.ServerSpec
121 Servant.ServerSpec
122 Servant.Utils.StaticFilesSpec
122 Servant.Utils.StaticFilesSpec
123+ build-tool-depends:
124+ hspec-discover:hspec-discover
123 build-depends:
125 build-depends:
124 base == 4.*
126 base == 4.*
125 , base-compat
127 , base-compat
servant-server/test/Servant/ServerSpec.hs+11−2
@@ -33,7 +33,11 @@ import Network.HTTP.Types (Status (..), hAccept, hContentType,
33 methodDelete, methodGet,
33 methodDelete, methodGet,
34 methodHead, methodPatch,
34 methodHead, methodPatch,
35 methodPost, methodPut, ok200,
35 methodPost, methodPut, ok200,
36+#if MIN_VERSION_http_types(0,10,0)
37+ imATeapot418,
38+#else
36 imATeaPot418,
39 imATeaPot418,
40+#endif
37 parseQuery)
41 parseQuery)
38import Network.Wai (Application, Request, requestHeaders, pathInfo,
42import Network.Wai (Application, Request, requestHeaders, pathInfo,
39 queryString, rawQueryString,
43 queryString, rawQueryString,
@@ -70,6 +74,11 @@ import Servant.Server.Experimental.Auth
70import Servant.Server.Internal.Context
74import Servant.Server.Internal.Context
71 (NamedContext(..))
75 (NamedContext(..))
72
76
77+#if !MIN_VERSION_http_types(0,10,0)
78+imATeapot418 :: Status
79+imATeapot418 = imATeaPot418
80+#endif
81+
73-- * comprehensive api test
82-- * comprehensive api test
74
83
75-- This declaration simply checks that all instances are in place.
84-- This declaration simply checks that all instances are in place.
@@ -662,7 +671,7 @@ basicAuthApi = Proxy
662basicAuthServer :: Server BasicAuthAPI
671basicAuthServer :: Server BasicAuthAPI
663basicAuthServer =
672basicAuthServer =
664 const (return jerry) :<|>
673 const (return jerry) :<|>
665− (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
674+ (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
666
675
667basicAuthContext :: Context '[ BasicAuthCheck () ]
676basicAuthContext :: Context '[ BasicAuthCheck () ]
668basicAuthContext =
677basicAuthContext =
@@ -707,7 +716,7 @@ genAuthApi = Proxy
707
716
708genAuthServer :: Server GenAuthAPI
717genAuthServer :: Server GenAuthAPI
709genAuthServer = const (return tweety)
718genAuthServer = const (return tweety)
710− :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
719+ :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
711
720
712type instance AuthServerData (AuthProtect "auth") = ()
721type instance AuthServerData (AuthProtect "auth") = ()
713
722
servant/servant.cabal+3−1
@@ -66,7 +66,7 @@ library
66 , case-insensitive >= 1.2 && < 1.3
66 , case-insensitive >= 1.2 && < 1.3
67 , http-api-data >= 0.3 && < 0.4
67 , http-api-data >= 0.3 && < 0.4
68 , http-media >= 0.4 && < 0.8
68 , http-media >= 0.4 && < 0.8
69− , http-types >= 0.8 && < 0.10
69+ , http-types >= 0.8 && < 0.11
70 , natural-transformation >= 0.4 && < 0.5
70 , natural-transformation >= 0.4 && < 0.5
71 , mtl >= 2.0 && < 2.3
71 , mtl >= 2.0 && < 2.3
72 , mmorph >= 1 && < 1.2
72 , mmorph >= 1 && < 1.2
@@ -118,6 +118,8 @@ test-suite spec
118 Servant.API.ResponseHeadersSpec
118 Servant.API.ResponseHeadersSpec
119 Servant.Utils.LinksSpec
119 Servant.Utils.LinksSpec
120 Servant.Utils.EnterSpec
120 Servant.Utils.EnterSpec
121+ build-tool-depends:
122+ hspec-discover:hspec-discover
121 build-depends:
123 build-depends:
122 base == 4.*
124 base == 4.*
123 , base-compat
125 , base-compat
stack.yaml+2−1
@@ -10,7 +10,8 @@ packages:
10extra-deps:
10extra-deps:
11- aeson-1.2.0.0
11- aeson-1.2.0.0
12- attoparsec-iso8601-1.0.0.0
12- attoparsec-iso8601-1.0.0.0
13−- http-media-0.7.0
14- cabal-doctest-1.0.2
13- cabal-doctest-1.0.2
15- http-api-data-0.3.7
14- http-api-data-0.3.7
15+- http-media-0.7.0
16+- http-types-0.10
16- servant-js-0.9.3
17- servant-js-0.9.3