git.iko.soy/typeable/servant
on master help sign in
Rename ApiQuasiQuoting.

And fix haddocks for it.

commitdee47654f9d1b0fe6c41330752512643a1deb47e authorJulian K. Arni <jkarni@gmail.com> dateTue 25 Nov 2014, 16:35 (12 years ago) parent63584d5
6 files changed+11−14
servant.cabal+1−1 src/Servant.hs+2−2 src/Servant/API.hs+2−2 src/Servant/Utils/ApiQuasiQuoting.hs → src/Servant/QQ.hs+4−8 src/Servant/Utils/Links.hs+1 test/Servant/Utils/ApiQuasiQuotingSpec.hs → test/Servant/QQSpec.hs+1−1
servant.cabal+1−1
@@ -31,8 +31,8 @@ library
3131 Servant.Common.Req
3232 Servant.Common.Text
3333 Servant.Docs
34+ Servant.QQ
3435 Servant.Server
35− Servant.Utils.ApiQuasiQuoting
3636 Servant.Utils.Links
3737 Servant.Utils.StaticFiles
3838 build-depends:
src/Servant.hs+2−2
@@ -12,7 +12,7 @@ module Servant (
1212 -- | Using your types in request paths and query string parameters
1313 module Servant.Common.Text,
1414 -- | Utilities on top of the servant core
15− module Servant.Utils.ApiQuasiQuoting,
15+ module Servant.QQ,
1616 module Servant.Utils.Links,
1717 module Servant.Utils.StaticFiles,
1818 -- | Useful re-exports
@@ -25,6 +25,6 @@ import Servant.Client
2525import Servant.Common.Text
2626import Servant.Docs
2727import Servant.Server
28−import Servant.Utils.ApiQuasiQuoting
28+import Servant.QQ
2929import Servant.Utils.Links
3030import Servant.Utils.StaticFiles
src/Servant/API.hs+2−2
@@ -31,7 +31,7 @@ module Servant.API (
3131
3232 -- * Utilities
3333 -- | QuasiQuotes for endpoints
34− module Servant.Utils.ApiQuasiQuoting,
34+ module Servant.QQ,
3535 -- | Type-safe internal URLs
3636 module Servant.Utils.Links,
3737 ) where
@@ -46,6 +46,6 @@ import Servant.API.QueryParam
4646import Servant.API.Raw
4747import Servant.API.ReqBody
4848import Servant.API.Sub
49−import Servant.Utils.ApiQuasiQuoting (sitemap)
49+import Servant.QQ (sitemap)
5050import Servant.Utils.Links (mkLink)
5151import Servant.Utils.StaticFiles
src/Servant/Utils/ApiQuasiQuoting.hs → src/Servant/QQ.hsrenamed+4−8
@@ -21,12 +21,12 @@
2121--
2222-- @
2323-- "hello" :> ReqBody String :> Put ()
24−-- :<|> "hello" :> Capture "p" Int :> ReqBody String :> Post ()
25−-- :<|> "hello" :> QueryParam "name" String :> Get Int
24+-- :\<|> "hello" :> Capture "p" Int :> ReqBody String :> Post ()
25+-- :\<|> "hello" :> QueryParam "name" String :> Get Int
2626-- @
2727--
28−-- Note the '/' before a 'QueryParam'!
29−module Servant.Utils.ApiQuasiQuoting where
28+-- Note the @/@ before a @QueryParam@!
29+module Servant.QQ where
3030
3131import Control.Monad (void)
3232import Control.Applicative hiding (many, (<|>), optional)
@@ -177,18 +177,14 @@ parseAll = do
177177-- | The sitemap QuasiQuoter.
178178--
179179-- * @.../<var>:<type>/...@ becomes a capture
180−--
181180-- * @.../?<var>:<type>@ becomes a query parameter
182−--
183181-- * @<method> ... <typ>@ becomes a method returning @<typ>@
184−--
185182-- * @<method> ... <typ1> -> <typ2>@ becomes a method with request
186183-- body of @<typ1>@ and returning @<typ2>@
187184--
188185-- Comments are allowed, and have the standard Haskell format
189186--
190187-- * @--@ for inline
191−--
192188-- * @{- ... -}@ for block
193189--
194190sitemap :: QuasiQuoter
src/Servant/Utils/Links.hs+1
@@ -9,6 +9,7 @@
99-- | Type safe internal links.
1010--
1111-- Provides the function 'mkLink':
12+--
1213-- @
1314-- type API = Proxy ("hello" :> Get Int
1415-- :<|> "bye" :> QueryParam "name" String :> Post Bool)
test/Servant/Utils/ApiQuasiQuotingSpec.hs → test/Servant/QQSpec.hsrenamed+1−1
@@ -7,7 +7,7 @@
77{-# LANGUAGE TypeFamilies #-}
88{-# LANGUAGE TypeOperators #-}
99{-# LANGUAGE UndecidableInstances #-}
10−module Servant.Utils.ApiQuasiQuotingSpec where
10+module Servant.Utils.QQSpec where
1111
1212import Test.Hspec
1313