diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-11-04 18:18:30 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2021-11-04 18:22:23 +0000 |
commit | a4545d9fcfbc568472a26ffa03df5a85c2a47718 (patch) | |
tree | 466506d7e44278d4f1e4cc77d1f532d18f405958 /compiler | |
parent | a7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c (diff) | |
download | haskell-wip/t7388.tar.gz |
Allow CApi FFI calls in GHCiwip/t7388
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')
-rw-r--r-- | compiler/GHC/StgToByteCode.hs | 3 |
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 |