add code for dhamlet quasi-quoter

Hamlet can be used to create a template haskell quasiquoter that uses the hamlet markup and can support the interpolation features.

The process for creating a inline string parser is composed of:

The default hamlet rules:

Once I understood this I picked an appropriate url_rep type and render_function implementation to get started. I did eventually customize the result type to introduce a newtype:

dhamlet :: QuasiQuoter
dhamlet = hamletWithSettings dhamletRules defaultHamletSettings

dhamletRules :: Q HamletRules
dhamletRules = do
    repConstructor <- [|id|]
    let resultConstructor f = do
            renderVar <- newName "_render"
            let env = Env
                    { urlRender = Just ($ (VarE renderVar))
                    , msgRender = Nothing
            resultExp <- f env
            hamletRep <- [|HamletRep|]
            return $ hamletRep `AppE` (LamE [VarP renderVar] resultExp)
    return $ HamletRules repConstructor resultConstructor embedRenderType
        embedRenderType (Env (Just urender) Nothing) e = do
            asHtmlUrl' <- [|asHtmlUrl|]
            urender $ \ur' -> return ((asHtmlUrl' `AppE` e) `AppE` ur')
        embedRenderType _ _ = error "Env mismatch"

The url_rep was additionally constrained by the syntax requirement of this being a "printf-like" function on a lens. EG:

@{http_href wiki_node "home" "box" "game"}

There was also an oddity in the hamlet splices that constrain the render function: The URL render is expanded into: \u -> render u query_string_params then applied to the expression in the @ escape brackets. Which is then provided to toMarkup. This requires the render function to always provide a ToMarkup class value and not, say, an action in the representation type that produces a ToMarkup class value.

Curiously, using -ddump-splices option displays the generated code incorrectly.