[web-devel] Re: Runtime Hamlet template parsing/rendering

Michael Snoyman michael at snoyman.com
Fri Aug 6 07:06:45 EDT 2010

On Fri, Aug 6, 2010 at 3:13 AM, Simon Michael <simon at joyful.com> wrote:

> On 8/5/10 12:57 AM, Michael Snoyman wrote:
> > Thanks for the input everyone. I've just pushed the new Hamlet runtime
> code to github[1]. Instead of using data-object,
> > I've created a new datatype: HamletData[2]. Runtime templates support
> *almost* the entirety of valid Hamlet documents;
> Excellent! With the following kludgery I was able to change hamlet files
> and see the effect immediately. A boon for development. Useful parse errors
> in the browser too. It's not all smooth of course. Including other hamlets
> and integrating RT and non-RT hamlets seems a lot of work.
> It's true that none of this interoperation will be automatic, but it's
possible. Regarding: including other hamlets, you just need to parse them
first and then include them in your HamletData. Regarding integrating RT and
non-RT: I would say your best bet it to do that via Html (). In other words,
apply the template to the URL rendering function, resulting in a Html ()
value, and then embed that in the template you desire.

For the moment, RT templates are definitely second-class citizens, but if
people have ideas of how to improve them, I'd be happy to hear it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100806/3a451c03/attachment.html

More information about the web-devel mailing list