summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToByteCode.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-11-04 18:18:30 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-05 10:12:16 -0400
commitbe3750a5a3cbc59a7b84f1f7603f308aee1cc80b (patch)
tree0c30a5633f67be2e13123c73e56e777a7077725a /compiler/GHC/StgToByteCode.hs
parent59dfb00584e6d24d82d3f5338c6299bae48e0468 (diff)
downloadhaskell-be3750a5a3cbc59a7b84f1f7603f308aee1cc80b.tar.gz
Allow CApi FFI calls in GHCi
At some point in the past this started working. I noticed this when working on multiple home units and couldn't load GHC's dependencies into the interpreter. Fixes #7388
Diffstat (limited to 'compiler/GHC/StgToByteCode.hs')
-rw-r--r--compiler/GHC/StgToByteCode.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index e056dadc2b..e7d4df472d 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -1393,6 +1393,7 @@ generateCCall d0 s p (CCallSpec target cconv safety) result_ty args_r_to_l
conv = case cconv of
CCallConv -> FFICCall
+ CApiConv -> FFICCall
StdCallConv -> FFIStdCall
_ -> panic "GHC.StgToByteCode: unexpected calling convention"
@@ -1935,7 +1936,7 @@ isSupportedCConv (CCallSpec _ cconv _) = case cconv of
StdCallConv -> True -- convention to ensure that a warning
PrimCallConv -> False -- is triggered when a new one is added
JavaScriptCallConv -> False
- CApiConv -> False
+ CApiConv -> True
-- See bug #10462
unsupportedCConvException :: a