On Mon, 27 Dec 2010, Jonas Almström Duregård wrote:
Hi Henning,
> 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.
E.g. refer to the recent discussion of storable-endian.
http://www.haskell.org/pipermail/haskell-cafe/2010-December/087551.html
Or look into package 'encoding'. It uses TemplateHaskell in order to
convert Text descriptions of character sets into Haskell tables. I think
the character tables could be simply rewritten to Haskell syntax, or they
could be parsed by a function, where the parsed content is unfolded at
compile time. It could even be computed at runtime, since it is only
computed once because of laziness.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe