module Web.Spock.Lucid
(
lucid,
lucidIO,
lucidT,
)
where
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Web.Spock
import Lucid.Base
lucid :: MonadIO m => Html a -> ActionCtxT cxt m b
lucid x = do
setHeader "Content-Type" "text/html; charset=utf-8"
lazyBytes (renderBS x)
lucidIO :: MonadIO m => HtmlT IO a -> ActionCtxT cxt m b
lucidIO x = do
setHeader "Content-Type" "text/html; charset=utf-8"
lazyBytes =<< liftIO (renderBST x)
lucidT :: MonadIO m => HtmlT m a -> ActionCtxT cxt m b
lucidT x = do
setHeader "Content-Type" "text/html; charset=utf-8"
lazyBytes =<< lift (renderBST x)