[web-devel] Re: adding debug output to a response
matt at softmechanics.net
Mon Nov 29 18:24:26 CET 2010
Once in the GWidget monad, you can use "addHtml . string":
defaultLayout $ do
addHtml $ string "did stuff"
-- more stuff
Alternatively, you could use hamlet to put your messages into divs, so
trace :: String -> GWidget sub y ()
trace msg = addHamlet [$hamlet| %div!class=trace $msg$ |]
Does that help?
On Mon, Nov 29, 2010 at 7:56 AM, Simon Michael <simon at joyful.com> wrote:
> 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 at haskell.org
More information about the web-devel