[Template-haskell] Couple of Template Haskell Questions

Adrian Hey ahey at iee.org
Sat Jun 2 10:19:50 EDT 2007


Hello,

I've been considering using this and have read the 2 papers papers about
the basic design, but these don't seem to cover a couple of issues that
I anticipate as possible "show stoppers" for me.

The first is, how to add generated top level declarations to the export
list (and how to augment the import list too possibly). Paragraph 7 of
the second paper seems to acknowledge the problem and suggests a
solution, but also says it's not implemented (as of Nov. 2003).
Has this been implemented?

The second is, how to get Haddock to properly document the resulting
module?

I gather it is possible to get TH to emit another module (as source
text), so that may be 1 possible solution to both these problems.
I'm not sure how this will interact with --make option and Cabal
though.

Also, the old TH web page says something about not being able
to splice types. Does that mean no type sigs for generated top
level declarations?

Thanks
--
Adrian Hey



More information about the template-haskell mailing list