saferoute-0.1.1.0: src/Web/Saferoute/Blaze.hs
-- |
-- Module : Web.Saferoute.Blaze
-- Description : Support for blaze-html
-- Copyright : 2014, Peter Harpending.
-- License : BSD3
-- Maintainer : Peter Harpending <pharpend2@gmail.com>
-- Stability : experimental
-- Portability : archlinux
--
module Web.Saferoute.Blaze where
import qualified Text.Blaze.Html5 as H
import Web.Saferoute
-- |Foreign resources need only to have a URL, which needs to be an
-- embeddable attribute.
type ForeignResource = H.AttributeValue
-- |Given a 'Resource', get the URL for it.
getUrl :: Resource r => r -> H.AttributeValue
getUrl = H.toValue . getRoute