
I don't see it. Hamlet et al are similar to other Haskell web template system, which means similar to most other web template systems, except with better typing. The result of compiling a template isn't a type, nor is it a function of any kind - it's just data. The type of that data varies a little depending on the content, but can be identical for different templates, so there's no unique type for a template as there is with Cheetah. While the static typing one finds in haskell web template systems is better than the dynamic typing in Cheetah and other templates based on dynamically typed languages, that's inside the templates. The objects generated by the templates don't do much of anything to let the application author leverage the type system, which is what makes Cheetah stand out from other web template systems. On Thu, May 8, 2014 at 6:44 PM, Kyle Marek-Spartz < kyle.marek.spartz@gmail.com> wrote:
You may be interested in http://hackage.haskell.org/package/shakespeare
– Kyle Marek-Spartz
On May 8, 2014, 6:18:02 PM, Mike Meyer
wrote: ------------------------------ In going over yet again the many failings of template frameworks for building web apps, I recalled some of the features of the best of the lot, and wondered if those features might be useful in a Haskell template framework. Python's Cheetah tool makes templates almost fully functional members of Python's OO system. A template can inherit from a Python class or another template, and a Python class can inherit from a template.
Which makes me wonder if something similar might not be useful in a Haskell template framework. Possibly have each template create an appropriate datatype and make it as an instance of the Template typeclass (and possibly others).
Is there already a Haskell web framework that does something like this? Would it actually add value to a framework?
Thanks, Mike
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe