[web-devel] Hamlet variables: (foo bar) baz or foo (bar baz)

Michael Snoyman michael at snoyman.com
Sat Jan 1 21:55:13 CET 2011

On Fri, Dec 31, 2010 at 5:08 PM, Felipe Almeida Lessa
<felipe.lessa at gmail.com> wrote:
> On Fri, Dec 31, 2010 at 6:51 AM, Matt Brown <matt at softmechanics.net> wrote:
>> I wonder if hamlet could leverage haskell-src-exts-qq, which defines
>> quasiquoters for haskell code.  I've used it myself, and although it's
>> been a while and I'm a bit hazy on the details, I remember that it
>> worked rather well.  One gotcha I remember is that it didn't usually
>> know correct fixities for operators etc, which could lead to quite
>> confusing errors.  This may have improved since I last looked at it,
>> though.
> Of course he was aware, someone wrote a message six hours ago =).  I
> think it's doable, Matt.
> Cheers,
> --
> Felipe.
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

Contrary to popular belief, I don't read my email at every hour of the
day ;). In fact, I can guarantee you that I won't see any email from
sundown on Friday till sundown on Saturday[1]. Anyway, I have a few
concerns regarding haskell-src-exts-qq:

1) It's a heavyweight dependency.
2) I assume the parsing time of this will be significantly larger than
the current parse code. (This is the most minor of my issues.)
3) I don't know how well it will interact with the debug version of
the templates.
4) It's not necessarily desirable to make the interpolation so
complex. Compare for instance Haml versus Django templates: the latter
purposely allows only a limited form of interpolation to keep
templates simple.

I'm not vetoing this, not by a long shot. I'm merely bringing up the
issues I've been thinking about for the past 30 hours ;).


[1] http://en.wikipedia.org/wiki/Shabbat#Prohibited_activities

PS: I'm on a quasi-vacation for the next week, so I don't know how
regular my emailing will be.

More information about the web-devel mailing list