git.iko.soy/typeable/servant
on master help sign in
Merge pull request #459 from joncfoo/patch-1

Fix code example in haddock of servant-mock

commitfffa72b62b5239e1ede7ddd69e998ed9093afa95 authorSönke Hahn <soenkehahn@gmail.com> dateMon 11 Apr 2016, 23:01 (11 years ago) parent6ec4bdcaa71099
1 file changed+3−3
servant-mock/src/Servant/Mock.hs+3−3
servant-mock/src/Servant/Mock.hs+3−3
@@ -36,7 +36,7 @@
3636-- and call 'mock', which has the following type:
3737--
3838-- @
39−-- 'mock' :: 'HasMock' api => 'Proxy' api -> 'Server' api
39+-- 'mock' :: 'HasMock' api context => 'Proxy' api -> 'Proxy' context -> 'Server' api
4040-- @
4141--
4242-- What this says is, given some API type @api@ that it knows it can
@@ -52,7 +52,7 @@
5252-- @
5353-- main :: IO ()
5454-- main = Network.Wai.Handler.Warp.run 8080 $
55−-- 'serve' myAPI ('mock' myAPI)
55+-- 'serve' myAPI ('mock' myAPI Proxy)
5656-- @
5757module Servant.Mock ( HasMock(..) ) where
5858
@@ -90,7 +90,7 @@ class HasServer api context => HasMock api context where
9090 -- -- let's say we will start with the frontend,
9191 -- -- and hence need a placeholder server
9292 -- server :: Server API
93− -- server = mock api
93+ -- server = mock api Proxy
9494 -- @
9595 --
9696 -- What happens here is that @'Server' API@