In Hamlet, how does one uses the result of an IO operation inside #{...} ?
#{...}
For instance :
someIO :: IO String ----------------- $with s
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.