From dc9599b5a86247ed188b4bbd42618aad4d2c203d Mon Sep 17 00:00:00 2001 From: Josh Meredith Date: Tue, 13 Feb 2024 00:37:22 +1100 Subject: [PATCH] Reenable j_snoc and fix unbound variable in FFI import --- JavaScript/Web/MessageEvent.hs | 2 +- test/Tests/Properties.hs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/JavaScript/Web/MessageEvent.hs b/JavaScript/Web/MessageEvent.hs index faa7e10..0066d3c 100644 --- a/JavaScript/Web/MessageEvent.hs +++ b/JavaScript/Web/MessageEvent.hs @@ -39,6 +39,6 @@ getData me = case js_getData me of foreign import javascript unsafe "((x) => { var r2 = x.data;\ - \ var r1 = typeof r === 'string' ? 1 : (r instanceof ArrayBuffer ? 3 : 2);\ + \ var r1 = typeof r2 === 'string' ? 1 : (r2 instanceof ArrayBuffer ? 3 : 2);\ \ h$ret1 = r2; return r1; })" js_getData :: MessageEvent -> (# Int#, JSVal #) diff --git a/test/Tests/Properties.hs b/test/Tests/Properties.hs index 0aac378..5e297c5 100644 --- a/test/Tests/Properties.hs +++ b/test/Tests/Properties.hs @@ -521,7 +521,7 @@ tests = testProperty "sf_cons" sf_cons, testProperty "j_cons" j_cons, testProperty "s_snoc" s_snoc, --- testProperty "j_snoc" j_snoc, -- property `.f` + testProperty "j_snoc" j_snoc, testProperty "s_append" s_append, testProperty "s_append_s" s_append_s, testProperty "sf_append" sf_append, @@ -752,7 +752,7 @@ tests = testGroup "numeric conversion" [ testGroup "integral" [ - testProperty "j_decimal_integer" j_decimal_integer, -- IS_INTEGER_S + testProperty "j_decimal_integer" j_decimal_integer, testProperty "j_decimal_int" j_decimal_int, testProperty "j_decimal_int8" j_decimal_int8, testProperty "j_decimal_int16" j_decimal_int16, @@ -765,13 +765,13 @@ tests = testProperty "j_decimal_word32" j_decimal_word32, testProperty "j_decimal_word64" j_decimal_word64, - testProperty "j_decimal_integer_big" j_decimal_integer_big, -- IS_INTEGER_S + testProperty "j_decimal_integer_big" j_decimal_integer_big, testProperty "j_decimal_int_big" j_decimal_int_big, testProperty "j_decimal_int64_big" j_decimal_int64_big, testProperty "j_decimal_word_big" j_decimal_word_big, testProperty "j_decimal_word64_big" j_decimal_word64_big, - testProperty "j_hexadecimal_integer" j_hexadecimal_integer, -- IS_INTEGER_S + testProperty "j_hexadecimal_integer" j_hexadecimal_integer, testProperty "j_hexadecimal_int" j_hexadecimal_int, testProperty "j_hexadecimal_int8" j_hexadecimal_int8, testProperty "j_hexadecimal_int16" j_hexadecimal_int16,