
On Mon, Jun 6, 2011 at 14:42, Michael Snoyman
On Mon, Jun 6, 2011 at 8:59 PM, Aren Olson
wrote: On Mon, Jun 6, 2011 at 12:37, Michael Snoyman
wrote: Sorry for a terse reply, but the trick is to replace addHamlet with addWidget, and the original code should work. Let me know if you're still having trouble, I should have more time to respond next week.
I'm not sure how addWidget helps with nesting, as it's just 'id' internally, right? So what I'd get out of it is still the same Widget type as what addHamlet was giving, which doesn't interpolate via ^{} as can be demonstrated with this example:
blockW :: Widget () -> Widget () blockW contents = do addHamlet [hamlet|
Try replacing addHamlet here with addWidget. This has to do with how polymorphic Hamlet is implemented (again, sorry for the terseness).
Ahah, I follow you now, and yes that does work. Thanks!