Re: [GHC] #1480: Template Haskell should allow reification of modules

#1480: Template Haskell should allow reification of modules ----------------------------+---------------------------------------------- Reporter: igloo | Owner: Type: feature | Status: patch request | Milestone: 7.8.1 Priority: high | Version: 7.7 Component: | Keywords: Template Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Moderate (less than a day) Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: 8398 | ----------------------------+---------------------------------------------- Changes (by errge): * blocking: 8398, 8489 => 8398 Comment: Thanks for the review, I'll look into how current usages is handled and what is the best way to fix these issues. I've created another ticket for this: #8489 and assigned it to myself. In the meantime, by slightly modifying your example, I've confirmed that usages always contains the imports, even if they're not used. So I never get less than what I want. I confirmed this behavior also through the source code via this backtrace: - [[GhcFile(compiler/deSugar/Desugar.lhs#L167)]] - [[GhcFile(compiler/iface/MkIface.lhs#L147)]] - [[GhcFile(compiler/iface/MkIface.lhs#L256)]] - [[GhcFile(compiler/iface/MkIface.lhs#L921)]] - [[GhcFile(compiler/iface/MkIface.lhs#L944)]] So for me this patch would already be very useful in 7.8.1, and yes, I'll work on fixing the remaining edge case that you've just showed. If everyone agrees, please apply this as-is. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1480#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC