| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Lucid.Servant
- safeHref_ :: (IsElem endpoint api, HasLink endpoint) => Text -> Proxy api -> Proxy endpoint -> MkLink endpoint Attribute
 - safeAbsHref_ :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Attribute
 - safeRelHref_ :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Attribute
 - linkHref_ :: Text -> Link -> Attribute
 - linkAbsHref_ :: Link -> Attribute
 - linkRelHref_ :: Link -> Attribute
 
Documentation
safeHref_ :: (IsElem endpoint api, HasLink endpoint) => Text -> Proxy api -> Proxy endpoint -> MkLink endpoint Attribute Source #
safeLink variant which creates lucid's Attribute given base url.
>>>type API = "path" :> Get '[JSON] Int>>>let api = Proxy :: Proxy API
>>>safeHref_ "" api apiAttribute "href" "path"
>>>safeHref_ "/" api apiAttribute "href" "/path"
>>>safeHref_ "http://example.com" api apiAttribute "href" "http://example.com/path"
>>>safeHref_ "http://example.com/" api apiAttribute "href" "http://example.com/path"
safeAbsHref_ :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Attribute Source #
safeLink "/"safeRelHref_ :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Attribute Source #
safeLink ""linkAbsHref_ :: Link -> Attribute Source #