From 9cabc8d320c8c6b766cf78a9865e448ff7e7c0c2 Mon Sep 17 00:00:00 2001 From: mrkkrp Date: Thu, 7 Jul 2016 22:53:50 +0300 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98HasLink=E2=80=99=20instance=20fo?= =?UTF-8?q?r=20=E2=80=98BasicAuth=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #539. --- servant/src/Servant/Utils/Links.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servant/src/Servant/Utils/Links.hs b/servant/src/Servant/Utils/Links.hs index b2157c04..7c2929c9 100644 --- a/servant/src/Servant/Utils/Links.hs +++ b/servant/src/Servant/Utils/Links.hs @@ -106,6 +106,7 @@ import Prelude () import Prelude.Compat import Web.HttpApiData +import Servant.API.BasicAuth ( BasicAuth ) import Servant.API.Capture ( Capture ) import Servant.API.ReqBody ( ReqBody ) import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag ) @@ -291,6 +292,10 @@ instance HasLink sub => HasLink (RemoteHost :> sub) where type MkLink (RemoteHost :> sub) = MkLink sub toLink _ = toLink (Proxy :: Proxy sub) +instance HasLink sub => HasLink (BasicAuth realm a :> sub) where + type MkLink (BasicAuth realm a :> sub) = MkLink sub + toLink _ = toLink (Proxy :: Proxy sub) + -- Verb (terminal) instances instance HasLink (Verb m s ct a) where type MkLink (Verb m s ct a) = URI