[GHC] #13237: Extend TH with addModCStub

GHC ghc-devs at haskell.org
Tue Feb 7 18:41:32 UTC 2017


#13237: Extend TH with addModCStub
-------------------------------------+-------------------------------------
           Reporter:                 |             Owner:
  facundo.dominguez                  |
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.2.1
          Component:  Template       |           Version:  8.0.1
  Haskell                            |
           Keywords:  inline-c       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 inline-c could benefit of the ability to tell the compiler to include some
 code in the object file of the current module.
 https://github.com/fpco/inline-c/issues/21

 This way, a module `FFI.hs` using inline-c doesn't need to produce a file
 `FFI.c` with C code, but the code can be build and included in the file
 FFI.o directly.

 For this sake, it would be needed the following TH function:
 {{{
 addModCStub :: String -> Q ()
 }}}
 which would indicate to the compiler that the C code in the given string
 needs to be built and included in the object file of the current module.

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


More information about the ghc-tickets mailing list