[Haskell-cafe] Template Haskell a Permanent solution?
Jonas Almström Duregård
jonas.duregard at chalmers.se
Mon Dec 27 12:02:20 CET 2010
> I also think that Template Haskell is used too much. Several
> things that are done in existing libraries could be done in plain
> Haskell in a better way.
Can you give any examples of this? I'm not saying it's not true, I'm just
curious as to why you would venture into the realm of TH without a reason.
On 27 December 2010 08:44, Henning Thielemann <lemming at henning-thielemann.de
> On Mon, 27 Dec 2010, Jonathan Geddes wrote:
> #1 Parse a string at compile-time so that a custom syntax for
>> representing data can be used. At the extreme, this "data" might even
>> be an EDSL.
> I think it would be enough, if the compiler could be told to unfold an
> expression like
> parse "text in a domain specific language"
> at compile time.
> #2 Provide instances automatically.
> I also think that Template Haskell is used too much. Several things that
> are done in existing libraries could be done in plain Haskell in a better
> way. For the cases where Template Haskell is really needed, I'd prefer a
> solution that allows to generate the code before compilation, such that
> packages with automatically generated code can be run also on compilers that
> do not support Template Haskell.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe