Skip to content

Instantly share code, notes, and snippets.

@ncaq
Created May 8, 2018 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncaq/f8133e14fe64f68f99738c1cd647d0c5 to your computer and use it in GitHub Desktop.
Save ncaq/f8133e14fe64f68f99738c1cd647d0c5 to your computer and use it in GitHub Desktop.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
import Text.Blaze.Html.Renderer.Pretty (renderHtml)
import Text.Hamlet
data MyRoute = Home
render :: Render MyRoute
render Home _ = "/home"
main :: IO ()
main = print $ renderHtml $ (\url -> [hamlet|foo @{url}|]) Home render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment