Export template haskell generated definitions
问题 My module contains definitions, part of which are exported (in module clause). I want to export Template Haskell-generated declarations too. But since there is seemingly no way to modify module clause with TH, I cannot do this. Is it possible to specify that TH-generated declarations should be exported at all? Or maybe there are other ways to do this? 回答1: You need to export the names of the generated TH declarations. For example, if you have a TH function that generates a data B = C | D