Simon Peyton-Jones wrote:
The reason I have not done anything about it is that there's very little traffic on the Template Haskell list (or any other, about TH), and that has de-motivated me so far as improving TH is concerned.
I WANT to use TH, but I don't. Here are several reasons: 1. The documentation is poor, and writing my own documentation to a changing API is frustrating. 2. Haskell is making very quick progress - many people have shown how GADTs and existential types overlap, and perhaps we could have hacked up some sort of GADTs in TH, but we didn't have to. Someone has hacked up TH versions of Generic Haskell and PolyP (or Starfunski), but those tools already exist in the wild. In addition, some analysis I might use TH for can be done in other ways, like the projects that end up parsing Haskell in Haskell, or Programmatica, or GHC as a package. 3. TH is ugly by comparison. Those splices break my concentration. When I write a utility or library, I want it to be transparent to the user: I want it to look built-in. SYB is a great example of a beautiful utility. 4. For the things that #2 doesn't take care of, I don't know if TH can do. Chameleon and System CT are quite interesting, but can TH simulate that kind of behavior? I want impredicativity NOW (especially for type classes), and SPJ is working on it already -- why should I hack it up in TH only to create some weak or ugly syntax months after GHC has boxy types built-in? I know that #3 is my own issue to get over - a decision was made that Haskell metaprogramming would be more explicit than regular Haskell, and if I want it to be different, I can use Lisp or roll my own. But I thought I would (a) Offer some praise - TH is unused partially because GHC is so great (b) Explain that part of the reason I don't use TH is that there is no good documentation, and that's only because more people don't use TH, which may be only because there is no good documentation . . . Jim