[Haskell-cafe] ANNOUNCE: Bravo-0.1.0

Michael Snoyman michael at snoyman.com
Thu Mar 11 19:33:05 EST 2010


Thank you for releasing this library, it looks very intriguing. I've been
building web apps using HStringTemplate up until now, and one thing that
always irks me is that- while the rest of my program is checked at
compile-time- my template results need to be checked manually at runtime.
One of my todo-list items was to write a library that fixed this: it looks
like yours does just that.

I'll need to look into the library a bit more to get a better idea, but it
seems like Bravo could work for my needs. One thing that concerns me is your
comment that it allows embedding of Haskell expressions. In general, I try
to keep a strict separation between login and presentation: can you explain
exactly what type of expressions can be embedded?

Also, while looking through the example, it looks like the library is making
some automatic translations, like firstName -> userFirstName and user ->
users. I've found these kinds of mappings to be brittle in the past; can you
explain how this is done (or if I'm simply missing something obvious)?

Finally, I can't seem to get it to compile on 6.12. Any chance of getting a
version out that supports it?


On Wed, Mar 10, 2010 at 8:46 PM, Matthias Reisner <
matthias.reisner at googlemail.com> wrote:

> Hello,
> I'm pleased to announce the first release of Bravo, a static text template
> generation library, on Hackage: http://hackage.haskell.org/package/Bravo.
> Bravo is a text template library that provides parsing and generation of
> templates at compile time. Templates can be read from strings or files and
> for each a new record data type is created, allowing convenient access to
> all template variables in a type-safe manner. Since all templates are
> processed at compile time, no extra file access or error handling at runtime
> is necessary.
> Bravo is inspired by the PHP template engine Smarty and the Haskell
> template library chunks. Compared to chunks, Bravo provides additional
> features like conditional template evaluation, embedding of Haskell
> expressions and customized data type generation. I'm going to add further
> information to the HaskellWiki page (
> http://www.haskell.org/haskellwiki/Bravo) later.
> Bravo is still highly experimental and not well-tested, so bug reports and
> additional feedback are very welcome. I'd also like to hear if you feel the
> package dependencies are to restrictive.
> Regards,
> Matthias Reisner
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100311/cce941ab/attachment.html

More information about the Haskell-Cafe mailing list