From 011f094c4a2b4fdee15b3a78beec53a8a16e927d Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Thu, 1 Oct 2015 15:58:39 +0200 Subject: [PATCH] Solve extra merge conflicts --- servant-client/src/Servant/Client.hs | 3 ++- servant-client/test/Servant/ClientSpec.hs | 3 +-- servant-docs/example/greet.hs | 12 ++++++------ servant-docs/src/Servant/Docs.hs | 3 +-- servant-docs/src/Servant/Docs/Internal.hs | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/servant-client/src/Servant/Client.hs b/servant-client/src/Servant/Client.hs index d88905d5..4f18be0d 100644 --- a/servant-client/src/Servant/Client.hs +++ b/servant-client/src/Servant/Client.hs @@ -125,10 +125,11 @@ instance (KnownSymbol capture, ToText a, HasClient sublayout) instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout - clientWithRoute Proxy req baseurl val = + clientWithRoute Proxy req baseurl manager val = clientWithRoute (Proxy :: Proxy sublayout) (authReq val req) baseurl + manager -- | If you have a 'Delete' endpoint in your API, the client -- side querying function that is created when calling 'client' diff --git a/servant-client/test/Servant/ClientSpec.hs b/servant-client/test/Servant/ClientSpec.hs index 50387e43..54aaefaf 100644 --- a/servant-client/test/Servant/ClientSpec.hs +++ b/servant-client/test/Servant/ClientSpec.hs @@ -161,7 +161,6 @@ withFailServer action = withWaiDaemon (return failServer) action spec :: IO () spec = withServer $ \ baseUrl -> do -<<<<<<< HEAD manager <- C.newManager C.defaultManagerSettings let getGet :: ExceptT ServantError IO Person getDeleteEmpty :: ExceptT ServantError IO () @@ -269,7 +268,7 @@ spec = withServer $ \ baseUrl -> do Right val -> getHeaders val `shouldBe` [("X-Example1", "1729"), ("X-Example2", "eg2")] it "Handles Authentication appropriatley" $ withServer $ \ _ -> do - (Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice + (Control.Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice it "returns 401 when not properly authenticated" $ do Left res <- runExceptT (getPrivatePerson (BasicAuth "xxx" "yyy")) diff --git a/servant-docs/example/greet.hs b/servant-docs/example/greet.hs index 064b14fa..10ab827f 100644 --- a/servant-docs/example/greet.hs +++ b/servant-docs/example/greet.hs @@ -73,14 +73,14 @@ instance ToSample Greet where instance ToSample Int where toSamples _ = singleSample 1729 -instance ToSample User User where - toSample _ = Just (User "I'm a user!") +instance ToSample User where + toSamples _ = singleSample (User "I'm a user!") -instance ToSample Cookie Cookie where - toSample _ = Just (Cookie "cookie") +instance ToSample Cookie where + toSamples _ = singleSample (Cookie "cookie") -instance ToSample SecretData SecretData where - toSample _ = Just (SecretData "shhhhh!") +instance ToSample SecretData where + toSamples _ = singleSample (SecretData "shhhhh!") instance ToAuthInfo (AuthProtect Cookie User policy) where toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works." diff --git a/servant-docs/src/Servant/Docs.hs b/servant-docs/src/Servant/Docs.hs index 2564bf28..c37b97de 100644 --- a/servant-docs/src/Servant/Docs.hs +++ b/servant-docs/src/Servant/Docs.hs @@ -149,13 +149,12 @@ module Servant.Docs , DocOptions(..) , defaultDocOptions, maxSamples , -- * Classes you need to implement for your types -<<<<<<< HEAD ToSample(..) , toSample , noSamples , singleSample , samples - ToAuthInfo(..) + , ToAuthInfo(..) , sampleByteString , sampleByteStrings , ToParam(..) diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index 444ace50..9bee3072 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -754,8 +754,8 @@ instance {-# OVERLAPPABLE #-} #endif ( HasDocs sublayout - , ToSample auth auth - , ToSample usr usr + , ToSample auth + , ToSample usr , ToAuthInfo (AuthProtect auth usr policy) ) => HasDocs (AuthProtect auth usr policy :> sublayout) where