[GHC] #9751: add runMeta Hook or TcM variant of hscCompileCoreExprHook

GHC ghc-devs at haskell.org
Fri Oct 31 18:12:51 UTC 2014


#9751: add runMeta Hook or TcM variant of hscCompileCoreExprHook
-------------------------------------+-------------------------------------
       Reporter:  luite              |                   Owner:  luite
           Type:  task               |                  Status:  new
       Priority:  normal             |               Milestone:  7.10.1
      Component:  GHC API            |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 GHCJS has to jump through hoops to make annotations work and to get the
 necessary information for linking a TH splice. The main reason is that
 `hscCompileCoreExprHook` does not expose the `TcM` environment.

 Easiest fix would be to add

 {{{#!hs
 hscCompileCoreExprTcMHook :: HscEnv -> SrcSpan -> CoreExpr -> TcM HValue
 }}}

 to `Hooks`, but it'd be better to hook `runMeta` instead. Unfortunately
 `runMeta` is polymorphic, so it could be more tricky. I'm going to see if
 I can hook `runMeta` in a reasonable way, and if I run out of time for
 7.10.1, send a patch with `hscCompileCoreExprTcMHook` instead.

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


More information about the ghc-tickets mailing list