Merge pull request #497 from jekor/master
support safeLink for RemoteHost
This commit is contained in:
commit
6702d7ed6d
1 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,7 @@ import Servant.API.Capture ( Capture )
|
||||||
import Servant.API.ReqBody ( ReqBody )
|
import Servant.API.ReqBody ( ReqBody )
|
||||||
import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
|
import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
|
||||||
import Servant.API.Header ( Header )
|
import Servant.API.Header ( Header )
|
||||||
|
import Servant.API.RemoteHost ( RemoteHost )
|
||||||
import Servant.API.Verbs ( Verb )
|
import Servant.API.Verbs ( Verb )
|
||||||
import Servant.API.Sub ( type (:>) )
|
import Servant.API.Sub ( type (:>) )
|
||||||
import Servant.API.Raw ( Raw )
|
import Servant.API.Raw ( Raw )
|
||||||
|
@ -292,6 +293,10 @@ instance HasLink sub => HasLink (Header sym a :> sub) where
|
||||||
type MkLink (Header sym a :> sub) = MkLink sub
|
type MkLink (Header sym a :> sub) = MkLink sub
|
||||||
toLink _ = toLink (Proxy :: Proxy sub)
|
toLink _ = toLink (Proxy :: Proxy sub)
|
||||||
|
|
||||||
|
instance HasLink sub => HasLink (RemoteHost :> sub) where
|
||||||
|
type MkLink (RemoteHost :> sub) = MkLink sub
|
||||||
|
toLink _ = toLink (Proxy :: Proxy sub)
|
||||||
|
|
||||||
-- Verb (terminal) instances
|
-- Verb (terminal) instances
|
||||||
instance HasLink (Verb m s ct a) where
|
instance HasLink (Verb m s ct a) where
|
||||||
type MkLink (Verb m s ct a) = URI
|
type MkLink (Verb m s ct a) = URI
|
||||||
|
|
Loading…
Reference in a new issue