git.iko.soy/typeable/servant
on master help sign in
Documentation fixes
commitda8337809b3e148a64e0c093960870d1c6a5304c authorJulian K. Arni <jkarni@gmail.com> dateWed 13 Sep 2017, 16:01 (9 years ago) parentd6aee29
6 files changed+18−16
doc/tutorial/Client.lhs+4−4 servant-client-core/CHANGELOG.md+3−2 servant-client-core/README.md+1−1 servant-client-core/servant-client-core.cabal+7−6 servant-client/src/Servant/Client.hs+2−2 servant-client/src/Servant/Client/Internal/HttpClient.hs+1−1
doc/tutorial/Client.lhs+4−4
@@ -128,15 +128,15 @@ That's it. Let's now write some code that uses our client functions.
128128``` haskell
129129queries :: ClientM (Position, HelloMessage, Email)
130130queries = do
131− pos <- position 10 10
132− message <- hello (Just "servant")
131+ pos <- position 10 10
132+ message <- hello (Just "servant")
133133 em <- marketing (ClientInfo "Alp" "alp@foo.com" 26 ["haskell", "mathematics"])
134134 return (pos, message, em)
135135
136136run :: IO ()
137137run = do
138− manager <- newManager defaultManagerSettings
139− res <- runClientM queries (ClientEnv manager (BaseUrl Http "localhost" 8081 ""))
138+ manager' <- newManager defaultManagerSettings
139+ res <- runClientM queries (ClientEnv manager' (BaseUrl Http "localhost" 8081 ""))
140140 case res of
141141 Left err -> putStrLn $ "Error: " ++ show err
142142 Right (pos, message, em) -> do
servant-client-core/CHANGELOG.md+3−2
@@ -1,5 +1,6 @@
11# Revision history for servant-client-core
22
3−## 0.11 -- YYYY-mm-dd
3+## 0.12 -- YYYY-mm-dd
44
5−* First version. Released on an unsuspecting world.
5+* First version. Factored out of servant-client all the functionality that was
6+independent of the http-client backend.
servant-client-core/README.md+1−1
@@ -10,7 +10,7 @@ This library should mainly be of interest to backend- and combinator-writers.
1010
1111If you are creating a new backend, you'll need to:
1212
13−1. Define a `RunClient` instance for your datatype (call it 'MyMonad')
13+1. Define a `RunClient` instance for your datatype (call it `MyMonad`)
14142. Define a `ClientLike` instance. This will look like:
1515
1616``` haskell
servant-client-core/servant-client-core.cabal+7−6
@@ -51,14 +51,15 @@ library
5151 , text >= 1.2 && < 1.3
5252 hs-source-dirs: src
5353 default-language: Haskell2010
54− include-dirs: include
54+ ghc-options: -Wall
55+ include-dirs: include
5556
5657test-suite spec
57− type: exitcode-stdio-1.0
58− ghc-options: -Wall
59− default-language: Haskell2010
60− hs-source-dirs: test
61− main-is: Spec.hs
58+ type: exitcode-stdio-1.0
59+ ghc-options: -Wall
60+ default-language: Haskell2010
61+ hs-source-dirs: test
62+ main-is: Spec.hs
6263 build-depends:
6364 base
6465 , base-compat
servant-client/src/Servant/Client.hs+2−2
@@ -6,8 +6,8 @@ module Servant.Client
66 , ClientM
77 , runClientM
88 , ClientEnv(..)
9− , module X
9+ , module Servant.Client.Core.Reexport
1010 ) where
1111
1212import Servant.Client.Internal.HttpClient
13−import Servant.Client.Core.Reexport as X
13+import Servant.Client.Core.Reexport
servant-client/src/Servant/Client/Internal/HttpClient.hs+1−1
@@ -65,7 +65,7 @@ client :: HasClient ClientM api => Proxy api -> Client ClientM api
6565client api = api `clientIn` (Proxy :: Proxy ClientM)
6666
6767-- | @ClientM@ is the monad in which client functions run. Contains the
68−-- 'Manager' and 'BaseUrl' used for requests in the reader environment.
68+-- 'Client.Manager' and 'BaseUrl' used for requests in the reader environment.
6969newtype ClientM a = ClientM
7070 { runClientM' :: ReaderT ClientEnv (ExceptT ServantError IO) a }
7171 deriving ( Functor, Applicative, Monad, MonadIO, Generic