ComprehensiveAPI: add some comments (and minor tweaks)
commitac930ef198ee00a257e32c85839b6691817e5aa9
authorSönke Hahn <soenkehahn@gmail.com>
dateMon 18 Jan 2016, 19:55 (11 years ago)
parent14aac5f
servant-client/test/Servant/ClientSpec.hs+1
@@ -53,6 +53,7 @@ import Servant.API.Internal.Test.ComprehensiveAPI
5353import Servant.Client
5454import Servant.Server
5555
56+-- This declaration simply checks that all instances are in place.
5657_ = client comprehensiveAPI
5758
5859spec :: Spec
servant-docs/test/Servant/DocsSpec.hs+1
@@ -23,6 +23,7 @@ import Servant.Docs.Internal
2323
2424-- * comprehensive api
2525
26+-- This declaration simply checks that all instances are in place.
2627_ = docs comprehensiveAPI
2728
2829instance ToParam (QueryParam "foo" Int) where
servant-js/test/Servant/JSSpec.hs+2−1
@@ -32,7 +32,8 @@ import Servant.JSSpec.CustomHeaders
3232
3333-- * comprehensive api
3434
35−_ = (jsForAPI comprehensiveAPI vanillaJS :: Text)
35+-- This declaration simply checks that all instances are in place.
36+_ = jsForAPI comprehensiveAPI vanillaJS :: Text
3637
3738-- * specs
3839
servant-mock/test/Servant/MockSpec.hs+1
@@ -20,6 +20,7 @@ import Servant
2020import Servant.API.Internal.Test.ComprehensiveAPI
2121import Servant.Mock
2222
23+-- This declaration simply checks that all instances are in place.
2324_ = mock comprehensiveAPI
2425
2526data Body
servant-server/test/Servant/ServerSpec.hs+2−1
@@ -63,7 +63,8 @@ import Servant.Server.Internal.Router
6363
6464-- * comprehensive api test
6565
66−_ = serve comprehensiveAPI (error "unused") (error "unused")
66+-- This declaration simply checks that all instances are in place.
67+_ = serve comprehensiveAPI
6768
6869-- * Specs
6970
servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs+3
@@ -1,6 +1,9 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE TypeOperators #-}
33
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.
47module Servant.API.Internal.Test.ComprehensiveAPI where
58
69import Data.Proxy