haskell - How do I get a Html from a WidgetT site m ()? -


i'm building mail import network.mail.mime.ses, , html part of email needs html value.

i can html this:

import text.blaze.html.renderer.utf8 (renderhtml)  emailhtml :: html emailhtml = renderhtml $(shamletfile "templates/email.hamlet") 

however, template i'm using should have reference static file. want reference @{staticr img_myimage_jpg}, using urls not work shamlet. instead, think need use whamlet, if use whamletfile renderhtml, compiler error.

using whamletfile produces compiler error:

handler/proxy.hs:71:55:     couldn't match expected type `blaze-markup-0.7.1.0:text.blaze.internal.markupm                                     ()'                 actual type `widgett site12 m12 ()'     in stmt of 'do' block:       (aswidgett ghc.base.. towidget)         ((blaze-markup-0.7.1.0:text.blaze.internal.preescapedtext           ghc.base.. data.text.pack)            "</pre>\n\            \</td>\n\            \</tr>\n\            \</table>\n\            \</td>\n\            \</tr>\n\            ... (many more lines) 

using hamletfile produces compiler error:

handler/proxy.hs:71:53:     couldn't match expected type `t0                                   -> blaze-markup-0.7.1.0:text.blaze.internal.markupm ()'                 actual type `blaze-markup-0.7.1.0:text.blaze.internal.markupm                                     ()'     lambda expression `\ _render_aoyp -> ...' has 1 argument,     type `html' has none     in first argument of `renderhtml', namely       `\ _render_aoyp          -> { ghc.base.id                    ((blaze-markup-0.7.1.0:text.blaze.internal.preescapedtext                      ghc.base.. data.text.pack)                       "<!doctype html public \"-//w3c//dtd xhtml 1.0 transitional//en\" \"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd\">\n\ 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -