diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2023-03-10 16:16:00 +0000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2023-03-13 03:56:03 +0000 |
commit | 047e9d4f10e4124899887449dc52b9e72a7d3ea6 (patch) | |
tree | 8f30d6843f3c31fb32ac39c12abbee81921fb8ec /compiler/GHC | |
parent | ec263a59b886ea616dabce349df7a377d5356dd5 (diff) | |
download | haskell-wip/js-forceBool.tar.gz |
JS: fix implementation of forceBool to use JS backend syntaxwip/js-forceBool
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/HsToCore/Foreign/JavaScript.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/HsToCore/Foreign/JavaScript.hs b/compiler/GHC/HsToCore/Foreign/JavaScript.hs index 130de83ebf..62ea86ee9a 100644 --- a/compiler/GHC/HsToCore/Foreign/JavaScript.hs +++ b/compiler/GHC/HsToCore/Foreign/JavaScript.hs @@ -639,7 +639,7 @@ jsResultWrapper result_ty | Just (tc,_) <- maybe_tc_app, tc `hasKey` boolTyConKey = do -- result_id <- newSysLocalDs boolTy ccall_uniq <- newUnique - let forceBool e = mkJsCall ccall_uniq (fsLit "$r = !(!$1)") [e] boolTy + let forceBool e = mkJsCall ccall_uniq (fsLit "((x) => { return !(!x); })") [e] boolTy return (Just intPrimTy, \e -> forceBool e) |