Once in the GWidget monad, you can use "addHtml . string":
defaultLayout $ do
-- stuff
addHtml $ string "did stuff"
-- more stuff
Alternatively, you could use hamlet to put your messages into divs, so
you show/hide all messages with javascript or firebug:
trace :: String -> GWidget sub y ()
trace msg = addHamlet [$hamlet| %div!class=trace $msg$ |]
Does that help?
-matt
On Mon, Nov 29, 2010 at 7:56 AM, Simon Michael
Thanks, I did not know about onRequest.
I want to send debug output immediately to the response, so that it appears on the rendered web page intermixed with the regular content. Ie I'm wondering is if there's an equivalent of trace for the web output.
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel