[GHC] #12778: Expose variables bound in quotations to reify

GHC ghc-devs at haskell.org
Mon Apr 24 08:37:06 UTC 2017


#12778: Expose variables bound in quotations to reify
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:  (none)
  facundo.dominguez                  |
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.0.1
      Resolution:                    |             Keywords:  template-
                                     |  haskell reify
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3003
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 That's helpful.  So you can do it today, like this:
 {{{
 jadd :: Int32 -> Int32 -> IO Int32
 jadd x y = let r = [java| { return $x + $y } |]
            in r
 }}}
 But that's a bit painful to write.

 All this `addModFinalizer` stuff needs careful documentation.

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


More information about the ghc-tickets mailing list