[web-devel] Re: Hamlet & Haml
Gour
gour at gour-nitai.com
Mon Apr 12 06:16:19 EDT 2010
On Sun, 11 Apr 2010 23:14:15 -0700
>>>>>> "Michael" == Michael Snoyman wrote:
Michael> Funny to see this mentioned right now; I'm in the middle of
Michael> incorporating it into Yesod. It's most definitely haml-like:
Heh...somehow I've stumbled upon Haml/Sass after researching about
static-site generators (StaticMatic supports Haml) and then thought
about Haskell...which has brought me to Hamlet. :-)
The wikipedia page (http://en.wikipedia.org/wiki/Haml#Implementations)
lists severeal implementations, that's why I've asked if Hamlet could
be counted as one?
Michael> haml itself allows embedding of arbitrary Ruby code, so that's
Michael> not really something I'm interested in here.
Same here. No interest in Ruby.
Michael> I'll put up a mini tutorial on it when it's polished, but
Michael> there's really not much to the syntax. Just to give an idea of
Michael> the niche it's trying to fill:
Michael>
Michael> * Quasi-quoted templates are embeddable directly in your
Michael> Haskell files and included in the binary.
Michael> * All variables are compile-time checked.
Michael> * Allows for on-demand loading of IO values, eg you can have
Michael> conditionals in the template and only load data from a
Michael> database if needed.
Michael> * It uses enumerators for looping, so it should fit nicely in
Michael> memory.
Michael> * Deals with the string problem by having a very simple
Michael> datatype: data Html = Encoded Text | Unencoded Text (Html will
Michael> probably be renamed to something else).
Michael> * Has a monadic interface so you can use the nice features of
Michael> the Hamlet monad without using the Hamlet syntax and
Michael> quasi-quoter.
Michael> * Allows embedding of other templates.
It looks very good. *thumb up*
Michael> The code for integration into Yesod is literally being written
Michael> right now (just took a break to check my e-mail), so I should
Michael> have more to say soon. If anyone's dying to know the details,
Michael> send me an e-mail and I'll try to put together a blog post.
No rush here. ;) (We'll use Hakyll for now.)
Sincerely,
Gour
--
Gour | Hlapicina, Croatia | GPG key: F96FF5F6
----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/web-devel/attachments/20100412/0f1b4088/signature.bin
More information about the web-devel
mailing list