git.iko.soy/typeable/servant
on master help sign in
ComprehensiveAPI: add some comments (and minor tweaks)
ac930efSönke Hahn
servant-client/test/Servant/ClientSpec.hs+1
@@ -53,6 +53,7 @@ import Servant.API.Internal.Test.ComprehensiveAPI
53import Servant.Client
53import Servant.Client
54import Servant.Server
54import Servant.Server
55
55
56+-- This declaration simply checks that all instances are in place.
56_ = client comprehensiveAPI
57_ = client comprehensiveAPI
57
58
58spec :: Spec
59spec :: Spec
servant-docs/test/Servant/DocsSpec.hs+1
@@ -23,6 +23,7 @@ import Servant.Docs.Internal
23
23
24-- * comprehensive api
24-- * comprehensive api
25
25
26+-- This declaration simply checks that all instances are in place.
26_ = docs comprehensiveAPI
27_ = docs comprehensiveAPI
27
28
28instance ToParam (QueryParam "foo" Int) where
29instance ToParam (QueryParam "foo" Int) where
servant-js/test/Servant/JSSpec.hs+2−1
@@ -32,7 +32,8 @@ import Servant.JSSpec.CustomHeaders
32
32
33-- * comprehensive api
33-- * comprehensive api
34
34
35+-- This declaration simply checks that all instances are in place.
35−_ = (jsForAPI comprehensiveAPI vanillaJS :: Text)
36+_ = jsForAPI comprehensiveAPI vanillaJS :: Text
36
37
37-- * specs
38-- * specs
38
39
servant-mock/test/Servant/MockSpec.hs+1
@@ -20,6 +20,7 @@ import Servant
20import Servant.API.Internal.Test.ComprehensiveAPI
20import Servant.API.Internal.Test.ComprehensiveAPI
21import Servant.Mock
21import Servant.Mock
22
22
23+-- This declaration simply checks that all instances are in place.
23_ = mock comprehensiveAPI
24_ = mock comprehensiveAPI
24
25
25data Body
26data Body
servant-server/test/Servant/ServerSpec.hs+2−1
@@ -63,7 +63,8 @@ import Servant.Server.Internal.Router
63
63
64-- * comprehensive api test
64-- * comprehensive api test
65
65
66+-- This declaration simply checks that all instances are in place.
66−_ = serve comprehensiveAPI (error "unused") (error "unused")
67+_ = serve comprehensiveAPI
67
68
68-- * Specs
69-- * Specs
69
70
servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs+3
@@ -1,6 +1,9 @@
1{-# LANGUAGE DataKinds #-}
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE TypeOperators #-}
2{-# LANGUAGE TypeOperators #-}
3
3
4+-- | This is a module containing an API with all `Servant.API` combinators. It
5+-- is used for testing only (in particular, checking that instances exist for
6+-- the core servant classes for each combinator), and should not be imported.
4module Servant.API.Internal.Test.ComprehensiveAPI where
7module Servant.API.Internal.Test.ComprehensiveAPI where
5
8
6import Data.Proxy
9import Data.Proxy