[commit: ghc] master: Allow compilation of C/C++/ObjC/ObjC++ files with module from TH (0fac488)
git at git.haskell.org
git at git.haskell.org
Thu Mar 9 00:16:24 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0fac488cca04a07224926e35be9c45ee2d0e1631/ghc
>---------------------------------------------------------------
commit 0fac488cca04a07224926e35be9c45ee2d0e1631
Author: Francesco Mazzoli <f at mazzo.li>
Date: Tue Mar 7 23:39:51 2017 -0500
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
>---------------------------------------------------------------
0fac488cca04a07224926e35be9c45ee2d0e1631
compiler/deSugar/Desugar.hs | 8 +-
compiler/main/CodeOutput.hs | 27 ++++-
compiler/main/DriverPhases.hs | 12 +--
compiler/main/DriverPipeline.hs | 115 ++++++++++++---------
compiler/main/HscMain.hs | 13 ++-
compiler/main/HscTypes.hs | 5 +
compiler/main/PipelineMonad.hs | 16 +--
compiler/main/TidyPgm.hs | 2 +
compiler/typecheck/TcRnMonad.hs | 4 +-
compiler/typecheck/TcRnTypes.hs | 6 +-
compiler/typecheck/TcSplice.hs | 15 +--
libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs | 10 ++
libraries/ghc-boot-th/ghc-boot-th.cabal.in | 1 +
libraries/ghc-boot/GHC/ForeignSrcLang.hs | 12 +++
libraries/ghc-boot/ghc-boot.cabal.in | 1 +
libraries/ghci/GHCi/Message.hs | 7 +-
libraries/ghci/GHCi/TH.hs | 2 +-
libraries/ghci/ghci.cabal.in | 1 +
.../template-haskell/Language/Haskell/TH/Syntax.hs | 29 +++---
testsuite/tests/th/T13366.hs | 39 +++++++
testsuite/tests/th/T13366.stdout | 4 +
testsuite/tests/th/TH_addCStub1.hs | 22 ----
testsuite/tests/th/TH_addCStub1.stdout | 2 -
testsuite/tests/th/TH_addCStub2.hs | 22 ----
testsuite/tests/th/all.T | 6 +-
25 files changed, 221 insertions(+), 160 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0fac488cca04a07224926e35be9c45ee2d0e1631
More information about the ghc-commits
mailing list