No, such syntax does not exist.
You can just include it like any other tags. Don't put spaces before and after equals sign. <svg height="50" width="500">...
I wouldn't go this route, specifically because of the type inference issue you already discovered. Explicitly having to call toWidget occasionally is probably the best compromise here.
Hamlet is just providing an alternate syntax for normal Haskell code, so like normal Haskell, you have to keep your impure actions separate. In other words, you need to run the IO action outside of the template.
I got it. I was not clear of what "tableMform extra" has to return. I know that it has to return something of type [(FormResult a, xml)][1] . But then I was not sure what the type of "forM lis ((w,h) -> mopt intField (fromString w) (Just h) )" --...
haskell,yesod,template-haskell,hamlet
Import Yesod.Core and Yesod.Core.Widget, they will provide the appropriate functions. Also note that they have a online version of the book. And generally if you see import errors, do a search on Hoogle and in most of the cases you are likely to find a solution there....
It's been a while since I worked on the code, so don't take this as authoratative (like Daniel mentioned, -ddump-simpl is a good call here). But I don't believe we're using the blaze-html combinators, just the data type. Hamlet itself concatenates strings as much as possible at compile time to...