
#10391: Ability to get export list of TH reified module -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Template Haskell | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Yes -- I see better how these are decoupled. (I hadn't looked at the API before responding.) Yes, it's reasonable to tackle this separately from #1475. I also didn't realize that you're hooking into existing functions. (I was unaware you could get imports via TH.) It might be worth squawking on ghc- devs (or perhaps libraries@haskell.org) to see if anyone has strong feelings about the API choice. Maybe it's better to deliver imports and exports separately? Maybe have a `Maybe [Name]` for the exports to account for the `thisModule` case? For some reason, I'm OK with a call to a function `reifyThisModule'sExports` to throw an error, but I dislike embedding a call to `error` in an otherwise-proper data structure. Sorry for totally changing my mind on all of these issues, but that's what happens sometimes. :) The implementation plan, from a 30,000 ft view, looks about right. I think `reifyName` is the name conversion function you want. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10391#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler