[GHC] #13237: Extend TH with addModCStub

GHC ghc-devs at haskell.org
Wed Feb 8 12:25:32 UTC 2017


#13237: Extend TH with addModCStub
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:
  facundo.dominguez                  |  facundo.dominguez
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Template Haskell  |              Version:  8.0.1
      Resolution:                    |             Keywords:  inline-c
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3106
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by facundo.dominguez:

@@ -6,2 +6,2 @@
- `FFI.c` with C code, but the code can be built and included in the file
- object file of the module.
+ `FFI.c` with C code, but the code can be built and included in the object
+ file of the module.

New description:

 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 built and included in the object
 file of the module.

 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#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list