git.iko.soy/typeable/servant
on master help sign in
Add ‘HasLink’ instance for ‘BasicAuth’

Close #539.

commit9cabc8d320c8c6b766cf78a9865e448ff7e7c0c2 authormrkkrp <markkarpov@opmbx.org> dateThu 7 Jul 2016, 22:53 (10 years ago) parentf0d14a7
1 file changed+5
servant/src/Servant/Utils/Links.hs+5
servant/src/Servant/Utils/Links.hs+5
@@ -106,6 +106,7 @@ import Prelude ()
106106import Prelude.Compat
107107
108108import Web.HttpApiData
109+import Servant.API.BasicAuth ( BasicAuth )
109110import Servant.API.Capture ( Capture )
110111import Servant.API.ReqBody ( ReqBody )
111112import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
@@ -291,6 +292,10 @@ instance HasLink sub => HasLink (RemoteHost :> sub) where
291292 type MkLink (RemoteHost :> sub) = MkLink sub
292293 toLink _ = toLink (Proxy :: Proxy sub)
293294
295+instance HasLink sub => HasLink (BasicAuth realm a :> sub) where
296+ type MkLink (BasicAuth realm a :> sub) = MkLink sub
297+ toLink _ = toLink (Proxy :: Proxy sub)
298+
294299-- Verb (terminal) instances
295300instance HasLink (Verb m s ct a) where
296301 type MkLink (Verb m s ct a) = URI