[GHC] #11078: Access to module renaming with reifyModule, in TemplateHaskell

GHC ghc-devs at haskell.org
Wed Nov 18 19:41:46 UTC 2015


#11078: Access to module renaming with reifyModule, in TemplateHaskell
-------------------------------------+-------------------------------------
        Reporter:  cipher1024        |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Template Haskell  |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by jstolarek):

 Replying to [comment:16 osa1]:
 > `LImportDecl` has this field: `iDeclHiding :: Maybe (Bool, LIE)`. As far
 > as I understand from the documentation if the `Bool` is `False` it's an
 > explicit import. Otherwise it's an explicit `hiding (...)`.
 Good point. So it looks like we have all the necessary information at
 hand. When `fst . ideclHiding` is `False` then the second component of the
 tuple stores the names of imported things. If `fst . ideclHiding` is
 `True`, then we must compute imported names based on `imv_all_exports`
 (all things provided by the module) and the second component of
 `ideclHiding` (hidden things, that need to be excluded from the list).
 Probably a bit tedious, but doable. We'd need to figure out how to
 sensibly extract names from `LIE name`.

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


More information about the ghc-tickets mailing list