[Haskell-cafe] Template Haskell: hiding declarations
Jonas Almström Duregård
jonas.duregard at chalmers.se
Mon Oct 4 02:46:42 EDT 2010
Hi Café,
I'm doing some code generation with Template Haskell that results in
few hundred top level declaration, of which only 10 or so should
actually be exposed to the user (the rest are only used by generated
code).
Since I cant splice stuff into the module header (i.e. into the export
list), I cant think of a good way to hide the internal declarations.
One way would be to put all the declarations into one or several
where-clauses, but this doesn't work very well when several functions
share the hidden declarations. Also I might want to hide a few data
types.
Does anyone have a clever solution? Has anyone had a similar problem
(maybe TH needs to be extended with support for hidden declarations)?
/J
More information about the Haskell-Cafe
mailing list