git.iko.soy/typeable/servant
on master help sign in
Merge pull request #459 from joncfoo/patch-1
fffa72bSönke Hahn
servant-mock/src/Servant/Mock.hs+3−3
@@ -36,7 +36,7 @@
36-- and call 'mock', which has the following type:
36-- and call 'mock', which has the following type:
37--
37--
38-- @
38-- @
39−-- 'mock' :: 'HasMock' api => 'Proxy' api -> 'Server' api
39+-- 'mock' :: 'HasMock' api context => 'Proxy' api -> 'Proxy' context -> 'Server' api
40-- @
40-- @
41--
41--
42-- What this says is, given some API type @api@ that it knows it can
42-- What this says is, given some API type @api@ that it knows it can
@@ -52,7 +52,7 @@
52-- @
52-- @
53-- main :: IO ()
53-- main :: IO ()
54-- main = Network.Wai.Handler.Warp.run 8080 $
54-- main = Network.Wai.Handler.Warp.run 8080 $
55−-- 'serve' myAPI ('mock' myAPI)
55+-- 'serve' myAPI ('mock' myAPI Proxy)
56-- @
56-- @
57module Servant.Mock ( HasMock(..) ) where
57module Servant.Mock ( HasMock(..) ) where
58
58
@@ -90,7 +90,7 @@ class HasServer api context => HasMock api context where
90 -- -- let's say we will start with the frontend,
90 -- -- let's say we will start with the frontend,
91 -- -- and hence need a placeholder server
91 -- -- and hence need a placeholder server
92 -- server :: Server API
92 -- server :: Server API
93− -- server = mock api
93+ -- server = mock api Proxy
94 -- @
94 -- @
95 --
95 --
96 -- What happens here is that @'Server' API@
96 -- What happens here is that @'Server' API@