[GHC] #10279: panic on haskell-src-exts

GHC ghc-devs at haskell.org
Fri Apr 24 19:53:31 UTC 2015


#10279: panic on haskell-src-exts
-------------------------------------+-------------------------------------
        Reporter:  throwaway123      |                   Owner:  ezyang
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Yes, we could certainly provide a way to get the current package.  I don't
 know if that would serve this current use-case, but it's a good idea
 anyway.

 The best way to do that would be to elaborate `qReifyModule`, which
 currently returns a `ModuleInfo`.  The latter is just
 {{{
 data ModuleInfo =
   -- | Contains the import list of the module.
   ModuleInfo [Module]
 }}}
 but it should really contain the current `Module` to:
 {{{
 data ModuleInfo =
   -- | Contains the import list of the module.
   ModuleInfo { mi_this_mod :: Module
              , mi_imports  :: [Module] }}}
 }}}
 Remember that `Module` is
 {{{
 data Module = Module PkgName ModName
 }}}
 so you can get the current `PkgKey` from the `Module`.

 Someone just needs to work carefully through the new API.

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


More information about the ghc-tickets mailing list