
21 Jun
2007
21 Jun
'07
10:14 a.m.
However, after reading all about TH it doesn't seem like there's a way to do this (reflecting on the current module to pull out the names of certain top-level declarations).
I don't know template haskell very well yet. To do introspection there is the function reify which returns the type info of a given name. But as far as I've seen it doesn't support whole modules. (Have a look at Haskell.TH.Syntax (type Info) So perhaps you would have to extend ghc th functionality. Marc Weber