summaryrefslogtreecommitdiff
path: root/testsuite/tests/javascript/T23101.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/javascript/T23101.hs')
-rw-r--r--testsuite/tests/javascript/T23101.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/javascript/T23101.hs b/testsuite/tests/javascript/T23101.hs
new file mode 100644
index 0000000000..4aad09d64e
--- /dev/null
+++ b/testsuite/tests/javascript/T23101.hs
@@ -0,0 +1,22 @@
+
+foreign import javascript "(($1) => { return $1; })"
+ bool_id :: Bool -> Bool
+
+foreign import javascript "(($1) => { return !$1; })"
+ bool_not :: Bool -> Bool
+
+foreign import javascript "(($1) => { console.log($1); })"
+ bool_log :: Bool -> IO ()
+
+main :: IO ()
+main = do
+ bool_log True
+ bool_log False
+ bool_log (bool_id True)
+ bool_log (bool_id False)
+ bool_log (bool_not True)
+ bool_log (bool_not False)
+ print (bool_id True)
+ print (bool_id False)
+ print (bool_not True)
+ print (bool_not False)