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

GHC ghc-devs at haskell.org
Tue Nov 17 19:23:21 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:13 goldfire]:
 > I'm concerned about `all the things the module could provide`. That
 sounds like it contains all the exports of the module in question.
 Yes, that is exactly the case.

 After some more hacking I believe that `Maybe String` for representing a
 synonym is not a good idea.  We should have a `[String]` instead to store
 all names used to import a module. For example, if I say:

 {{{
 import Foo
 import Foo as Bar
 }}}
 then the list would contain `[Foo, Bar]`.

 Replying to [comment:14 osa1]:
 > You may want to have a look at `HsModule` and `HsParsedModule` types. We
 can easily pass them(or some information taken from them) to the type
 checker and they have everything we need.
 Two questions:
 1. Which field of these data types stores the list of *imported*
 functions?
 2. How can we pass data from these to the type checker? Won't this be a
 gross hack?

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


More information about the ghc-tickets mailing list