<br><br><div class="gmail_quote">On Sun, Apr 11, 2010 at 10:53 PM, Gour <span dir="ltr">&lt;<a href="mailto:gour@gour-nitai.com">gour@gour-nitai.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<br>
Many/Some RoR folks swear at Haml/Sass (<a href="http://haml-lang.com/" target="_blank">http://haml-lang.com/</a>) and I<br>
see there is Hamlet project at Github<br>
(<a href="http://github.com/snoyberg/hamlet" target="_blank">http://github.com/snoyberg/hamlet</a>)<br>
<br>
saying &quot;Haml-like template files that are compile-time checked&quot;, so<br>
I&#39;m curious if it targets to be Haml-compatible or just &quot;haml-like&quot; ?<br>
<br>
<br>
Sincerely,<br>
Gour</blockquote><div><br></div><div>Funny to see this mentioned right now; I&#39;m in the middle of incorporating it into Yesod. It&#39;s most definitely haml-like: haml itself allows embedding of arbitrary Ruby code, so that&#39;s not really something I&#39;m interested in here.</div>
<div><br></div><div>I&#39;ll put up a mini tutorial on it when it&#39;s polished, but there&#39;s really not much to the syntax. Just to give an idea of the niche it&#39;s trying to fill:</div><div><br></div><div>* Quasi-quoted templates are embeddable directly in your Haskell files and included in the binary.</div>
<div>* All variables are compile-time checked.</div><div>* Allows for on-demand loading of IO values, eg you can have conditionals in the template and only load data from a database if needed.</div><div>* It uses enumerators for looping, so it should fit nicely in memory.</div>
<div>* Deals with the string problem by having a very simple datatype: data Html = Encoded Text | Unencoded Text (Html will probably be renamed to something else).</div><div>* Has a monadic interface so you can use the nice features of the Hamlet monad without using the Hamlet syntax and quasi-quoter.</div>
<div>* Allows embedding of other templates.</div><div><br></div><div>The code for integration into Yesod is literally being written right now (just took a break to check my e-mail), so I should have more to say soon. If anyone&#39;s dying to know the details, send me an e-mail and I&#39;ll try to put together a blog post.</div>
<div><br></div><div>MichaelĀ </div></div>