diff options
author | Francesco Mazzoli <f@mazzo.li> | 2017-03-07 23:39:51 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-08 19:15:54 -0500 |
commit | 0fac488cca04a07224926e35be9c45ee2d0e1631 (patch) | |
tree | 48c5317fa66d9e09ff9bd829daf26539a971abc8 /libraries/ghc-boot/GHC/ForeignSrcLang.hs | |
parent | de62f587463f6377df1e69e11504578833dfe653 (diff) | |
download | haskell-0fac488cca04a07224926e35be9c45ee2d0e1631.tar.gz |
Allow compilation of C/C++/ObjC/ObjC++ files with module from TH
The main goal is to easily allow the inline-c project (and
similar projects such as inline-java) to emit C/C++ files to
be compiled and linked with the current module.
Moreover, `addCStub` is removed, since it's quite fragile. Most
notably, the C stubs end up in the file generated by
`CodeOutput.outputForeignStubs`, which is tuned towards
generating a file for stubs coming from `capi` and Haskell-to-C
exports.
Reviewers: simonmar, austin, goldfire, facundominguez, dfeuer, bgamari
Reviewed By: dfeuer, bgamari
Subscribers: snowleopard, rwbarton, dfeuer, thomie, duncan, mboes
Differential Revision: https://phabricator.haskell.org/D3280
Diffstat (limited to 'libraries/ghc-boot/GHC/ForeignSrcLang.hs')
-rw-r--r-- | libraries/ghc-boot/GHC/ForeignSrcLang.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libraries/ghc-boot/GHC/ForeignSrcLang.hs b/libraries/ghc-boot/GHC/ForeignSrcLang.hs new file mode 100644 index 0000000000..9ca4f04cf7 --- /dev/null +++ b/libraries/ghc-boot/GHC/ForeignSrcLang.hs @@ -0,0 +1,12 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} + +-- | See @GHC.LanguageExtensions@ for an explanation +-- on why this is needed +module GHC.ForeignSrcLang + ( module GHC.ForeignSrcLang.Type + ) where + +import Data.Binary +import GHC.ForeignSrcLang.Type + +instance Binary ForeignSrcLang |