diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2023-04-26 16:30:46 +0000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2023-05-11 02:53:22 +0000 |
commit | f36566468f0653c5e53844140f30bfccf3c17555 (patch) | |
tree | 9e5a2f5d2035b0e8b2e85bc1478beaf874b85d54 /compiler/GHC/StgToJS/FFI.hs | |
parent | 1e6861dd8612d8f71cc4635c4f73f84f316a6c7e (diff) | |
download | haskell-wip/jsSaturate.tar.gz |
JS: refactor jsSaturate to return a saturated JStat (#23328)wip/jsSaturate
Diffstat (limited to 'compiler/GHC/StgToJS/FFI.hs')
-rw-r--r-- | compiler/GHC/StgToJS/FFI.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/StgToJS/FFI.hs b/compiler/GHC/StgToJS/FFI.hs index effaa1f122..79409d1719 100644 --- a/compiler/GHC/StgToJS/FFI.hs +++ b/compiler/GHC/StgToJS/FFI.hs @@ -14,6 +14,7 @@ import GHC.Prelude import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.JS.Transform +import qualified GHC.JS.Syntax as Sat import GHC.StgToJS.Arg import GHC.StgToJS.ExprCtx @@ -176,8 +177,8 @@ genFFIArg isJavaScriptCc a@(StgVarArg i) arg_ty = stgArgType a r = uTypeVt arg_ty -saturateFFI :: JMacro a => Int -> a -> a -saturateFFI u = jsSaturate (Just . mkFastString $ "ghcjs_ffi_sat_" ++ show u) +saturateFFI :: Int -> JStat -> Sat.JStat +saturateFFI u = satJStat (Just . mkFastString $ "ghcjs_ffi_sat_" ++ show u) genForeignCall :: HasDebugCallStack => ExprCtx |