[GHC] #11078: Access to module renaming with reifyModule, in TemplateHaskell
GHC
ghc-devs at haskell.org
Wed Nov 18 16:02:23 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 osa1):
> Which field of these data types stores the list of *imported* functions?
I don't think there's a way to get all the imported functions from those
types. But we can learn
qualified imports by looking at `HsModule`s `hsmodImports ::
[LImportDecl]`
field. `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 (...)`.
> How can we pass data from these to the type checker? Won't this be a
gross
> hack?
We should decide how to update the state type in type checker to pass this
information. I wouldn't call this a hack, if we want this functionality we
need
to somehow pass this information. Or we can create some new types instead
of just
passing `HsModule`.
I'm busy until next week and I can try some alternative designs next week,
unless someone solves this in the meantime.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11078#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list