On a related note:

Is it even considered "good practice" to take a function which returns a
page, and attempt to modify it by (first "unrwapping" it and then)
appending another fragment of xml to it (and then "rewrapping" it into a
[transaction page] again)?

This is what I have been trying to do in Exercise 7.3 of Gian Perrone's
tutorial - append a logout link to all the pages on the website (when the
user is already authenticated).

Then I realized that my function [pageWithLogout()] might not work very
well. For example, given a page [pg], it tries to output another page made
up of: an empty <head/> tag, with the "unwrapped" [pg] appended to it.

What if [pg] itself had a head tag?

I remember some framework I was studying was "smart" enough, when joining
<xml> fragments, to "merge" all the the content of their <head> tags into a
*single* <head> tag - but I can't remember if that framework was UrWeb
(maybe it was Yesod? :-).
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to