18 Nov
2015
18 Nov
'15
3:23 a.m.
#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:
GHC
The Glasgow Haskell Compiler