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

GHC ghc-devs at haskell.org
Tue Nov 5 11:33:12 UTC 2013


#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
        Reporter:  igloo    |            Owner:
            Type:  feature  |           Status:  closed
  request                   |        Milestone:  7.8.1
        Priority:  highest  |          Version:  7.7
       Component:           |         Keywords:
  Template Haskell          |     Architecture:  Unknown/Multiple
      Resolution:  fixed    |       Difficulty:  Moderate (less than a day)
Operating System:           |       Blocked By:
  Unknown/Multiple          |  Related Tickets:
 Type of failure:           |
  None/Unknown              |
       Test Case:           |
        Blocking:  8398     |
----------------------------+----------------------------------------------

Comment (by simonpj):

 Gergely wants to be able walk the entire module-import tree, including
 deep into packages.  (Correct?)

 So given a module M (presumably including the current one) he'd like to
 produce a list of all modules that M directly imported.  We can get from M
 to M's `ModIface`, but then we need to find its direct imports. But if M
 uses a module X, but X is from a package, we can't tell if X is directly
 imported by M or not.

 I can see two approaches:

  * It would be easy enough to record a boolean flag in
 `UsagePackageModule` for this purpose.

  * Alternatively, but less satisfactorily, we could say that `reifyModule`
 returns a superset of the direct imports.  That's what happens now I
 think. But that seems yukky.

 I prefer the first.

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list