git.iko.soy/typeable/servant
on master help sign in
support safeLink for RemoteHost
commit70d2ccaae361ffa8cb030f393626e79ea4f866ab authorChris Forno <jekor@jekor.com> dateWed 4 May 2016, 19:46 (10 years ago) parentfd26721
1 file changed+5
servant/src/Servant/Utils/Links.hs+5
servant/src/Servant/Utils/Links.hs+5
@@ -116,6 +116,7 @@ import Servant.API.Capture ( Capture )
116116import Servant.API.ReqBody ( ReqBody )
117117import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
118118import Servant.API.Header ( Header )
119+import Servant.API.RemoteHost ( RemoteHost )
119120import Servant.API.Verbs ( Verb )
120121import Servant.API.Sub ( type (:>) )
121122import Servant.API.Raw ( Raw )
@@ -292,6 +293,10 @@ instance HasLink sub => HasLink (Header sym a :> sub) where
292293 type MkLink (Header sym a :> sub) = MkLink sub
293294 toLink _ = toLink (Proxy :: Proxy sub)
294295
296+instance HasLink sub => HasLink (RemoteHost :> sub) where
297+ type MkLink (RemoteHost :> sub) = MkLink sub
298+ toLink _ = toLink (Proxy :: Proxy sub)
299+
295300-- Verb (terminal) instances
296301instance HasLink (Verb m s ct a) where
297302 type MkLink (Verb m s ct a) = URI