From f64a642c8e804070a38f307cce8b0db367aa3fab Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 12 Jan 2024 09:51:22 +0100 Subject: [PATCH 01/21] Set version to 11.0.1 (#6561) --- CHANGELOG.md | 2 ++ jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 926b827bc6..0f4120cd69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.0.1 (Unreleased) + # 11.0.0 No changes compared to rc.9. diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index d8e2e551bc..d4d7fcfb8f 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.0.0" +let version = "11.0.1" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index 03559804cc..eb6013df1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.0.0", + "version": "11.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.0.0", + "version": "11.0.1", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index 6005684bd6..64d792efc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.0.0", + "version": "11.0.1", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index bf7a42af60..2574f2f84b 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.0.0", + "version": "11.0.1", "keywords": [ "rescript", "stdlib", @@ -23,4 +23,4 @@ "url": "https://github.com/rescript-compiler/issues" }, "homepage": "http://rescript-lang.org" -} +} \ No newline at end of file From 6df7d2f4e9cfd23c986a442fe359e2b22cdfed7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Mon, 15 Jan 2024 11:05:00 +0100 Subject: [PATCH 02/21] describe what branch to target when making PRs --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad19e3b306..56a9d7391a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -351,6 +351,13 @@ Javascript Code Note that there is one design goal to keep in mind, never introduce any meaningless symbol unless necessary, we do optimizations, however, it should also compile readable output code. +## PR target branch + +Target branch `master` for development of new (breaking) features (v12). + +Bug fixes and maintenance should target branch `11.0_release`. +We'll merge `11.0_release` into `master` from time to time to propagate those changes. + ## Release Process To build a new version and release it on NPM, follow these steps: From 7ff004fe73a9efe012192b58d06f041747cda961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Mon, 15 Jan 2024 11:46:25 +0100 Subject: [PATCH 03/21] run CI on 11.0_release --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80fff87c15..ff71476b12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,14 +2,14 @@ name: CI on: push: - branches: [master] + branches: [master, 11.0_release] # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet tags: - "v[0-9]+.[0-9]+.[0-9]+" - "v[0-9]+.[0-9]+.[0-9]+-*" pull_request: - branches: [master] + branches: [master, 11.0_release] concurrency: group: ci-${{ github.ref }}-1 From 612fc40294ce441b2e60b5f828b83b5059763bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Mon, 15 Jan 2024 12:42:53 +0100 Subject: [PATCH 04/21] format --- packages/std/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/package.json b/packages/std/package.json index 2574f2f84b..6d9507b846 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -23,4 +23,4 @@ "url": "https://github.com/rescript-compiler/issues" }, "homepage": "http://rescript-lang.org" -} \ No newline at end of file +} From d2ccc4ed54bb974e090ea36dd25afb53627fbde1 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 17 Jan 2024 08:10:33 +0100 Subject: [PATCH 05/21] Use @rescript/react 0.12.0 for playground bundling and gentype test (#6572) --- .../package-lock.json | 43 +++++++++++-------- .../typescript-react-example/package.json | 2 +- .../typescript-react-example/src/Hooks.res | 2 +- .../src/V3Compatibility.res | 2 +- .../playground-bundling/package-lock.json | 14 +++--- packages/playground-bundling/package.json | 2 +- 6 files changed, 37 insertions(+), 28 deletions(-) diff --git a/jscomp/gentype_tests/typescript-react-example/package-lock.json b/jscomp/gentype_tests/typescript-react-example/package-lock.json index 2dd8fbba05..a322751c5e 100644 --- a/jscomp/gentype_tests/typescript-react-example/package-lock.json +++ b/jscomp/gentype_tests/typescript-react-example/package-lock.json @@ -8,7 +8,7 @@ "name": "typescript-react-example", "version": "0.1.0", "dependencies": { - "@rescript/react": "^0.11.0", + "@rescript/react": "^0.12.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -22,6 +22,26 @@ "typescript": "^5.2.2" } }, + "../../..": { + "name": "rescript", + "version": "11.0.1", + "dev": true, + "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", + "bin": { + "bsc": "bsc", + "bstracing": "lib/bstracing", + "rescript": "rescript" + }, + "devDependencies": { + "mocha": "10.1.0", + "nyc": "15.0.0", + "prettier": "2.7.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -156,9 +176,9 @@ } }, "node_modules/@rescript/react": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.11.0.tgz", - "integrity": "sha512-RzoAO+3cJwXE2D7yodMo4tBO2EkeDYCN/I/Sj/yRweI3S1CY1ZBOF/GMcVtjeIurJJt7KMveqQXTaRrqoGZBBg==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.0.tgz", + "integrity": "sha512-EBLsf5rD7sJOjgfLLGwuLw/hONszc3UtYnIVgv7OdTyUNR41/m4deVm62PI0agvr3kWakXz4KchKRSd+19/bRA==", "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" @@ -1399,19 +1419,8 @@ } }, "node_modules/rescript": { - "version": "11.0.0-rc.8", - "resolved": "file:../../..", - "dev": true, - "hasInstallScript": true, - "license": "SEE LICENSE IN LICENSE", - "bin": { - "bsc": "bsc", - "bstracing": "lib/bstracing", - "rescript": "rescript" - }, - "engines": { - "node": ">=10" - } + "resolved": "../../..", + "link": true }, "node_modules/resolve-from": { "version": "4.0.0", diff --git a/jscomp/gentype_tests/typescript-react-example/package.json b/jscomp/gentype_tests/typescript-react-example/package.json index 2bd24b2215..172eb2a18f 100644 --- a/jscomp/gentype_tests/typescript-react-example/package.json +++ b/jscomp/gentype_tests/typescript-react-example/package.json @@ -10,7 +10,7 @@ "lint": "eslint src" }, "dependencies": { - "@rescript/react": "^0.11.0", + "@rescript/react": "^0.12.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/jscomp/gentype_tests/typescript-react-example/src/Hooks.res b/jscomp/gentype_tests/typescript-react-example/src/Hooks.res index 9a46abfc8a..bce9f6c9fc 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/Hooks.res +++ b/jscomp/gentype_tests/typescript-react-example/src/Hooks.res @@ -99,7 +99,7 @@ module ForwardRef = { ) } -@genType type callback<'input, 'output> = React.callback<'input, 'output> +@genType type callback<'input, 'output> = 'input => 'output @genType type testReactContext = React.Context.t diff --git a/jscomp/gentype_tests/typescript-react-example/src/V3Compatibility.res b/jscomp/gentype_tests/typescript-react-example/src/V3Compatibility.res index 74ebf6164a..c706483c60 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/V3Compatibility.res +++ b/jscomp/gentype_tests/typescript-react-example/src/V3Compatibility.res @@ -1,4 +1,4 @@ open ReactV3 @genType -type cb = React.callback +type cb = int => string diff --git a/packages/playground-bundling/package-lock.json b/packages/playground-bundling/package-lock.json index bd21cab48a..d3a1faa332 100644 --- a/packages/playground-bundling/package-lock.json +++ b/packages/playground-bundling/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@rescript/core": "^0.6.0", - "@rescript/react": "^0.12.0-alpha.3" + "@rescript/react": "^0.12.0" } }, "node_modules/@rescript/core": { @@ -22,9 +22,9 @@ } }, "node_modules/@rescript/react": { - "version": "0.12.0-alpha.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.0-alpha.3.tgz", - "integrity": "sha512-/S1uj77RPDzuLg3Ofb8KKU3Vppqy97/vF6bBdBZ+saIO9bpHVlsmmJyJG8QXjGZKE+aMynrrR3Tj4+9+5OzLdw==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.0.tgz", + "integrity": "sha512-EBLsf5rD7sJOjgfLLGwuLw/hONszc3UtYnIVgv7OdTyUNR41/m4deVm62PI0agvr3kWakXz4KchKRSd+19/bRA==", "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" @@ -104,9 +104,9 @@ "requires": {} }, "@rescript/react": { - "version": "0.12.0-alpha.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.0-alpha.3.tgz", - "integrity": "sha512-/S1uj77RPDzuLg3Ofb8KKU3Vppqy97/vF6bBdBZ+saIO9bpHVlsmmJyJG8QXjGZKE+aMynrrR3Tj4+9+5OzLdw==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.0.tgz", + "integrity": "sha512-EBLsf5rD7sJOjgfLLGwuLw/hONszc3UtYnIVgv7OdTyUNR41/m4deVm62PI0agvr3kWakXz4KchKRSd+19/bRA==", "requires": {} }, "js-tokens": { diff --git a/packages/playground-bundling/package.json b/packages/playground-bundling/package.json index 2a6b591f68..c876bf1172 100644 --- a/packages/playground-bundling/package.json +++ b/packages/playground-bundling/package.json @@ -12,6 +12,6 @@ "license": "ISC", "dependencies": { "@rescript/core": "^0.6.0", - "@rescript/react": "^0.12.0-alpha.3" + "@rescript/react": "^0.12.0" } } From 022360769925f4112c7185421db7d4b95ccda308 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Wed, 17 Jan 2024 16:19:55 +0100 Subject: [PATCH 06/21] Fix issue with recursive modules and uncurried. Fixes https://github.com/rescript-lang/rescript-compiler/issues/6555 --- CHANGELOG.md | 3 + jscomp/ml/transl_recmodule.ml | 24 ++-- jscomp/test/build.ninja | 3 +- jscomp/test/recmodule.js | 207 ++++++++++++++++++++++++++++++++++ jscomp/test/recmodule.res | 70 ++++++++++++ 5 files changed, 296 insertions(+), 11 deletions(-) create mode 100644 jscomp/test/recmodule.js create mode 100644 jscomp/test/recmodule.res diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4120cd69..f118a83561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ # 11.0.1 (Unreleased) +#### :bug: Bug Fix +- Fix issue with recursive modules and uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6575 + # 11.0.0 No changes compared to rc.9. diff --git a/jscomp/ml/transl_recmodule.ml b/jscomp/ml/transl_recmodule.ml index 3e709b6dc3..5d2c1746d6 100644 --- a/jscomp/ml/transl_recmodule.ml +++ b/jscomp/ml/transl_recmodule.ml @@ -51,18 +51,22 @@ let init_shape modl = match sg with | [] -> [] | Sig_value (id, { val_kind = Val_reg; val_type = ty }) :: rem -> + let is_function t = + Ast_uncurried_utils.typeIsUncurriedFun t || match t.desc with + | Tarrow _ -> true + | _ -> false in let init_v = match Ctype.expand_head env ty with - | { desc = Tarrow (_, _, _, _) } -> - Const_pointer - ( 0, - Pt_constructor - { - name = "Function"; - const = cstr_const; - non_const = cstr_non_const; - attrs = []; - } ) + | t when is_function t -> + Const_pointer + ( 0, + Pt_constructor + { + name = "Function"; + const = cstr_const; + non_const = cstr_non_const; + attrs = []; + } ) | { desc = Tconstr (p, _, _) } when Path.same p Predef.path_lazy_t -> Const_pointer ( 1, diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index 55a35c49f6..b752adee5b 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -523,6 +523,7 @@ o test/rec_array_test.cmi test/rec_array_test.cmj : cc test/rec_array_test.res | o test/rec_fun_test.cmi test/rec_fun_test.cmj : cc test/rec_fun_test.res | test/mt.cmj $bsc $stdlib runtime o test/rec_module_opt.cmi test/rec_module_opt.cmj : cc test/rec_module_opt.res | $bsc $stdlib runtime o test/rec_module_test.cmi test/rec_module_test.cmj : cc test/rec_module_test.res | test/mt.cmj $bsc $stdlib runtime +o test/recmodule.cmi test/recmodule.cmj : cc test/recmodule.res | $bsc $stdlib runtime o test/record_debug_test.cmi test/record_debug_test.cmj : cc test/record_debug_test.res | test/mt.cmj $bsc $stdlib runtime o test/record_extension_test.cmi test/record_extension_test.cmj : cc test/record_extension_test.res | test/mt.cmj $bsc $stdlib runtime o test/record_name_test.cmi test/record_name_test.cmj : cc test/record_name_test.res | $bsc $stdlib runtime @@ -716,4 +717,4 @@ o test/update_record_test.cmi test/update_record_test.cmj : cc test/update_recor o test/variant.cmi test/variant.cmj : cc test/variant.res | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.res | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/recmodule.js b/jscomp/test/recmodule.js new file mode 100644 index 0000000000..41a4c1edce --- /dev/null +++ b/jscomp/test/recmodule.js @@ -0,0 +1,207 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var Curry = require("../../lib/js/curry.js"); +var Caml_module = require("../../lib/js/caml_module.js"); + +var Entity = {}; + +function MakeLayer(Deps) { + var getLight = function (id) { + return Curry._1(Deps.presentLight, { + id: id, + name: "Light 1" + }); + }; + return { + getLight: getLight + }; +} + +var UseCase = { + MakeLayer: MakeLayer +}; + +function MakeLayer$1(Deps, UC) { + var presentLight = function (light) { + return Curry._2(Deps.presentJson, light, 200); + }; + var handleGetLight = function (req) { + return Curry._1(UC.getLight, req.params.id); + }; + return { + handleGetLight: handleGetLight, + presentLight: presentLight + }; +} + +var Adapter = { + MakeLayer: MakeLayer$1 +}; + +function MakeLayer$2(Deps) { + var presentJson = function (json, status) { + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "recmodule.res", + 60, + 41 + ], + Error: new Error() + }; + }; + var routes = function (param) { + return [[ + "/lights", + Deps.handleGetLight + ]]; + }; + return { + presentJson: presentJson, + routes: routes + }; +} + +var Infra = { + MakeLayer: MakeLayer$2 +}; + +var I = Caml_module.init_mod([ + "recmodule.res", + 67, + 30 + ], { + TAG: "Module", + _0: [ + [ + "Function", + "presentJson" + ], + [ + "Function", + "routes" + ] + ] + }); + +var A = Caml_module.init_mod([ + "recmodule.res", + 68, + 25 + ], { + TAG: "Module", + _0: [ + [ + "Function", + "handleGetLight" + ], + [ + "Function", + "presentLight" + ] + ] + }); + +var U = Caml_module.init_mod([ + "recmodule.res", + 69, + 25 + ], { + TAG: "Module", + _0: [[ + "Function", + "getLight" + ]] + }); + +function presentJson(json, status) { + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "recmodule.res", + 60, + 41 + ], + Error: new Error() + }; +} + +function routes(param) { + return [[ + "/lights", + A.handleGetLight + ]]; +} + +Caml_module.update_mod({ + TAG: "Module", + _0: [ + [ + "Function", + "presentJson" + ], + [ + "Function", + "routes" + ] + ] + }, I, { + presentJson: presentJson, + routes: routes + }); + +function presentLight(light) { + return Curry._2(I.presentJson, light, 200); +} + +function handleGetLight(req) { + return Curry._1(U.getLight, req.params.id); +} + +Caml_module.update_mod({ + TAG: "Module", + _0: [ + [ + "Function", + "handleGetLight" + ], + [ + "Function", + "presentLight" + ] + ] + }, A, { + handleGetLight: handleGetLight, + presentLight: presentLight + }); + +function getLight(id) { + return Curry._1(A.presentLight, { + id: id, + name: "Light 1" + }); +} + +Caml_module.update_mod({ + TAG: "Module", + _0: [[ + "Function", + "getLight" + ]] + }, U, { + getLight: getLight + }); + +var App = { + I: I, + A: A, + U: U +}; + +exports.Entity = Entity; +exports.UseCase = UseCase; +exports.Adapter = Adapter; +exports.Infra = Infra; +exports.App = App; +/* I Not a pure module */ diff --git a/jscomp/test/recmodule.res b/jscomp/test/recmodule.res new file mode 100644 index 0000000000..d96f2074a1 --- /dev/null +++ b/jscomp/test/recmodule.res @@ -0,0 +1,70 @@ +type params = {id: string} +type req = {params: params} + +module Entity = { + type light = { + id: string, + name: string, + } +} + +module UseCase = { + module type Layer = { + let getLight: string => promise + } + + module type Deps = { + let presentLight: Entity.light => promise + } + + module MakeLayer = (Deps: Deps): Layer => { + let getLight = id => { + Deps.presentLight({ + id, + name: "Light 1", + }) + } + } +} + +module Adapter = { + module type Layer = { + let handleGetLight: req => promise + let presentLight: Entity.light => promise + } + + module type Deps = { + let presentJson: ('a, ~status: int) => promise + } + + module MakeLayer = (Deps: Deps, UC: UseCase.Layer): Layer => { + let presentLight = light => light->Deps.presentJson(~status=200) + + let handleGetLight = req => { + UC.getLight(req.params.id) + } + } +} + +module Infra = { + module type Layer = { + let presentJson: ('a, ~status: int) => promise + let routes: unit => array<(string, req => promise)> + } + + module type Deps = { + let handleGetLight: req => promise + } + + module MakeLayer = (Deps: Deps): Layer => { + let presentJson = (json, ~status) => assert false + + let routes = () => [("/lights", Deps.handleGetLight)] + } +} + +module App = { + module rec I: Infra.Layer = Infra.MakeLayer(A) + and A: Adapter.Layer = Adapter.MakeLayer(I, U) + and U: UseCase.Layer = UseCase.MakeLayer(A) +} From b2ae38a5941c829b7e55ef506dcf0d88e393f8bc Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 17 Jan 2024 18:33:11 +0100 Subject: [PATCH 07/21] fixed Not_found exception raised in certain coercion cases (#6574) * fixed Not_found exception raised in certain coercion cases * changelog * match for specific exception * add back changelog entry --- CHANGELOG.md | 2 ++ jscomp/ml/ctype.ml | 13 +++++++++---- jscomp/ml/variant_coercion.ml | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f118a83561..b49a845ba3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ # 11.0.1 (Unreleased) #### :bug: Bug Fix + +- Fixed issue with coercions sometimes raising a `Not_found` instead of giving a proper error message. https://github.com/rescript-lang/rescript-compiler/pull/6574 - Fix issue with recursive modules and uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6575 # 11.0.0 diff --git a/jscomp/ml/ctype.ml b/jscomp/ml/ctype.ml index d615cefb75..901a0db72c 100644 --- a/jscomp/ml/ctype.ml +++ b/jscomp/ml/ctype.ml @@ -3904,6 +3904,11 @@ let subtypes = TypePairs.create 17 let subtype_error env trace = raise (Subtype (expand_trace env (List.rev trace), [])) +let extract_concrete_typedecl_opt env t = + match extract_concrete_typedecl env t with + | v -> Some v + | exception Not_found -> None + let rec subtype_rec env trace t1 t2 cstrs = let t1 = repr t1 in let t2 = repr t2 in @@ -3960,12 +3965,12 @@ let rec subtype_rec env trace t1 t2 cstrs = | (Tconstr(p1, [], _), Tconstr(p2, [], _)) when Path.same p1 Predef.path_int && Path.same p2 Predef.path_float -> cstrs | (Tconstr(path, [], _), Tconstr(_, [], _)) when Variant_coercion.can_coerce_primitive path && - extract_concrete_typedecl env t2 |> Variant_coercion.can_try_coerce_variant_to_primitive |> Option.is_some + extract_concrete_typedecl_opt env t2 |> Variant_coercion.can_try_coerce_variant_to_primitive_opt |> Option.is_some -> (* type coercion for primitives (int/float/string) to elgible unboxed variants: - must be unboxed - must have a constructor case with a supported and matching primitive payload *) - (match Variant_coercion.can_try_coerce_variant_to_primitive (extract_concrete_typedecl env t2) with + (match Variant_coercion.can_try_coerce_variant_to_primitive_opt (extract_concrete_typedecl_opt env t2) with | Some (constructors, true) -> if Variant_coercion.variant_has_catch_all_case constructors (fun p -> Path.same p path) then cstrs @@ -3973,10 +3978,10 @@ let rec subtype_rec env trace t1 t2 cstrs = (trace, t1, t2, !univar_pairs)::cstrs | _ -> (trace, t1, t2, !univar_pairs)::cstrs) | (Tconstr(_, [], _), Tconstr(path, [], _)) when Variant_coercion.can_coerce_primitive path && - extract_concrete_typedecl env t1 |> Variant_coercion.can_try_coerce_variant_to_primitive |> Option.is_some + extract_concrete_typedecl_opt env t1 |> Variant_coercion.can_try_coerce_variant_to_primitive_opt |> Option.is_some -> (* type coercion for variants to primitives *) - (match Variant_coercion.can_try_coerce_variant_to_primitive (extract_concrete_typedecl env t1) with + (match Variant_coercion.can_try_coerce_variant_to_primitive_opt (extract_concrete_typedecl_opt env t1) with | Some (constructors, unboxed) -> if constructors |> Variant_coercion.variant_has_same_runtime_representation_as_target ~targetPath:path ~unboxed then cstrs diff --git a/jscomp/ml/variant_coercion.ml b/jscomp/ml/variant_coercion.ml index 17494a2e96..a178b4b5bd 100644 --- a/jscomp/ml/variant_coercion.ml +++ b/jscomp/ml/variant_coercion.ml @@ -60,6 +60,11 @@ let can_try_coerce_variant_to_primitive Some (constructors, type_attributes |> Ast_untagged_variants.has_untagged) | _ -> None +let can_try_coerce_variant_to_primitive_opt p = + match p with + | None -> None + | Some p -> can_try_coerce_variant_to_primitive p + let variant_representation_matches (c1_attrs : Parsetree.attributes) (c2_attrs : Parsetree.attributes) = match From d69d4382f7298f34a24c75a4de480df6b74cd99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Thu, 18 Jan 2024 14:16:45 +0100 Subject: [PATCH 08/21] Fix renamed field access in inline records (#6551) * add remaining part of melange-re/melange#732 * call the right fld_record_ functions * update changelog --- CHANGELOG.md | 1 + jscomp/core/bs_conditional_initial.ml | 4 -- jscomp/core/record_attributes_check.ml | 30 +--------- jscomp/ml/lambda.ml | 81 ++++++++++++++++++++------ jscomp/ml/lambda.mli | 68 ++++++++++++--------- jscomp/ml/matching.ml | 20 +------ jscomp/ml/matching.mli | 3 - jscomp/ml/translcore.ml | 38 ++++++------ jscomp/test/as_inline_record_test.js | 10 ++++ jscomp/test/as_inline_record_test.res | 10 ++++ 10 files changed, 150 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b49a845ba3..35a9e57525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ #### :bug: Bug Fix +- Renamed inline record fields : fix renamed field access in inline records https://github.com/rescript-lang/rescript-compiler/pull/6551 - Fixed issue with coercions sometimes raising a `Not_found` instead of giving a proper error message. https://github.com/rescript-lang/rescript-compiler/pull/6574 - Fix issue with recursive modules and uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6575 diff --git a/jscomp/core/bs_conditional_initial.ml b/jscomp/core/bs_conditional_initial.ml index 70e5a10e4a..52010a4bb4 100644 --- a/jscomp/core/bs_conditional_initial.ml +++ b/jscomp/core/bs_conditional_initial.ml @@ -44,10 +44,6 @@ let setup_env () = Builtin_attributes.check_bs_attributes_inclusion := Record_attributes_check.check_bs_attributes_inclusion; Builtin_attributes.check_duplicated_labels := Record_attributes_check.check_duplicated_labels; - Lambda.fld_record := Record_attributes_check.fld_record; - Lambda.fld_record_set := Record_attributes_check.fld_record_set; - Lambda.blk_record := Record_attributes_check.blk_record; - Lambda.blk_record_inlined := Record_attributes_check.blk_record_inlined; Matching.names_from_construct_pattern := Matching_polyfill.names_from_construct_pattern; diff --git a/jscomp/core/record_attributes_check.ml b/jscomp/core/record_attributes_check.ml index 60865b275b..c4bf854c00 100644 --- a/jscomp/core/record_attributes_check.ml +++ b/jscomp/core/record_attributes_check.ml @@ -24,7 +24,7 @@ type label = Types.label_description -let find_name = Matching.find_name +let find_name = Lambda.find_name let find_name_with_loc (attr : Parsetree.attribute) : string Asttypes.loc option = @@ -40,34 +40,6 @@ let find_name_with_loc (attr : Parsetree.attribute) : string Asttypes.loc option Some { txt = s; loc } | _ -> None -let fld_record (lbl : label) = - Lambda.Fld_record - { - name = Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name; - mutable_flag = lbl.lbl_mut; - } - -let fld_record_set (lbl : label) = - Lambda.Fld_record_set - (Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) - -let blk_record (fields : (label * _) array) mut record_repr = - let all_labels_info = - Ext_array.map fields (fun (lbl, _) -> - Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) - in - Lambda.Blk_record - { fields = all_labels_info; mutable_flag = mut; record_repr } - -let blk_record_inlined fields name num_nonconst optional_labels ~tag ~attrs mutable_flag = - let fields = - Array.map - (fun ((lbl : label), _) -> - Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) - fields - in - Lambda.Blk_record_inlined {fields; name; num_nonconst; tag; mutable_flag; optional_labels; attrs } - let check_bs_attributes_inclusion (attrs1 : Parsetree.attributes) (attrs2 : Parsetree.attributes) lbl_name = let a = Ext_list.find_def attrs1 find_name lbl_name in diff --git a/jscomp/ml/lambda.ml b/jscomp/ml/lambda.ml index 037502950e..337dd10e9e 100644 --- a/jscomp/ml/lambda.ml +++ b/jscomp/ml/lambda.ml @@ -86,21 +86,47 @@ let mutable_flag_of_tag_info (tag : tag_info) = | Blk_some -> Immutable +type label = Types.label_description + +let find_name (attr : Parsetree.attribute) = + match attr with + | ( { txt = "bs.as" | "as" }, + PStr + [ + { + pstr_desc = + Pstr_eval ({ pexp_desc = Pexp_constant (Pconst_string (s, _)) }, _); + }; + ] ) -> + Some s + | _ -> None + +let blk_record (fields : (label * _) array) mut record_repr = + let all_labels_info = + Ext_array.map fields (fun (lbl, _) -> + Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) + in + Blk_record + { fields = all_labels_info; mutable_flag = mut; record_repr } -let blk_record = ref (fun _ _ _ -> - assert false - ) - - -let blk_record_ext = ref (fun fields mutable_flag -> - let all_labels_info = fields |> Array.map (fun (x,_) -> x.Types.lbl_name) in - Blk_record_ext {fields = all_labels_info; mutable_flag } - ) -let blk_record_inlined = ref (fun fields name num_nonconst optional_labels ~tag ~attrs mutable_flag -> - let fields = fields |> Array.map (fun (x,_) -> x.Types.lbl_name) in +let blk_record_ext fields mutable_flag = + let all_labels_info = + Array.map + (fun ((lbl : label), _) -> + Ext_list.find_def lbl.Types.lbl_attributes find_name lbl.lbl_name) + fields + in + Blk_record_ext {fields = all_labels_info; mutable_flag } + +let blk_record_inlined fields name num_nonconst optional_labels ~tag ~attrs mutable_flag = + let fields = + Array.map + (fun ((lbl : label), _) -> + Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) + fields + in Blk_record_inlined {fields; name; num_nonconst; tag; mutable_flag; optional_labels; attrs } -) let ref_tag_info : tag_info = Blk_record {fields = [| "contents" |]; mutable_flag = Mutable; record_repr = Record_regular} @@ -117,9 +143,17 @@ type field_dbg_info = | Fld_variant | Fld_cons | Fld_array - -let fld_record = ref (fun (lbl : Types.label_description) -> - Fld_record {name = lbl.lbl_name; mutable_flag = Mutable}) + +let fld_record (lbl : label) = + Fld_record + { + name = Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name; + mutable_flag = lbl.lbl_mut; + } + +let fld_record_extension (lbl : label) = + Fld_record_extension + { name = Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name } let ref_field_info : field_dbg_info = Fld_record { name = "contents"; mutable_flag = Mutable} @@ -131,8 +165,21 @@ type set_field_dbg_info = | Fld_record_extension_set of string let ref_field_set_info : set_field_dbg_info = Fld_record_set "contents" -let fld_record_set = ref ( fun (lbl : Types.label_description) -> - Fld_record_set lbl.lbl_name ) +let fld_record_set (lbl : label) = + Fld_record_set + (Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) + +let fld_record_inline (lbl : label) = + Fld_record_inline + { name = Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name } + +let fld_record_inline_set (lbl : label) = + Fld_record_inline_set + (Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) + +let fld_record_extension_set (lbl : label) = + Fld_record_extension_set + (Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name) type immediate_or_pointer = | Immediate diff --git a/jscomp/ml/lambda.mli b/jscomp/ml/lambda.mli index af7b81e807..3a9b847c9c 100644 --- a/jscomp/ml/lambda.mli +++ b/jscomp/ml/lambda.mli @@ -63,34 +63,34 @@ type tag_info = | Blk_record_ext of {fields : string array; mutable_flag : mutable_flag} | Blk_lazy_general +val find_name : + Parsetree.attribute -> Asttypes.label option + val tag_of_tag_info : tag_info -> int val mutable_flag_of_tag_info : tag_info -> mutable_flag -val blk_record : - ( - (Types.label_description* Typedtree.record_label_definition) array -> - mutable_flag -> - record_repr -> - tag_info - ) ref +val blk_record : + (Types.label_description* Typedtree.record_label_definition) array -> + mutable_flag -> + record_repr -> + tag_info + val blk_record_ext : - ( - (Types.label_description* Typedtree.record_label_definition) array -> - mutable_flag -> - tag_info - ) ref + (Types.label_description* Typedtree.record_label_definition) array -> + mutable_flag -> + tag_info + val blk_record_inlined : - ( - (Types.label_description* Typedtree.record_label_definition) array -> - string -> - int -> - string list -> - tag:int -> - attrs:Parsetree.attributes -> - mutable_flag -> - tag_info - ) ref + (Types.label_description* Typedtree.record_label_definition) array -> + string -> + int -> + string list -> + tag:int -> + attrs:Parsetree.attributes -> + mutable_flag -> + tag_info + @@ -110,8 +110,16 @@ type field_dbg_info = | Fld_array val fld_record : - (Types.label_description -> - field_dbg_info) ref + Types.label_description -> + field_dbg_info + +val fld_record_inline : + Types.label_description -> + field_dbg_info + +val fld_record_extension : + Types.label_description -> + field_dbg_info val ref_field_info : field_dbg_info @@ -125,8 +133,16 @@ type set_field_dbg_info = val ref_field_set_info : set_field_dbg_info val fld_record_set : - (Types.label_description -> - set_field_dbg_info) ref + Types.label_description -> + set_field_dbg_info + +val fld_record_inline_set : + Types.label_description -> + set_field_dbg_info + +val fld_record_extension_set : + Types.label_description -> + set_field_dbg_info type immediate_or_pointer = | Immediate diff --git a/jscomp/ml/matching.ml b/jscomp/ml/matching.ml index d79b00f0c4..30fa8efb72 100644 --- a/jscomp/ml/matching.ml +++ b/jscomp/ml/matching.ml @@ -26,19 +26,6 @@ open Printf let dbg = false -let find_name (attr : Parsetree.attribute) = - match attr with - | ( { txt = "bs.as" | "as" }, - PStr - [ - { - pstr_desc = - Pstr_eval ({ pexp_desc = Pexp_constant (Pconst_string (s, _)) }, _); - }; - ] ) -> - Some s - | _ -> None - (* See Peyton-Jones, ``The Implementation of functional programming languages'', chapter 5. *) (* @@ -1612,12 +1599,11 @@ let make_record_matching loc all_labels def = function match lbl.lbl_repres with | Record_float_unused -> assert false | Record_regular | Record_optional_labels _ -> - Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [arg], loc) + Lprim (Pfield (lbl.lbl_pos, Lambda.fld_record lbl), [arg], loc) | Record_inlined _ -> - let name = Ext_list.find_def lbl.lbl_attributes find_name lbl.lbl_name in - Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name}), [arg], loc) + Lprim (Pfield (lbl.lbl_pos, Lambda.fld_record_inline lbl), [arg], loc) | Record_unboxed _ -> arg - | Record_extension -> Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension {name = lbl.lbl_name}), [arg], loc) + | Record_extension -> Lprim (Pfield (lbl.lbl_pos + 1, Lambda.fld_record_extension lbl), [arg], loc) in let str = match lbl.lbl_mut with diff --git a/jscomp/ml/matching.mli b/jscomp/ml/matching.mli index c26f3b7838..16fda89bf5 100644 --- a/jscomp/ml/matching.mli +++ b/jscomp/ml/matching.mli @@ -18,9 +18,6 @@ open Typedtree open Lambda -val find_name : - Parsetree.attribute -> Asttypes.label option - val call_switcher_variant_constant : (Location.t -> Lambda.lambda option -> diff --git a/jscomp/ml/translcore.ml b/jscomp/ml/translcore.ml index b4e4d1d92c..7033cd5405 100644 --- a/jscomp/ml/translcore.ml +++ b/jscomp/ml/translcore.ml @@ -886,17 +886,17 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda = | Record_float_unused -> assert false | Record_regular | Record_optional_labels _ -> Lprim - (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [ targ ], e.exp_loc) + (Pfield (lbl.lbl_pos, Lambda.fld_record lbl), [ targ ], e.exp_loc) | Record_inlined _ -> Lprim - ( Pfield (lbl.lbl_pos, Fld_record_inline { name = lbl.lbl_name }), + ( Pfield (lbl.lbl_pos, Lambda.fld_record_inline lbl), [ targ ], e.exp_loc ) | Record_unboxed _ -> targ | Record_extension -> Lprim ( Pfield - (lbl.lbl_pos + 1, Fld_record_extension { name = lbl.lbl_name }), + (lbl.lbl_pos + 1, Lambda.fld_record_extension lbl), [ targ ], e.exp_loc )) | Texp_setfield (arg, _, lbl, newval) -> @@ -904,12 +904,12 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda = match lbl.lbl_repres with | Record_float_unused -> assert false | Record_regular | Record_optional_labels _ -> - Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl) + Psetfield (lbl.lbl_pos, Lambda.fld_record_set lbl) | Record_inlined _ -> - Psetfield (lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name) + Psetfield (lbl.lbl_pos, Lambda.fld_record_inline_set lbl) | Record_unboxed _ -> assert false | Record_extension -> - Psetfield (lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name) + Psetfield (lbl.lbl_pos + 1, Lambda.fld_record_extension_set lbl) in Lprim (access, [ transl_exp arg; transl_exp newval ], e.exp_loc) | Texp_array expr_list -> @@ -1167,13 +1167,13 @@ and transl_record loc env fields repres opt_init_expr = match repres with | Record_float_unused -> assert false | Record_regular | Record_optional_labels _ -> - Pfield (i, !Lambda.fld_record lbl) + Pfield (i, Lambda.fld_record lbl) | Record_inlined _ -> - Pfield (i, Fld_record_inline { name = lbl.lbl_name }) + Pfield (i, Lambda.fld_record_inline lbl) | Record_unboxed _ -> assert false | Record_extension -> Pfield - (i + 1, Fld_record_extension { name = lbl.lbl_name }) + (i + 1, Lambda.fld_record_extension lbl) in Lprim (access, [ Lvar init_id ], loc) | Overridden (_lid, expr) -> transl_exp expr) @@ -1193,14 +1193,14 @@ and transl_record loc env fields repres opt_init_expr = | Record_float_unused -> assert false | Record_regular -> Lconst - (Const_block (!Lambda.blk_record fields mut Record_regular, cl)) + (Const_block (Lambda.blk_record fields mut Record_regular, cl)) | Record_optional_labels _ -> Lconst - (Const_block (!Lambda.blk_record fields mut Record_optional, cl)) + (Const_block (Lambda.blk_record fields mut Record_optional, cl)) | Record_inlined { tag; name; num_nonconsts; optional_labels; attrs } -> Lconst (Const_block - ( !Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag ~attrs + ( Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag ~attrs mut, cl )) | Record_unboxed _ -> @@ -1210,19 +1210,19 @@ and transl_record loc env fields repres opt_init_expr = match repres with | Record_regular -> Lprim - ( Pmakeblock (!Lambda.blk_record fields mut Record_regular), + ( Pmakeblock (Lambda.blk_record fields mut Record_regular), ll, loc ) | Record_optional_labels _ -> Lprim - ( Pmakeblock (!Lambda.blk_record fields mut Record_optional), + ( Pmakeblock (Lambda.blk_record fields mut Record_optional), ll, loc ) | Record_float_unused -> assert false | Record_inlined { tag; name; num_nonconsts; optional_labels; attrs } -> Lprim ( Pmakeblock - (!Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag ~attrs + (Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag ~attrs mut), ll, loc ) @@ -1237,7 +1237,7 @@ and transl_record loc env fields repres opt_init_expr = in let slot = transl_extension_path env path in Lprim - ( Pmakeblock (!Lambda.blk_record_ext fields mut), + ( Pmakeblock (Lambda.blk_record_ext fields mut), slot :: ll, loc )) in @@ -1257,13 +1257,13 @@ and transl_record loc env fields repres opt_init_expr = match repres with | Record_float_unused -> assert false | Record_regular | Record_optional_labels _ -> - Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl) + Psetfield (lbl.lbl_pos, Lambda.fld_record_set lbl) | Record_inlined _ -> - Psetfield (lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name) + Psetfield (lbl.lbl_pos, Lambda.fld_record_inline_set lbl) | Record_unboxed _ -> assert false | Record_extension -> Psetfield - (lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name) + (lbl.lbl_pos + 1, Lambda.fld_record_extension_set lbl) in Lsequence (Lprim (upd, [ Lvar copy_id; transl_exp expr ], loc), cont) diff --git a/jscomp/test/as_inline_record_test.js b/jscomp/test/as_inline_record_test.js index c0de1fbe9d..9518636755 100644 --- a/jscomp/test/as_inline_record_test.js +++ b/jscomp/test/as_inline_record_test.js @@ -6,10 +6,18 @@ function getName(t) { return t.renamed; } +function getName$p(t) { + return t.renamed; +} + function getAge(t) { return t.age; } +function getAge$p(t) { + return t.age; +} + var user = { TAG: "User", renamed: "Corentin", @@ -18,5 +26,7 @@ var user = { exports.user = user; exports.getName = getName; +exports.getName$p = getName$p; exports.getAge = getAge; +exports.getAge$p = getAge$p; /* No side effect */ diff --git a/jscomp/test/as_inline_record_test.res b/jscomp/test/as_inline_record_test.res index 1e9e751f2c..c5cb51648a 100644 --- a/jscomp/test/as_inline_record_test.res +++ b/jscomp/test/as_inline_record_test.res @@ -12,7 +12,17 @@ let getName = t => | User({name}) => name } +let getName' = t => + switch t { + | User(u) => u.name + } + let getAge = t => switch t { | User({age}) => age } + +let getAge' = t => + switch t { + | User(u) => u.age + } \ No newline at end of file From 3151d66fedc23560e9cd1ef0f969c53b257e9a44 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 20 Jan 2024 10:19:43 +0100 Subject: [PATCH 09/21] Improve error message for missing label(s) in function application (#6576) --- CHANGELOG.md | 4 ++++ .../super_errors/expected/missing_label.res.expected | 10 ++++++++++ .../super_errors/expected/missing_labels.res.expected | 10 ++++++++++ .../super_errors/fixtures/missing_label.res | 3 +++ .../super_errors/fixtures/missing_labels.res | 3 +++ jscomp/ml/typecore.ml | 8 ++++++-- 6 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 jscomp/build_tests/super_errors/expected/missing_label.res.expected create mode 100644 jscomp/build_tests/super_errors/expected/missing_labels.res.expected create mode 100644 jscomp/build_tests/super_errors/fixtures/missing_label.res create mode 100644 jscomp/build_tests/super_errors/fixtures/missing_labels.res diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a9e57525..c2b2d765f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ - Fixed issue with coercions sometimes raising a `Not_found` instead of giving a proper error message. https://github.com/rescript-lang/rescript-compiler/pull/6574 - Fix issue with recursive modules and uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6575 +#### :nail_care: Polish + +- Improve error message for missing label(s) in function application. https://github.com/rescript-lang/rescript-compiler/pull/6576 + # 11.0.0 No changes compared to rc.9. diff --git a/jscomp/build_tests/super_errors/expected/missing_label.res.expected b/jscomp/build_tests/super_errors/expected/missing_label.res.expected new file mode 100644 index 0000000000..cc693a3312 --- /dev/null +++ b/jscomp/build_tests/super_errors/expected/missing_label.res.expected @@ -0,0 +1,10 @@ + + We've found a bug for you! + /.../fixtures/missing_label.res:3:9 + + 1 │ let f = (~a) => a ++ "" + 2 │ + 3 │ let _ = f("") + 4 │ + + Label ~a was omitted in the application of this labeled function. \ No newline at end of file diff --git a/jscomp/build_tests/super_errors/expected/missing_labels.res.expected b/jscomp/build_tests/super_errors/expected/missing_labels.res.expected new file mode 100644 index 0000000000..3783b11ef5 --- /dev/null +++ b/jscomp/build_tests/super_errors/expected/missing_labels.res.expected @@ -0,0 +1,10 @@ + + We've found a bug for you! + /.../fixtures/missing_labels.res:3:9 + + 1 │ let f = (~a, ~b) => a ++ b + 2 │ + 3 │ let _ = f("", "") + 4 │ + + Labels ~a, ~b were omitted in the application of this labeled function. \ No newline at end of file diff --git a/jscomp/build_tests/super_errors/fixtures/missing_label.res b/jscomp/build_tests/super_errors/fixtures/missing_label.res new file mode 100644 index 0000000000..f67eb4692d --- /dev/null +++ b/jscomp/build_tests/super_errors/fixtures/missing_label.res @@ -0,0 +1,3 @@ +let f = (~a) => a ++ "" + +let _ = f("") diff --git a/jscomp/build_tests/super_errors/fixtures/missing_labels.res b/jscomp/build_tests/super_errors/fixtures/missing_labels.res new file mode 100644 index 0000000000..9953d572d7 --- /dev/null +++ b/jscomp/build_tests/super_errors/fixtures/missing_labels.res @@ -0,0 +1,3 @@ +let f = (~a, ~b) => a ++ b + +let _ = f("", "") diff --git a/jscomp/ml/typecore.ml b/jscomp/ml/typecore.ml index 77b5a748af..59ded57213 100644 --- a/jscomp/ml/typecore.ml +++ b/jscomp/ml/typecore.ml @@ -4056,9 +4056,13 @@ let report_error env ppf = function | Illegal_letrec_pat -> fprintf ppf "Only variables are allowed as left-hand side of `let rec'" + | Labels_omitted [label] -> + fprintf ppf "Label ~%s was omitted in the application of this labeled function." + label | Labels_omitted labels -> - fprintf ppf "For labeled function, labels %s were omitted in the application of this function." - (String.concat ", " labels) + let labelsString = labels |> List.map(fun label -> "~" ^ label) |> String.concat ", " in + fprintf ppf "Labels %s were omitted in the application of this labeled function." + labelsString | Empty_record_literal -> fprintf ppf "Empty record literal {} should be type annotated or used in a record context." | Uncurried_arity_mismatch (typ, arity, args) -> From 76f993a3c0a0ec4df7a0acc0c982045af7bb9ba4 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 20 Jan 2024 10:21:24 +0100 Subject: [PATCH 10/21] ciTest.js: remove unused themeTest (#6577) --- scripts/ciTest.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/ciTest.js b/scripts/ciTest.js index b1639e893e..9716c139b6 100644 --- a/scripts/ciTest.js +++ b/scripts/ciTest.js @@ -7,7 +7,6 @@ var duneBinDir = require("./dune").duneBinDir; var ounitTest = false; var mochaTest = false; -var themeTest = false; var bsbTest = false; var formatTest = false; var all = false; @@ -20,10 +19,6 @@ if (process.argv.includes("-mocha")) { mochaTest = true; } -if (process.argv.includes("-theme")) { - themeTest = true; -} - if (process.argv.includes("-bsb")) { bsbTest = true; } @@ -38,7 +33,6 @@ if (process.argv.includes("-all")) { if (all) { ounitTest = true; mochaTest = true; - themeTest = true; bsbTest = true; formatTest = true; } From f0ef0efe51c96c5f5e4e838c8213b4a0ea518b48 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 20 Jan 2024 12:35:12 +0100 Subject: [PATCH 11/21] Update changelog (prepare for 11.0.1 release) (#6578) --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b2d765f9..5ec586a60b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,11 @@ > - :house: [Internal] > - :nail_care: [Polish] -# 11.0.1 (Unreleased) +# 11.0.1 #### :bug: Bug Fix -- Renamed inline record fields : fix renamed field access in inline records https://github.com/rescript-lang/rescript-compiler/pull/6551 +- Renamed inline record fields: fix renamed field access in inline records. https://github.com/rescript-lang/rescript-compiler/pull/6551 - Fixed issue with coercions sometimes raising a `Not_found` instead of giving a proper error message. https://github.com/rescript-lang/rescript-compiler/pull/6574 - Fix issue with recursive modules and uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6575 From b18a16b4a07e47ae1abcc7943d727629041600e2 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 20 Jan 2024 15:15:18 +0100 Subject: [PATCH 12/21] Set version to 11.0.2 (#6580) --- CHANGELOG.md | 2 ++ jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec586a60b..34920d3ea2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.0.2 (Unreleased) + # 11.0.1 #### :bug: Bug Fix diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index d4d7fcfb8f..05f0560905 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.0.1" +let version = "11.0.2" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index eb6013df1f..d3bdfba9a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.0.1", + "version": "11.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.0.1", + "version": "11.0.2", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index 64d792efc7..fcfd6a96fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.0.1", + "version": "11.0.2", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index 6d9507b846..a6e203c130 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.0.1", + "version": "11.0.2", "keywords": [ "rescript", "stdlib", From 9f81707cf730f9eb111b47eb384252e43de81388 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Tue, 23 Jan 2024 10:00:38 +0100 Subject: [PATCH 13/21] Fix typo: Utililites -> Utilities (#6581) --- jscomp/others/belt_Array.resi | 2 +- jscomp/others/belt_Float.res | 2 +- jscomp/others/belt_Int.res | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jscomp/others/belt_Array.resi b/jscomp/others/belt_Array.resi index 01a7f50934..eb8109887b 100644 --- a/jscomp/others/belt_Array.resi +++ b/jscomp/others/belt_Array.resi @@ -13,7 +13,7 @@ /* Adapted significantly by Authors of ReScript */ /*** -Utililites for `Array` functions. +Utilities for `Array` functions. ### Note about index syntax diff --git a/jscomp/others/belt_Float.res b/jscomp/others/belt_Float.res index 6bb704df88..a30e295044 100644 --- a/jscomp/others/belt_Float.res +++ b/jscomp/others/belt_Float.res @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*** [`Belt.Float`]() - Utililites for Float + Utilities for Float */ @val external isNaN: float => bool = "isNaN" diff --git a/jscomp/others/belt_Int.res b/jscomp/others/belt_Int.res index ad8e9fea52..fdf14235eb 100644 --- a/jscomp/others/belt_Int.res +++ b/jscomp/others/belt_Int.res @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*** [`Belt.Int`]() - Utililites for Int + Utilities for Int */ @val external isNaN: int => bool = "isNaN" From 6fa3289ba2ebe77ad8bb209ae419ccfc1feadec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Thu, 25 Jan 2024 14:49:51 +0100 Subject: [PATCH 14/21] support tagged templates (#6250) * support tagged template in rescript and allow to bind to JS tagged templates using @taggedTemplate annotation * Set version to 11.1.0 * add tagged templates to changelog This work was originally based on kevinbarabash/rescript-compiler#2 --- CHANGELOG.md | 6 +- jscomp/common/bs_version.ml | 2 +- jscomp/core/j.ml | 1 + jscomp/core/js_analyzer.ml | 4 +- jscomp/core/js_dump.ml | 19 +++ jscomp/core/js_exp_make.ml | 3 + jscomp/core/js_exp_make.mli | 2 + jscomp/core/js_fold.ml | 5 + jscomp/core/js_record_fold.ml | 5 + jscomp/core/js_record_iter.ml | 4 + jscomp/core/js_record_map.ml | 5 + jscomp/core/lam_compile_external_call.ml | 12 +- jscomp/frontend/ast_external_process.ml | 23 ++- jscomp/frontend/external_ffi_types.ml | 5 +- jscomp/frontend/external_ffi_types.mli | 1 + jscomp/syntax/src/res_core.ml | 138 +++++++++++------- jscomp/syntax/src/res_parsetree_viewer.ml | 14 ++ jscomp/syntax/src/res_parsetree_viewer.mli | 1 + jscomp/syntax/src/res_printer.ml | 53 ++++++- .../printer/other/expected/string.res.txt | 2 + jscomp/syntax/tests/printer/other/string.res | 2 + jscomp/test/build.ninja | 4 +- jscomp/test/tagged_template_lib.js | 12 ++ jscomp/test/tagged_template_test.js | 76 ++++++++++ jscomp/test/tagged_template_test.res | 46 ++++++ jscomp/test/tagged_template_test.resi | 0 package-lock.json | 4 +- package.json | 2 +- packages/std/package.json | 2 +- 29 files changed, 390 insertions(+), 63 deletions(-) create mode 100644 jscomp/test/tagged_template_lib.js create mode 100644 jscomp/test/tagged_template_test.js create mode 100644 jscomp/test/tagged_template_test.res create mode 100644 jscomp/test/tagged_template_test.resi diff --git a/CHANGELOG.md b/CHANGELOG.md index 34920d3ea2..a8e2b13544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,11 @@ > - :house: [Internal] > - :nail_care: [Polish] -# 11.0.2 (Unreleased) +# 11.1.0 (Unreleased) + +#### :rocket: New Feature + +- experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 # 11.0.1 diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index 05f0560905..a7dba66da6 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.0.2" +let version = "11.1.0" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/jscomp/core/j.ml b/jscomp/core/j.ml index 2d3e9329bc..acbdc06998 100644 --- a/jscomp/core/j.ml +++ b/jscomp/core/j.ml @@ -115,6 +115,7 @@ and expression_desc = This can be constructed either in a static way [E.array_index_by_int] or a dynamic way [E.array_index] *) + | Tagged_template of expression * expression list * expression list | Static_index of expression * string * int32 option (* The third argument bool indicates whether we should print it as diff --git a/jscomp/core/js_analyzer.ml b/jscomp/core/js_analyzer.ml index d2de7d61bc..233050d0d9 100644 --- a/jscomp/core/js_analyzer.ml +++ b/jscomp/core/js_analyzer.ml @@ -103,6 +103,8 @@ let rec no_side_effect_expression_desc (x : J.expression_desc) = | String_append (a, b) | Seq (a, b) -> no_side_effect a && no_side_effect b | Length (e, _) | Caml_block_tag (e, _) | Typeof e -> no_side_effect e | Bin (op, a, b) -> op <> Eq && no_side_effect a && no_side_effect b + | Tagged_template (call_expr, strings, values) -> no_side_effect call_expr && + Ext_list.for_all strings no_side_effect && Ext_list.for_all values no_side_effect | Js_not _ | Cond _ | FlatCall _ | Call _ | New _ | Raw_js_code _ (* actually true? *) -> false @@ -204,7 +206,7 @@ let rec eq_expression ({ expression_desc = x0 } : J.expression) | _ -> false) | Length _ | Is_null_or_undefined _ | String_append _ | Typeof _ | Js_not _ | Cond _ | FlatCall _ | New _ | Fun _ | Raw_js_code _ | Array _ - | Caml_block_tag _ | Object _ + | Caml_block_tag _ | Object _ | Tagged_template _ | Number (Uint _) -> false | Await _ -> false diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index c0bcdfbda1..09514211bc 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -165,6 +165,7 @@ let exp_need_paren (e : J.expression) = | Js_not _ | Bool _ | New _ -> false | Await _ -> false + | Tagged_template _ -> false let comma_idents (cxt : cxt) f ls = iter_lst cxt f ls Ext_pp_scope.ident comma @@ -596,6 +597,24 @@ and expression_desc cxt ~(level : int) f x : cxt = P.string f L.null; comma_sp f; expression ~level:1 cxt f el)) + | Tagged_template (callExpr, stringArgs, valueArgs) -> + let cxt = expression cxt ~level f callExpr in + P.string f "`"; + let rec aux cxt xs ys = match xs, ys with + | [], [] -> () + | [{J.expression_desc = Str { txt; _ }}], [] -> + P.string f txt + | {J.expression_desc = Str { txt; _ }} :: x_rest, y :: y_rest -> + P.string f txt; + P.string f "${"; + let cxt = expression cxt ~level f y in + P.string f "}"; + aux cxt x_rest y_rest + | _ -> assert false + in + aux cxt stringArgs valueArgs; + P.string f "`"; + cxt | String_index (a, b) -> P.group f 1 (fun _ -> let cxt = expression ~level:15 cxt f a in diff --git a/jscomp/core/js_exp_make.ml b/jscomp/core/js_exp_make.ml index 10e9e93929..7821d6dd3e 100644 --- a/jscomp/core/js_exp_make.ml +++ b/jscomp/core/js_exp_make.ml @@ -72,6 +72,9 @@ let call ?comment ~info e0 args : t = let flat_call ?comment e0 es : t = { expression_desc = FlatCall (e0, es); comment } +let tagged_template ?comment callExpr stringArgs valueArgs : t = + { expression_desc = Tagged_template (callExpr, stringArgs, valueArgs); comment } + let runtime_var_dot ?comment (x : string) (e1 : string) : J.expression = { expression_desc = diff --git a/jscomp/core/js_exp_make.mli b/jscomp/core/js_exp_make.mli index 9bcdd5549a..a267c118e1 100644 --- a/jscomp/core/js_exp_make.mli +++ b/jscomp/core/js_exp_make.mli @@ -279,6 +279,8 @@ val call : ?comment:string -> info:Js_call_info.t -> t -> t list -> t val flat_call : ?comment:string -> t -> t -> t +val tagged_template : ?comment:string -> t -> t list -> t list -> t + val new_ : ?comment:string -> J.expression -> J.expression list -> t val array : ?comment:string -> J.mutable_flag -> J.expression list -> t diff --git a/jscomp/core/js_fold.ml b/jscomp/core/js_fold.ml index fd4eba1356..506b6d5a44 100644 --- a/jscomp/core/js_fold.ml +++ b/jscomp/core/js_fold.ml @@ -124,6 +124,11 @@ class fold = let _self = _self#expression _x0 in let _self = list (fun _self -> _self#expression) _self _x1 in _self + | Tagged_template (_x0, _x1, _x2) -> + let _self = _self#expression _x0 in + let _self = list (fun _self -> _self#expression) _self _x1 in + let _self = list (fun _self -> _self#expression) _self _x2 in + _self | String_index (_x0, _x1) -> let _self = _self#expression _x0 in let _self = _self#expression _x1 in diff --git a/jscomp/core/js_record_fold.ml b/jscomp/core/js_record_fold.ml index 86117cbcf7..b92ca551ad 100644 --- a/jscomp/core/js_record_fold.ml +++ b/jscomp/core/js_record_fold.ml @@ -130,6 +130,11 @@ let expression_desc : 'a. ('a, expression_desc) fn = let st = _self.expression _self st _x0 in let st = list _self.expression _self st _x1 in st + | Tagged_template (_xo, _x1, _x2) -> + let st = _self.expression _self st _xo in + let st = list _self.expression _self st _x1 in + let st = list _self.expression _self st _x2 in + st | String_index (_x0, _x1) -> let st = _self.expression _self st _x0 in let st = _self.expression _self st _x1 in diff --git a/jscomp/core/js_record_iter.ml b/jscomp/core/js_record_iter.ml index d0f523ed7e..cbbc9f41e2 100644 --- a/jscomp/core/js_record_iter.ml +++ b/jscomp/core/js_record_iter.ml @@ -107,6 +107,10 @@ let expression_desc : expression_desc fn = | Call (_x0, _x1, _x2) -> _self.expression _self _x0; list _self.expression _self _x1 + | Tagged_template (_x0, _x1, _x2) -> + _self.expression _self _x0; + list _self.expression _self _x1; + list _self.expression _self _x2 | String_index (_x0, _x1) -> _self.expression _self _x0; _self.expression _self _x1 diff --git a/jscomp/core/js_record_map.ml b/jscomp/core/js_record_map.ml index 371d54eb6a..c7d0cdfa62 100644 --- a/jscomp/core/js_record_map.ml +++ b/jscomp/core/js_record_map.ml @@ -130,6 +130,11 @@ let expression_desc : expression_desc fn = let _x0 = _self.expression _self _x0 in let _x1 = list _self.expression _self _x1 in Call (_x0, _x1, _x2) + | Tagged_template (_x0, _x1, _x2) -> + let _x0 = _self.expression _self _x0 in + let _x1 = list _self.expression _self _x1 in + let _x2 = list _self.expression _self _x2 in + Tagged_template (_x0, _x1, _x2) | String_index (_x0, _x1) -> let _x0 = _self.expression _self _x0 in let _x1 = _self.expression _self _x1 in diff --git a/jscomp/core/lam_compile_external_call.ml b/jscomp/core/lam_compile_external_call.ml index fea98b5b6b..6d288e0212 100644 --- a/jscomp/core/lam_compile_external_call.ml +++ b/jscomp/core/lam_compile_external_call.ml @@ -252,7 +252,17 @@ let translate_scoped_access scopes obj = let translate_ffi (cxt : Lam_compile_context.t) arg_types (ffi : External_ffi_types.external_spec) (args : J.expression list) = match ffi with - | Js_call { external_module_name = module_name; name = fn; splice; scopes } -> + | Js_call { external_module_name; name; splice; scopes; tagged_template = true } -> + let fn = translate_scoped_module_val external_module_name name scopes in + (match args with + | [ stringArgs; valueArgs ] -> ( + match (stringArgs, valueArgs) with + | ({expression_desc = Array (strings, _); _}, {expression_desc = Array (values, _); _}) -> + E.tagged_template fn strings values + | _ -> assert false + ) + | _ -> assert false) + | Js_call { external_module_name = module_name; name = fn; splice; scopes; tagged_template = false } -> let fn = translate_scoped_module_val module_name fn scopes in if splice then let args, eff, dynamic = assemble_args_has_splice arg_types args in diff --git a/jscomp/frontend/ast_external_process.ml b/jscomp/frontend/ast_external_process.ml index b122b56cfc..a678d05098 100644 --- a/jscomp/frontend/ast_external_process.ml +++ b/jscomp/frontend/ast_external_process.ml @@ -184,6 +184,7 @@ type external_desc = { get_name: bundle_source option; mk_obj: bool; return_wrapper: External_ffi_types.return_wrapper; + tagged_template: bool; } let init_st = @@ -202,6 +203,7 @@ let init_st = get_name = None; mk_obj = false; return_wrapper = Return_unset; + tagged_template = false; } let return_wrapper loc (txt : string) : External_ffi_types.return_wrapper = @@ -291,6 +293,7 @@ let parse_external_attributes (no_arguments : bool) (prim_name_check : string) between unset/set *) | scopes -> {st with scopes}) + | "taggedTemplate" -> {st with splice = true; tagged_template = true} | "bs.splice" | "bs.variadic" | "variadic" -> {st with splice = true} | "bs.send" | "send" -> {st with val_send = Some (name_from_payload_or_prim ~loc payload)} @@ -366,6 +369,7 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string) get_name = None; get_index = false; return_wrapper = Return_unset; + tagged_template = _; set_index = false; mk_obj = _; scopes = @@ -564,6 +568,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) get_name = None; return_wrapper = _; mk_obj = _; + tagged_template = _; } -> if arg_type_specs_length = 3 then Js_set_index {js_set_index_scopes = scopes} @@ -588,6 +593,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) set_index = false; mk_obj = _; return_wrapper = _; + tagged_template = _; } -> if arg_type_specs_length = 2 then Js_get_index {js_get_index_scopes = scopes} @@ -614,6 +620,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) set_index = false; return_wrapper = _; mk_obj = _; + tagged_template = _; } -> ( match (arg_types_ty, new_name, val_name) with | [], None, _ -> Js_module_as_var external_module_name @@ -655,6 +662,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) mk_obj = _; (* mk_obj is always false *) return_wrapper = _; + tagged_template; } -> let name = prim_name_or_pval_prim.name in if arg_type_specs_length = 0 then @@ -665,7 +673,9 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) FIXME: splice is not supported here *) Js_var {name; external_module_name = None; scopes} - else Js_call {splice; name; external_module_name = None; scopes} + else + Js_call + {splice; name; external_module_name = None; scopes; tagged_template} | { call_name = Some {name; source = _}; splice; @@ -681,6 +691,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) get_name = None; mk_obj = _; return_wrapper = _; + tagged_template; } -> if arg_type_specs_length = 0 then (* @@ -690,7 +701,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) *) Js_var {name; external_module_name; scopes} (*FIXME: splice is not supported here *) - else Js_call {splice; name; external_module_name; scopes} + else Js_call {splice; name; external_module_name; scopes; tagged_template} | {call_name = Some _; _} -> Bs_syntaxerr.err loc (Conflict_ffi_attribute "Attribute found that conflicts with %@val") @@ -709,6 +720,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) return_wrapper = _; splice = false; scopes; + tagged_template = _; } -> (* if no_arguments --> @@ -735,6 +747,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) get_name = None; mk_obj = _; return_wrapper = _; + tagged_template; } -> let name = prim_name_or_pval_prim.name in if arg_type_specs_length = 0 then @@ -744,7 +757,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) ]} *) Js_var {name; external_module_name; scopes} - else Js_call {splice; name; external_module_name; scopes} + else Js_call {splice; name; external_module_name; scopes; tagged_template} | { val_send = Some {name; source = _}; splice; @@ -760,6 +773,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) external_module_name = None; mk_obj = _; return_wrapper = _; + tagged_template = _; } -> ( (* PR #2162 - since when we assemble arguments the first argument in [@@send] is ignored @@ -791,6 +805,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) scopes; mk_obj = _; return_wrapper = _; + tagged_template = _; } -> Js_new {name; external_module_name; splice; scopes} | {new_name = Some _; _} -> @@ -811,6 +826,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) mk_obj = _; return_wrapper = _; scopes; + tagged_template = _; } -> if arg_type_specs_length = 2 then Js_set {js_set_scopes = scopes; js_set_name = name} @@ -834,6 +850,7 @@ let external_desc_of_non_obj (loc : Location.t) (st : external_desc) mk_obj = _; return_wrapper = _; scopes; + tagged_template = _; } -> if arg_type_specs_length = 1 then Js_get {js_get_name = name; js_get_scopes = scopes} diff --git a/jscomp/frontend/external_ffi_types.ml b/jscomp/frontend/external_ffi_types.ml index 04ae5a170c..d9696cbec0 100644 --- a/jscomp/frontend/external_ffi_types.ml +++ b/jscomp/frontend/external_ffi_types.ml @@ -53,6 +53,7 @@ type external_spec = external_module_name: external_module_name option; splice: bool; scopes: string list; + tagged_template: bool; } | Js_send of {name: string; splice: bool; js_send_scopes: string list} (* we know it is a js send, but what will happen if you pass an ocaml objct *) @@ -188,7 +189,9 @@ let check_ffi ?loc ffi : bool = upgrade (is_package_relative_path external_module_name.bundle); check_external_module_name external_module_name | Js_new {external_module_name; name; splice = _; scopes = _} - | Js_call {external_module_name; name; splice = _; scopes = _} -> + | Js_call + {external_module_name; name; splice = _; scopes = _; tagged_template = _} + -> Ext_option.iter external_module_name (fun external_module_name -> upgrade (is_package_relative_path external_module_name.bundle)); Ext_option.iter external_module_name (fun name -> diff --git a/jscomp/frontend/external_ffi_types.mli b/jscomp/frontend/external_ffi_types.mli index a6e1202577..4c0d1c0b19 100644 --- a/jscomp/frontend/external_ffi_types.mli +++ b/jscomp/frontend/external_ffi_types.mli @@ -50,6 +50,7 @@ type external_spec = external_module_name: external_module_name option; splice: bool; scopes: string list; + tagged_template: bool; } | Js_send of {name: string; splice: bool; js_send_scopes: string list} (* we know it is a js send, but what will happen if you pass an ocaml objct *) diff --git a/jscomp/syntax/src/res_core.ml b/jscomp/syntax/src/res_core.ml index e410b36a01..d4fb3c4288 100644 --- a/jscomp/syntax/src/res_core.ml +++ b/jscomp/syntax/src/res_core.ml @@ -180,6 +180,9 @@ let suppressFragileMatchWarningAttr = let makeBracesAttr loc = (Location.mkloc "res.braces" loc, Parsetree.PStr []) let templateLiteralAttr = (Location.mknoloc "res.template", Parsetree.PStr []) +let taggedTemplateLiteralAttr = + (Location.mknoloc "res.taggedTemplate", Parsetree.PStr []) + let spreadAttr = (Location.mknoloc "res.spread", Parsetree.PStr []) type argument = { @@ -2255,6 +2258,66 @@ and parseBinaryExpr ?(context = OrdinaryExpr) ?a p prec = (* ) *) and parseTemplateExpr ?(prefix = "js") p = + let partPrefix = + (* we could stop treating js and j prefix as something special + for json, we would first need to remove @as(json`true`) feature *) + match prefix with + | "js" | "j" | "json" -> Some prefix + | _ -> None + in + let startPos = p.Parser.startPos in + + let parseParts p = + let rec aux acc = + let startPos = p.Parser.startPos in + Parser.nextTemplateLiteralToken p; + match p.token with + | TemplateTail (txt, lastPos) -> + Parser.next p; + let loc = mkLoc startPos lastPos in + let str = + Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] ~loc + (Pconst_string (txt, partPrefix)) + in + List.rev ((str, None) :: acc) + | TemplatePart (txt, lastPos) -> + Parser.next p; + let loc = mkLoc startPos lastPos in + let expr = parseExprBlock p in + let str = + Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] ~loc + (Pconst_string (txt, partPrefix)) + in + aux ((str, Some expr) :: acc) + | token -> + Parser.err p (Diagnostics.unexpected token p.breadcrumbs); + [] + in + aux [] + in + let parts = parseParts p in + let strings = List.map fst parts in + let values = Ext_list.filter_map parts snd in + let endPos = p.Parser.endPos in + + let genTaggedTemplateCall () = + let lident = Longident.Lident prefix in + let ident = + Ast_helper.Exp.ident ~attrs:[] ~loc:Location.none + (Location.mknoloc lident) + in + let strings_array = + Ast_helper.Exp.array ~attrs:[] ~loc:Location.none strings + in + let values_array = + Ast_helper.Exp.array ~attrs:[] ~loc:Location.none values + in + Ast_helper.Exp.apply + ~attrs:[taggedTemplateLiteralAttr] + ~loc:(mkLoc startPos endPos) ident + [(Nolabel, strings_array); (Nolabel, values_array)] + in + let hiddenOperator = let op = Location.mknoloc (Longident.Lident "^") in Ast_helper.Exp.ident op @@ -2264,56 +2327,33 @@ and parseTemplateExpr ?(prefix = "js") p = Ast_helper.Exp.apply ~attrs:[templateLiteralAttr] ~loc hiddenOperator [(Nolabel, e1); (Nolabel, e2)] in - let rec parseParts (acc : Parsetree.expression) = - let startPos = p.Parser.startPos in - Parser.nextTemplateLiteralToken p; - match p.token with - | TemplateTail (txt, lastPos) -> - Parser.next p; - let loc = mkLoc startPos lastPos in - let str = - Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] ~loc - (Pconst_string (txt, Some prefix)) - in - concat acc str - | TemplatePart (txt, lastPos) -> - Parser.next p; - let loc = mkLoc startPos lastPos in - let expr = parseExprBlock p in - let str = - Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] ~loc - (Pconst_string (txt, Some prefix)) - in - let next = - let a = concat acc str in - concat a expr - in - parseParts next - | token -> - Parser.err p (Diagnostics.unexpected token p.breadcrumbs); - Ast_helper.Exp.constant (Pconst_string ("", None)) - in - let startPos = p.startPos in - Parser.nextTemplateLiteralToken p; - match p.token with - | TemplateTail (txt, lastPos) -> - Parser.next p; - Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] - ~loc:(mkLoc startPos lastPos) - (Pconst_string (txt, Some prefix)) - | TemplatePart (txt, lastPos) -> - Parser.next p; - let constantLoc = mkLoc startPos lastPos in - let expr = parseExprBlock p in - let str = - Ast_helper.Exp.constant ~attrs:[templateLiteralAttr] ~loc:constantLoc - (Pconst_string (txt, Some prefix)) + let genInterpolatedString () = + let subparts = + List.flatten + (List.map + (fun part -> + match part with + | s, Some v -> [s; v] + | s, None -> [s]) + parts) in - let next = concat str expr in - parseParts next - | token -> - Parser.err p (Diagnostics.unexpected token p.breadcrumbs); - Ast_helper.Exp.constant (Pconst_string ("", None)) + let exprOption = + List.fold_left + (fun acc subpart -> + Some + (match acc with + | Some expr -> concat expr subpart + | None -> subpart)) + None subparts + in + match exprOption with + | Some expr -> expr + | None -> Ast_helper.Exp.constant (Pconst_string ("", None)) + in + + match prefix with + | "js" | "j" | "json" -> genInterpolatedString () + | _ -> genTaggedTemplateCall () (* Overparse: let f = a : int => a + 1, is it (a : int) => or (a): int => * Also overparse constraints: diff --git a/jscomp/syntax/src/res_parsetree_viewer.ml b/jscomp/syntax/src/res_parsetree_viewer.ml index 2e36a46e1c..8142ae33b6 100644 --- a/jscomp/syntax/src/res_parsetree_viewer.ml +++ b/jscomp/syntax/src/res_parsetree_viewer.ml @@ -634,6 +634,14 @@ let hasTemplateLiteralAttr attrs = | _ -> false) attrs +let hasTaggedTemplateLiteralAttr attrs = + List.exists + (fun attr -> + match attr with + | {Location.txt = "res.taggedTemplate"}, _ -> true + | _ -> false) + attrs + let isTemplateLiteral expr = match expr.pexp_desc with | Pexp_apply @@ -645,6 +653,12 @@ let isTemplateLiteral expr = | Pexp_constant _ when hasTemplateLiteralAttr expr.pexp_attributes -> true | _ -> false +let isTaggedTemplateLiteral expr = + match expr with + | {pexp_desc = Pexp_apply _; pexp_attributes = attrs} -> + hasTaggedTemplateLiteralAttr attrs + | _ -> false + let hasSpreadAttr attrs = List.exists (fun attr -> diff --git a/jscomp/syntax/src/res_parsetree_viewer.mli b/jscomp/syntax/src/res_parsetree_viewer.mli index 15ca9e150b..493b6e8518 100644 --- a/jscomp/syntax/src/res_parsetree_viewer.mli +++ b/jscomp/syntax/src/res_parsetree_viewer.mli @@ -137,6 +137,7 @@ val collectPatternsFromListConstruct : val isBlockExpr : Parsetree.expression -> bool val isTemplateLiteral : Parsetree.expression -> bool +val isTaggedTemplateLiteral : Parsetree.expression -> bool val hasTemplateLiteralAttr : Parsetree.attributes -> bool val isSpreadBeltListConcat : Parsetree.expression -> bool diff --git a/jscomp/syntax/src/res_printer.ml b/jscomp/syntax/src/res_printer.ml index 05484b02af..3b546e0513 100644 --- a/jscomp/syntax/src/res_printer.ml +++ b/jscomp/syntax/src/res_printer.ml @@ -2080,6 +2080,8 @@ and printValueBinding ~state ~recFlag (vb : Parsetree.value_binding) cmtTbl i = ParsetreeViewer.isBinaryExpression ifExpr || ParsetreeViewer.hasAttributes ifExpr.pexp_attributes | {pexp_desc = Pexp_newtype _} -> false + | {pexp_attributes = [({Location.txt = "res.taggedTemplate"}, _)]} -> + false | e -> ParsetreeViewer.hasAttributes e.pexp_attributes || ParsetreeViewer.isArrayAccess e) @@ -3047,11 +3049,13 @@ and printExpression ~state (e : Parsetree.expression) cmtTbl = | Pexp_apply (e, [(Nolabel, {pexp_desc = Pexp_array subLists})]) when ParsetreeViewer.isSpreadBeltListConcat e -> printBeltListConcatApply ~state subLists cmtTbl - | Pexp_apply _ -> + | Pexp_apply (callExpr, args) -> if ParsetreeViewer.isUnaryExpression e then printUnaryExpression ~state e cmtTbl else if ParsetreeViewer.isTemplateLiteral e then printTemplateLiteral ~state e cmtTbl + else if ParsetreeViewer.isTaggedTemplateLiteral e then + printTaggedTemplateLiteral ~state callExpr args cmtTbl else if ParsetreeViewer.isBinaryExpression e then printBinaryExpression ~state e cmtTbl else printPexpApply ~state e cmtTbl @@ -3474,6 +3478,53 @@ and printTemplateLiteral ~state expr cmtTbl = Doc.text "`"; ] +and printTaggedTemplateLiteral ~state callExpr args cmtTbl = + let stringsList, valuesList = + match args with + | [ + (_, {Parsetree.pexp_desc = Pexp_array strings}); + (_, {Parsetree.pexp_desc = Pexp_array values}); + ] -> + (strings, values) + | _ -> assert false + in + + let strings = + List.map + (fun x -> + match x with + | {Parsetree.pexp_desc = Pexp_constant (Pconst_string (txt, _))} -> + printStringContents txt + | _ -> assert false) + stringsList + in + + let values = + List.map + (fun x -> + Doc.concat + [ + Doc.text "${"; + printExpressionWithComments ~state x cmtTbl; + Doc.text "}"; + ]) + valuesList + in + + let process strings values = + let rec aux acc = function + | [], [] -> acc + | a_head :: a_rest, b -> aux (Doc.concat [acc; a_head]) (b, a_rest) + | _ -> assert false + in + aux Doc.nil (strings, values) + in + + let content : Doc.t = process strings values in + + let tag = printExpressionWithComments ~state callExpr cmtTbl in + Doc.concat [tag; Doc.text "`"; content; Doc.text "`"] + and printUnaryExpression ~state expr cmtTbl = let printUnaryOperator op = Doc.text diff --git a/jscomp/syntax/tests/printer/other/expected/string.res.txt b/jscomp/syntax/tests/printer/other/expected/string.res.txt index e05128e865..a0b671b08a 100644 --- a/jscomp/syntax/tests/printer/other/expected/string.res.txt +++ b/jscomp/syntax/tests/printer/other/expected/string.res.txt @@ -15,3 +15,5 @@ let s = "unknown escape \m111 as passed through" let heart = "\u2665" let smile = "emoji: \u{1F600}" + +let taggedTemplate = sql`select * from ${table} where id = ${id}` diff --git a/jscomp/syntax/tests/printer/other/string.res b/jscomp/syntax/tests/printer/other/string.res index e05128e865..8b6e7b234c 100644 --- a/jscomp/syntax/tests/printer/other/string.res +++ b/jscomp/syntax/tests/printer/other/string.res @@ -15,3 +15,5 @@ let s = "unknown escape \m111 as passed through" let heart = "\u2665" let smile = "emoji: \u{1F600}" + +let taggedTemplate = sql`select * from ${table} where id = ${id}` \ No newline at end of file diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index b752adee5b..024a7fab23 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -575,6 +575,8 @@ o test/submodule.cmi test/submodule.cmj : cc test/submodule.res | $bsc $stdlib r o test/submodule_call.cmi test/submodule_call.cmj : cc test/submodule_call.res | test/submodule.cmj $bsc $stdlib runtime o test/switch_case_test.cmi test/switch_case_test.cmj : cc test/switch_case_test.res | test/mt.cmj $bsc $stdlib runtime o test/switch_string.cmi test/switch_string.cmj : cc test/switch_string.res | $bsc $stdlib runtime +o test/tagged_template_test.cmj : cc_cmi test/tagged_template_test.res | test/mt.cmj test/tagged_template_test.cmi $bsc $stdlib runtime +o test/tagged_template_test.cmi : cc test/tagged_template_test.resi | $bsc $stdlib runtime o test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj : cc test/tailcall_inline_test.res | test/mt.cmj $bsc $stdlib runtime o test/template.cmi test/template.cmj : cc test/template.res | $bsc $stdlib runtime o test/test.cmi test/test.cmj : cc test/test.res | $bsc $stdlib runtime @@ -717,4 +719,4 @@ o test/update_record_test.cmi test/update_record_test.cmj : cc test/update_recor o test/variant.cmi test/variant.cmj : cc test/variant.res | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.res | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/tagged_template_lib.js b/jscomp/test/tagged_template_lib.js new file mode 100644 index 0000000000..5b4a6ed8af --- /dev/null +++ b/jscomp/test/tagged_template_lib.js @@ -0,0 +1,12 @@ +exports.sql = (strings, ...values) => { + let result = ""; + for (let i = 0; i < values.length; i++) { + result += strings[i] + "'" + values[i] + "'"; + } + result += strings[values.length]; + return result; +}; + +exports.length = (strings, ...values) => + strings.reduce((acc, curr) => acc + curr.length, 0) + + values.reduce((acc, curr) => acc + curr, 0); diff --git a/jscomp/test/tagged_template_test.js b/jscomp/test/tagged_template_test.js new file mode 100644 index 0000000000..c0a4687743 --- /dev/null +++ b/jscomp/test/tagged_template_test.js @@ -0,0 +1,76 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var Mt = require("./mt.js"); +var Caml_array = require("../../lib/js/caml_array.js"); +var Tagged_template_libJs = require("./tagged_template_lib.js"); + +var query = Tagged_template_libJs.sql`SELECT * FROM ${"users"} WHERE id = ${"5"}`; + +var length = Tagged_template_libJs.length`hello ${10} what's the total length? Is it ${3}?`; + +function foo(strings, values) { + var res = ""; + var valueCount = values.length; + for(var i = 0; i < valueCount; ++i){ + res = res + Caml_array.get(strings, i) + String(Math.imul(Caml_array.get(values, i), 10)); + } + return res + Caml_array.get(strings, valueCount); +} + +var res = foo([ + "| 5 * 10 = ", + " |" + ], [5]); + +Mt.from_pair_suites("tagged templates", { + hd: [ + "with externals, it should return a string with the correct interpolations", + (function (param) { + return { + TAG: "Eq", + _0: query, + _1: "SELECT * FROM 'users' WHERE id = '5'" + }; + }) + ], + tl: { + hd: [ + "with externals, it should return the result of the function", + (function (param) { + return { + TAG: "Eq", + _0: length, + _1: 52 + }; + }) + ], + tl: { + hd: [ + "with rescript function, it should return a string with the correct interpolations", + (function (param) { + return { + TAG: "Eq", + _0: res, + _1: "| 5 * 10 = 50 |" + }; + }) + ], + tl: { + hd: [ + "a template literal tagged with json should generate a regular string interpolation for now", + (function (param) { + return { + TAG: "Eq", + _0: "some random " + "string", + _1: "some random string" + }; + }) + ], + tl: /* [] */0 + } + } + } + }); + +/* query Not a pure module */ diff --git a/jscomp/test/tagged_template_test.res b/jscomp/test/tagged_template_test.res new file mode 100644 index 0000000000..72bd021790 --- /dev/null +++ b/jscomp/test/tagged_template_test.res @@ -0,0 +1,46 @@ +@module("./tagged_template_lib.js") @taggedTemplate +external sql: (array, array) => string = "sql" + +let table = "users" +let id = "5" + +let query = sql`SELECT * FROM ${table} WHERE id = ${id}` + +@module("./tagged_template_lib.js") @taggedTemplate +external length: (array, array) => int = "length" + +let extraLength = 10 +let length = length`hello ${extraLength} what's the total length? Is it ${3}?` + +let foo = (strings, values) => { + let res = ref("") + let valueCount = Array.length(values) + for i in 0 to valueCount - 1 { + res := res.contents ++ strings[i] ++ string_of_int(values[i] * 10) + } + res.contents ++ strings[valueCount] +} + +let res = foo`| 5 * 10 = ${5} |` + +Mt.from_pair_suites( + "tagged templates", + list{ + ( + "with externals, it should return a string with the correct interpolations", + () => Eq(query, "SELECT * FROM 'users' WHERE id = '5'"), + ), + ( + "with externals, it should return the result of the function", + () => Eq(length, 52), + ), + ( + "with rescript function, it should return a string with the correct interpolations", + () => Eq(res, "| 5 * 10 = 50 |"), + ), + ( + "a template literal tagged with json should generate a regular string interpolation for now", + () => Eq(json`some random ${"string"}`, "some random string"), + ), + }, +) \ No newline at end of file diff --git a/jscomp/test/tagged_template_test.resi b/jscomp/test/tagged_template_test.resi new file mode 100644 index 0000000000..e69de29bb2 diff --git a/package-lock.json b/package-lock.json index d3bdfba9a3..0dce2c204d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.0.2", + "version": "11.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.0.2", + "version": "11.1.0", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index fcfd6a96fd..b7c5ca3c7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.0.2", + "version": "11.1.0", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index a6e203c130..6d1d5a7ccd 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.0.2", + "version": "11.1.0", "keywords": [ "rescript", "stdlib", From 28b3b9a9dbaa293c9413d11eb881c73593c43cb9 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Fri, 26 Jan 2024 15:57:56 +0100 Subject: [PATCH 15/21] GenType: distinguish inline records from unary variant cases of object type. Fixes https://github.com/rescript-lang/rescript-compiler/issues/6584 --- CHANGELOG.md | 4 ++++ jscomp/gentype/EmitType.ml | 2 +- jscomp/gentype/GenTypeCommon.ml | 2 +- jscomp/gentype/TranslateTypeDeclarations.ml | 7 ++++--- .../typescript-react-example/package-lock.json | 2 +- .../typescript-react-example/src/NestedVariants.gen.tsx | 3 ++- .../typescript-react-example/src/NestedVariants.res | 2 ++ .../typescript-react-example/src/NestedVariants.res.js | 5 +++++ 8 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e2b13544..be4f2516c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 +#### :bug: Bug Fix + +- GenType: distinguish inline records from unary variant cases of object type. https://github.com/rescript-lang/rescript-compiler/pull/6586 + # 11.0.1 #### :bug: Bug Fix diff --git a/jscomp/gentype/EmitType.ml b/jscomp/gentype/EmitType.ml index 349d9215a0..faf600f530 100644 --- a/jscomp/gentype/EmitType.ml +++ b/jscomp/gentype/EmitType.ml @@ -203,7 +203,7 @@ let rec renderType ~(config : Config.t) ?(indent = None) ~typeNameIsInterface |> field ~name:(Runtime.jsVariantValue ~polymorphic); ] |> fields - | false, Object (_, flds) -> + | false, Object (Inline, flds) -> (* inlined record *) tagField :: flds |> fields | false, type_ -> diff --git a/jscomp/gentype/GenTypeCommon.ml b/jscomp/gentype/GenTypeCommon.ml index d7356e28c9..4581323aa2 100644 --- a/jscomp/gentype/GenTypeCommon.ml +++ b/jscomp/gentype/GenTypeCommon.ml @@ -62,7 +62,7 @@ let labelJSToString case = | IntLabel i -> i | StringLabel s -> s |> EmitText.quotes -type closedFlag = Open | Closed +type closedFlag = Open | Closed | Inline type type_ = | Array of type_ * mutable_ diff --git a/jscomp/gentype/TranslateTypeDeclarations.ml b/jscomp/gentype/TranslateTypeDeclarations.ml index 64e103fce7..07905ea092 100644 --- a/jscomp/gentype/TranslateTypeDeclarations.ml +++ b/jscomp/gentype/TranslateTypeDeclarations.ml @@ -85,7 +85,8 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver in {CodeItem.importTypes; exportFromTypeDeclaration} in - let translateLabelDeclarations ~recordRepresentation labelDeclarations = + let translateLabelDeclarations ?(inline = false) ~recordRepresentation + labelDeclarations = let isOptional l = match recordRepresentation with | Types.Record_optional_labels lbls -> List.mem l lbls @@ -131,7 +132,7 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver let type_ = match fields with | [field] when unboxedAnnotation -> field.type_ - | _ -> Object (Closed, fields) + | _ -> Object ((if inline then Inline else Closed), fields) in {TranslateTypeExprFromTypes.dependencies; type_} in @@ -244,7 +245,7 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver | Cstr_record labelDeclarations -> [ labelDeclarations - |> translateLabelDeclarations + |> translateLabelDeclarations ~inline:true ~recordRepresentation:Types.Record_regular; ] in diff --git a/jscomp/gentype_tests/typescript-react-example/package-lock.json b/jscomp/gentype_tests/typescript-react-example/package-lock.json index a322751c5e..5fdd739d29 100644 --- a/jscomp/gentype_tests/typescript-react-example/package-lock.json +++ b/jscomp/gentype_tests/typescript-react-example/package-lock.json @@ -24,7 +24,7 @@ }, "../../..": { "name": "rescript", - "version": "11.0.1", + "version": "11.1.0", "dev": true, "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", diff --git a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.gen.tsx b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.gen.tsx index 7775b7ea52..529c7e7fab 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.gen.tsx +++ b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.gen.tsx @@ -41,7 +41,8 @@ export type unboxedBinary = { TAG: "UB"; _0: typeD; _1: number }; export type inline = { TAG: "I"; readonly i: number; readonly j: number } | { TAG: "J"; readonly i: number; readonly j: number } - | { TAG: "K"; _0: number; _1: number }; + | { TAG: "K"; _0: number; _1: number } + | { TAG: "L"; _0: { readonly j: number; readonly i: number } }; export const makeVariant: () => typeL = NestedVariantsJS.makeVariant as any; diff --git a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res index 8b06ebb5f4..cb32d311fc 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res +++ b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res @@ -61,6 +61,7 @@ type inline = | I({i: int, j: int}) | J({i: int, j: int}) | K(int, int) + | L({"i": int, "j": int}) @genType let testBoxedBinary = (_: boxedBinary) => 34 @@ -74,5 +75,6 @@ let testInline = x => | I(q) => I({...q, i: q.i}) | J(q) => J(q) | K(a, b) => K(b, a) + | L(q) => L(q) } diff --git a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js index 96669d6b4e..81711cbe59 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js +++ b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js @@ -136,6 +136,11 @@ function testInline(x) { _0: x._1, _1: x._0 }; + case "L" : + return { + TAG: "L", + _0: x._0 + }; } } From b88e74ff1f4853c28567b1c5d5dd186720084961 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 29 Jan 2024 10:28:10 +0100 Subject: [PATCH 16/21] [RFC] Generic JSX transform (#6565) * rename, config, etc * generalize more * allow simplified @@jsxConfig * move to support react.component and generic jsx.component only * Revert "allow simplified @@jsxConfig" This reverts commit 7dcd21161dc3c0c562501b981f5f5d84f3bba293. * move fn * better name * changelog --- CHANGELOG.md | 3 +- jscomp/bsb/bsb_jsx.ml | 8 +- jscomp/bsb/bsb_ninja_rule.ml | 3 +- jscomp/bsc/rescript_compiler_main.ml | 1 - jscomp/common/js_config.ml | 5 +- jscomp/common/js_config.mli | 2 +- jscomp/frontend/ppx_entry.ml | 4 +- jscomp/syntax/cli/res_cli.ml | 4 +- .../{react_jsx_common.ml => jsx_common.ml} | 11 +- .../src/{reactjs_jsx_ppx.ml => jsx_ppx.ml} | 24 +-- .../src/{reactjs_jsx_ppx.mli => jsx_ppx.mli} | 0 .../src/{reactjs_jsx_v4.ml => jsx_v4.ml} | 190 +++++++++++------- jscomp/syntax/src/reactjs_jsx_v3.ml | 56 +++--- 13 files changed, 177 insertions(+), 134 deletions(-) rename jscomp/syntax/src/{react_jsx_common.ml => jsx_common.ml} (88%) rename jscomp/syntax/src/{reactjs_jsx_ppx.ml => jsx_ppx.ml} (88%) rename jscomp/syntax/src/{reactjs_jsx_ppx.mli => jsx_ppx.mli} (100%) rename jscomp/syntax/src/{reactjs_jsx_v4.ml => jsx_v4.ml} (90%) diff --git a/CHANGELOG.md b/CHANGELOG.md index be4f2516c5..81557b99d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ #### :rocket: New Feature -- experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 +- Experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 +- Experimental support for generic/custom JSX transforms. https://github.com/rescript-lang/rescript-compiler/pull/6565 #### :bug: Bug Fix diff --git a/jscomp/bsb/bsb_jsx.ml b/jscomp/bsb/bsb_jsx.ml index b4a66de189..b9fbd08661 100644 --- a/jscomp/bsb/bsb_jsx.ml +++ b/jscomp/bsb/bsb_jsx.ml @@ -1,5 +1,5 @@ type version = Jsx_v3 | Jsx_v4 -type module_ = React +type module_ = React | Generic of {moduleName: string} type mode = Classic | Automatic type dependencies = string list @@ -15,7 +15,7 @@ let encode_no_nl jsx = | None -> "" | Some Jsx_v3 -> "3" | Some Jsx_v4 -> "4") - ^ (match jsx.module_ with None -> "" | Some React -> "React") + ^ (match jsx.module_ with None -> "" | Some React -> "React" | Some Generic {moduleName} -> moduleName) ^ match jsx.mode with | None -> "" @@ -55,10 +55,10 @@ let from_map map = `Obj (fun m -> match m.?(Bsb_build_schemas.jsx_module) with - | Some (Str { loc; str }) -> ( + | Some (Str { str }) -> ( match str with | "react" -> module_ := Some React - | _ -> Bsb_exception.errorf ~loc "Unsupported jsx module %s" str) + | moduleName -> module_ := Some (Generic {moduleName})) | Some x -> Bsb_exception.config_error x "Unexpected input (jsx module name) for jsx module" diff --git a/jscomp/bsb/bsb_ninja_rule.ml b/jscomp/bsb/bsb_ninja_rule.ml index 829a8f5bfe..1103a3ac4c 100644 --- a/jscomp/bsb/bsb_ninja_rule.ml +++ b/jscomp/bsb/bsb_ninja_rule.ml @@ -169,7 +169,8 @@ let make_custom_rules ~(gentype_config : Bsb_config_types.gentype_config) | None, None -> ()); (match jsx.module_ with | None -> () - | Some React -> Ext_buffer.add_string buf " -bs-jsx-module react"); + | Some React -> Ext_buffer.add_string buf " -bs-jsx-module react" + | Some Generic {moduleName} -> Ext_buffer.add_string buf (" -bs-jsx-module " ^ moduleName)); (match jsx.mode with | None -> () | Some Classic -> Ext_buffer.add_string buf " -bs-jsx-mode classic" diff --git a/jscomp/bsc/rescript_compiler_main.ml b/jscomp/bsc/rescript_compiler_main.ml index 6a4d63173c..0307e1f708 100644 --- a/jscomp/bsc/rescript_compiler_main.ml +++ b/jscomp/bsc/rescript_compiler_main.ml @@ -251,7 +251,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array = "*internal* Set jsx version"; "-bs-jsx-module", string_call (fun i -> - (if i <> "react" then Bsc_args.bad_arg (" Not supported jsx-module : " ^ i)); Js_config.jsx_module := Js_config.jsx_module_of_string i), "*internal* Set jsx module"; diff --git a/jscomp/common/js_config.ml b/jscomp/common/js_config.ml index ef3ad90b60..7602c681e2 100644 --- a/jscomp/common/js_config.ml +++ b/jscomp/common/js_config.ml @@ -25,7 +25,7 @@ (** Browser is not set via command line only for internal use *) type jsx_version = Jsx_v3 | Jsx_v4 -type jsx_module = React +type jsx_module = React | Generic of {moduleName: string} type jsx_mode = Classic | Automatic let no_version_header = ref false @@ -64,6 +64,7 @@ let int_of_jsx_version = function let string_of_jsx_module = function | React -> "react" +| Generic {moduleName} -> moduleName let string_of_jsx_mode = function | Classic -> "classic" @@ -76,7 +77,7 @@ let jsx_version_of_int = function let jsx_module_of_string = function | "react" -> React -| _ -> React +| moduleName -> Generic {moduleName} let jsx_mode_of_string = function | "classic" -> Classic diff --git a/jscomp/common/js_config.mli b/jscomp/common/js_config.mli index f5df0349d3..fd9df5785a 100644 --- a/jscomp/common/js_config.mli +++ b/jscomp/common/js_config.mli @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) type jsx_version = Jsx_v3 | Jsx_v4 -type jsx_module = React +type jsx_module = React | Generic of {moduleName: string} type jsx_mode = Classic | Automatic (* val get_packages_info : diff --git a/jscomp/frontend/ppx_entry.ml b/jscomp/frontend/ppx_entry.ml index 7f73ef8414..67d50bb61c 100644 --- a/jscomp/frontend/ppx_entry.ml +++ b/jscomp/frontend/ppx_entry.ml @@ -35,7 +35,7 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature = let jsxVersion = int_of_jsx_version jsxVersion in let jsxModule = string_of_jsx_module !jsx_module in let jsxMode = string_of_jsx_mode !jsx_mode in - Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode ast + Jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode ast in if !Js_config.no_builtin_ppx then ast else @@ -55,7 +55,7 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure = let jsxVersion = int_of_jsx_version jsxVersion in let jsxModule = string_of_jsx_module !jsx_module in let jsxMode = string_of_jsx_mode !jsx_mode in - Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode ast + Jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode ast in if !Js_config.no_builtin_ppx then ast else diff --git a/jscomp/syntax/cli/res_cli.ml b/jscomp/syntax/cli/res_cli.ml index bcc4024259..23d9006f35 100644 --- a/jscomp/syntax/cli/res_cli.ml +++ b/jscomp/syntax/cli/res_cli.ml @@ -284,7 +284,7 @@ module CliArgProcessor = struct else exit 1) else let parsetree = - Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode + Jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode parseResult.parsetree in printEngine.printInterface ~width ~filename @@ -300,7 +300,7 @@ module CliArgProcessor = struct else exit 1) else let parsetree = - Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode + Jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode parseResult.parsetree in printEngine.printImplementation ~width ~filename diff --git a/jscomp/syntax/src/react_jsx_common.ml b/jscomp/syntax/src/jsx_common.ml similarity index 88% rename from jscomp/syntax/src/react_jsx_common.ml rename to jscomp/syntax/src/jsx_common.ml index 51c4711032..4281f0580a 100644 --- a/jscomp/syntax/src/react_jsx_common.ml +++ b/jscomp/syntax/src/jsx_common.ml @@ -6,11 +6,14 @@ type jsxConfig = { mutable module_: string; mutable mode: string; mutable nestedModules: string list; - mutable hasReactComponent: bool; + mutable hasComponent: bool; } (* Helper method to look up the [@react.component] attribute *) -let hasAttr (loc, _) = loc.txt = "react.component" +let hasAttr (loc, _) = + match loc.txt with + | "react.component" | "jsx.component" -> true + | _ -> false (* Iterate over the attributes and try to find the [@react.component] attribute *) let hasAttrOnBinding {pvb_attributes} = @@ -20,7 +23,7 @@ let coreTypeOfAttrs attributes = List.find_map (fun ({txt}, payload) -> match (txt, payload) with - | "react.component", PTyp coreType -> Some coreType + | ("react.component" | "jsx.component"), PTyp coreType -> Some coreType | _ -> None) attributes @@ -37,7 +40,7 @@ let typVarsOfCoreType {ptyp_desc} = let raiseError ~loc msg = Location.raise_errorf ~loc msg -let raiseErrorMultipleReactComponent ~loc = +let raiseErrorMultipleComponent ~loc = raiseError ~loc "Only one component definition is allowed for each module. Move to a \ submodule or other file if necessary." diff --git a/jscomp/syntax/src/reactjs_jsx_ppx.ml b/jscomp/syntax/src/jsx_ppx.ml similarity index 88% rename from jscomp/syntax/src/reactjs_jsx_ppx.ml rename to jscomp/syntax/src/jsx_ppx.ml index f6449a6cc1..e362a9c0a5 100644 --- a/jscomp/syntax/src/reactjs_jsx_ppx.ml +++ b/jscomp/syntax/src/jsx_ppx.ml @@ -50,8 +50,8 @@ let updateConfig config payload = let fields = getPayloadFields payload in (match getInt ~key:"version" fields with | None -> () - | Some i -> config.React_jsx_common.version <- i); - (match getString ~key:"module" fields with + | Some i -> config.Jsx_common.version <- i); + (match getString ~key:"module_" fields with | None -> () | Some s -> config.module_ <- s); match getString ~key:"mode" fields with @@ -68,7 +68,7 @@ let getMapper ~config = Reactjs_jsx_v3.jsxMapper ~config in let expr4, module_binding4, transformSignatureItem4, transformStructureItem4 = - Reactjs_jsx_v4.jsxMapper ~config + Jsx_v4.jsxMapper ~config in let expr mapper e = @@ -89,18 +89,18 @@ let getMapper ~config = version = config.version; module_ = config.module_; mode = config.mode; - hasReactComponent = config.hasReactComponent; + hasComponent = config.hasComponent; } in let restoreConfig oldConfig = - config.version <- oldConfig.React_jsx_common.version; + config.version <- oldConfig.Jsx_common.version; config.module_ <- oldConfig.module_; config.mode <- oldConfig.mode; - config.hasReactComponent <- oldConfig.hasReactComponent + config.hasComponent <- oldConfig.hasComponent in let signature mapper items = let oldConfig = saveConfig () in - config.hasReactComponent <- false; + config.hasComponent <- false; let result = List.map (fun item -> @@ -119,7 +119,7 @@ let getMapper ~config = in let structure mapper items = let oldConfig = saveConfig () in - config.hasReactComponent <- false; + config.hasComponent <- false; let result = List.map (fun item -> @@ -143,11 +143,11 @@ let rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode (code : Parsetree.structure) : Parsetree.structure = let config = { - React_jsx_common.version = jsxVersion; + Jsx_common.version = jsxVersion; module_ = jsxModule; mode = jsxMode; nestedModules = []; - hasReactComponent = false; + hasComponent = false; } in let mapper = getMapper ~config in @@ -157,11 +157,11 @@ let rewrite_signature ~jsxVersion ~jsxModule ~jsxMode (code : Parsetree.signature) : Parsetree.signature = let config = { - React_jsx_common.version = jsxVersion; + Jsx_common.version = jsxVersion; module_ = jsxModule; mode = jsxMode; nestedModules = []; - hasReactComponent = false; + hasComponent = false; } in let mapper = getMapper ~config in diff --git a/jscomp/syntax/src/reactjs_jsx_ppx.mli b/jscomp/syntax/src/jsx_ppx.mli similarity index 100% rename from jscomp/syntax/src/reactjs_jsx_ppx.mli rename to jscomp/syntax/src/jsx_ppx.mli diff --git a/jscomp/syntax/src/reactjs_jsx_v4.ml b/jscomp/syntax/src/jsx_v4.ml similarity index 90% rename from jscomp/syntax/src/reactjs_jsx_v4.ml rename to jscomp/syntax/src/jsx_v4.ml index e62054d80f..5246bbd31c 100644 --- a/jscomp/syntax/src/reactjs_jsx_v4.ml +++ b/jscomp/syntax/src/jsx_v4.ml @@ -4,6 +4,8 @@ open Asttypes open Parsetree open Longident +let moduleAccessName config = String.capitalize_ascii config.Jsx_common.module_ + let nolabel = Nolabel let labelled str = Labelled str @@ -27,7 +29,7 @@ let getLabel str = | Optional str | Labelled str -> str | Nolabel -> "" -let optionalAttrs = [React_jsx_common.optionalAttr] +let optionalAttrs = [Jsx_common.optionalAttr] let constantString ~loc str = Ast_helper.Exp.constant ~loc (Pconst_string (str, None)) @@ -93,7 +95,7 @@ let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> acc | (Nolabel, {pexp_loc}) :: _rest -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "JSX: found non-labelled argument before the last position" | arg :: rest -> allButLast_ rest (arg :: acc) in @@ -110,13 +112,16 @@ let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = | [(_, childrenExpr)], props -> (childrenExpr, if removeLastPositionUnit then allButLast props else props) | _ -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: somehow there's more than one `children` label" let merlinFocus = ({loc = Location.none; txt = "merlin.focus"}, PStr []) (* Helper method to filter out any attribute that isn't [@react.component] *) -let otherAttrsPure (loc, _) = loc.txt <> "react.component" +let otherAttrsPure (loc, _) = + match loc.txt with + | "react.component" | "jsx.component" -> false + | _ -> true (* Finds the name of the variable the binding is assigned to, otherwise raises Invalid_argument *) let rec getFnName binding = @@ -124,8 +129,8 @@ let rec getFnName binding = | {ppat_desc = Ppat_var {txt}} -> txt | {ppat_desc = Ppat_constraint (pat, _)} -> getFnName pat | {ppat_loc} -> - React_jsx_common.raiseError ~loc:ppat_loc - "react.component calls cannot be destructured." + Jsx_common.raiseError ~loc:ppat_loc + "JSX component calls cannot be destructured." let makeNewBinding binding expression newName = match binding with @@ -138,8 +143,8 @@ let makeNewBinding binding expression newName = pvb_attributes = [merlinFocus]; } | {pvb_loc} -> - React_jsx_common.raiseError ~loc:pvb_loc - "react.component calls cannot be destructured." + Jsx_common.raiseError ~loc:pvb_loc + "JSX component calls cannot be destructured." (* Lookup the filename from the location information on the AST node and turn it into a valid module identifier *) let filenameFromLoc (pstr_loc : Location.t) = @@ -184,7 +189,7 @@ let recordFromProps ~loc ~removeKey callArguments = | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> acc | (Nolabel, {pexp_loc}) :: _rest -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "JSX: found non-labelled argument before the last position" | ((Labelled txt, {pexp_loc}) as prop) :: rest | ((Optional txt, {pexp_loc}) as prop) :: rest -> @@ -192,7 +197,7 @@ let recordFromProps ~loc ~removeKey callArguments = match acc with | [] -> removeLastPositionUnitAux rest (prop :: acc) | _ -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "JSX: use {...p} {x: v} not {x: v} {...p} \n\ \ multiple spreads {...p} {...p} not allowed." else removeLastPositionUnitAux rest (prop :: acc) @@ -297,8 +302,7 @@ let makeLabelDecls namedTypeList = | hd :: tl -> if mem_label hd tl then let _, label, _, loc, _ = hd in - React_jsx_common.raiseError ~loc "JSX: found the duplicated prop `%s`" - label + Jsx_common.raiseError ~loc "JSX: found the duplicated prop `%s`" label else checkDuplicatedLabel tl in let () = namedTypeList |> List.rev |> checkDuplicatedLabel in @@ -374,13 +378,16 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc | ListLiteral expression -> ( (* this is a hack to support react components that introspect into their children *) childrenArg := Some expression; - match config.React_jsx_common.mode with + match config.Jsx_common.mode with | "automatic" -> [ ( labelled "children", Exp.apply (Exp.ident - {txt = Ldot (Lident "React", "array"); loc = Location.none}) + { + txt = Ldot (Lident (moduleAccessName config), "array"); + loc = Location.none; + }) [(Nolabel, expression)] ); ] | _ -> @@ -424,16 +431,31 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc match (!childrenArg, keyProp) with | None, key :: _ -> ( Exp.ident - {loc = Location.none; txt = Ldot (Lident "React", "jsxKeyed")}, + { + loc = Location.none; + txt = Ldot (Lident (moduleAccessName config), "jsxKeyed"); + }, [key; (nolabel, unitExpr ~loc:Location.none)] ) | None, [] -> - (Exp.ident {loc = Location.none; txt = Ldot (Lident "React", "jsx")}, []) + ( Exp.ident + { + loc = Location.none; + txt = Ldot (Lident (moduleAccessName config), "jsx"); + }, + [] ) | Some _, key :: _ -> ( Exp.ident - {loc = Location.none; txt = Ldot (Lident "React", "jsxsKeyed")}, + { + loc = Location.none; + txt = Ldot (Lident (moduleAccessName config), "jsxsKeyed"); + }, [key; (nolabel, unitExpr ~loc:Location.none)] ) | Some _, [] -> - ( Exp.ident {loc = Location.none; txt = Ldot (Lident "React", "jsxs")}, + ( Exp.ident + { + loc = Location.none; + txt = Ldot (Lident (moduleAccessName config), "jsxs"); + }, [] ) in Exp.apply ~loc:jsxExprLoc ~attrs jsxExpr @@ -474,9 +496,15 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs callArguments id = let componentNameExpr = constantString ~loc:callExprLoc id in - match config.React_jsx_common.mode with + match config.Jsx_common.mode with (* the new jsx transform *) | "automatic" -> + let elementBinding = + match moduleAccessName config with + | "React" -> Lident "ReactDOM" + | generic -> Ldot (Lident generic, "DOM") + in + let children, nonChildrenProps = extractChildren ~removeLastPositionUnit:true ~loc:jsxExprLoc callArguments in @@ -498,7 +526,7 @@ let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs Exp.apply ~attrs:optionalAttrs (Exp.ident { - txt = Ldot (Lident "ReactDOM", "someElement"); + txt = Ldot (elementBinding, "someElement"); loc = Location.none; }) [(Nolabel, children)] ); @@ -511,7 +539,10 @@ let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs ( labelled "children", Exp.apply (Exp.ident - {txt = Ldot (Lident "React", "array"); loc = Location.none}) + { + txt = Ldot (Lident (moduleAccessName config), "array"); + loc = Location.none; + }) [(Nolabel, expression)] ); ] in @@ -531,17 +562,16 @@ let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs match (!childrenArg, keyProp) with | None, key :: _ -> ( Exp.ident - {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxKeyed")}, + {loc = Location.none; txt = Ldot (elementBinding, "jsxKeyed")}, [key; (nolabel, unitExpr ~loc:Location.none)] ) | None, [] -> - ( Exp.ident {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsx")}, - [] ) + (Exp.ident {loc = Location.none; txt = Ldot (elementBinding, "jsx")}, []) | Some _, key :: _ -> ( Exp.ident - {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxsKeyed")}, + {loc = Location.none; txt = Ldot (elementBinding, "jsxsKeyed")}, [key; (nolabel, unitExpr ~loc:Location.none)] ) | Some _, [] -> - ( Exp.ident {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxs")}, + ( Exp.ident {loc = Location.none; txt = Ldot (elementBinding, "jsxs")}, [] ) in Exp.apply ~loc:jsxExprLoc ~attrs jsxExpr @@ -562,7 +592,7 @@ let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs "createDOMElementVariadic" (* [@JSX] div(~children= value), coming from
...(value)
*) | {pexp_loc} -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "A spread as a DOM element's children don't make sense written \ together. You can simply remove the spread." in @@ -601,11 +631,11 @@ let rec recursivelyTransformNamedArgsForMake expr args newtypes coreType = match expr.pexp_desc with (* TODO: make this show up with a loc. *) | Pexp_fun (Labelled "key", _, _, _) | Pexp_fun (Optional "key", _, _, _) -> - React_jsx_common.raiseError ~loc:expr.pexp_loc + Jsx_common.raiseError ~loc:expr.pexp_loc "Key cannot be accessed inside of a component. Don't worry - you can \ always key a component from its parent!" | Pexp_fun (Labelled "ref", _, _, _) | Pexp_fun (Optional "ref", _, _, _) -> - React_jsx_common.raiseError ~loc:expr.pexp_loc + Jsx_common.raiseError ~loc:expr.pexp_loc "Ref cannot be passed as a normal prop. Please use `forwardRef` API \ instead." | Pexp_fun (arg, default, pattern, expression) @@ -721,18 +751,18 @@ let argToConcreteType types (name, attrs, loc, type_) = let check_string_int_attribute_iter = let attribute _ ({txt; loc}, _) = if txt = "string" || txt = "int" then - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "@string and @int attributes not supported. See \ https://github.com/rescript-lang/rescript-compiler/issues/5724" in {Ast_iterator.default_iterator with attribute} -let checkMultipleReactComponents ~config ~loc = - (* If there is another @react.component, throw error *) - if config.React_jsx_common.hasReactComponent then - React_jsx_common.raiseErrorMultipleReactComponent ~loc - else config.hasReactComponent <- true +let checkMultipleComponents ~config ~loc = + (* If there is another component, throw error *) + if config.Jsx_common.hasComponent then + Jsx_common.raiseErrorMultipleComponent ~loc + else config.hasComponent <- true let modifiedBindingOld binding = let expression = binding.pvb_expr in @@ -757,9 +787,9 @@ let modifiedBindingOld binding = | {pexp_desc = Pexp_constraint (innerFunctionExpression, _typ)} -> spelunkForFunExpression innerFunctionExpression | {pexp_loc} -> - React_jsx_common.raiseError ~loc:pexp_loc - "react.component calls can only be on function definitions or \ - component wrappers (forwardRef, memo)." + Jsx_common.raiseError ~loc:pexp_loc + "JSX component calls can only be on function definitions or component \ + wrappers (forwardRef, memo)." in spelunkForFunExpression expression @@ -882,15 +912,13 @@ let vbMatchExpr namedArgList expr = aux (List.rev namedArgList) let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding = - if React_jsx_common.hasAttrOnBinding binding then ( - checkMultipleReactComponents ~config ~loc:pstr_loc; - let binding = React_jsx_common.removeArity binding in - let coreTypeOfAttr = - React_jsx_common.coreTypeOfAttrs binding.pvb_attributes - in + if Jsx_common.hasAttrOnBinding binding then ( + checkMultipleComponents ~config ~loc:pstr_loc; + let binding = Jsx_common.removeArity binding in + let coreTypeOfAttr = Jsx_common.coreTypeOfAttrs binding.pvb_attributes in let typVarsOfCoreType = coreTypeOfAttr - |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.map Jsx_common.typVarsOfCoreType |> Option.value ~default:[] in let bindingLoc = binding.pvb_loc in @@ -947,7 +975,7 @@ let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding = (Typ.constr (Location.mknoloc @@ Lident "props") [Typ.any ()]) in let innerExpression = - React_jsx_common.async_component ~async:isAsync innerExpression + Jsx_common.async_component ~async:isAsync innerExpression in let fullExpression = (* React component name should start with uppercase letter *) @@ -1129,17 +1157,17 @@ let transformStructureItem ~config item = pstr_desc = Pstr_primitive ({pval_attributes; pval_type} as value_description); } as pstr -> ( - match List.filter React_jsx_common.hasAttr pval_attributes with + match List.filter Jsx_common.hasAttr pval_attributes with | [] -> [item] | [_] -> - checkMultipleReactComponents ~config ~loc:pstr_loc; + checkMultipleComponents ~config ~loc:pstr_loc; check_string_int_attribute_iter.structure_item check_string_int_attribute_iter item; - let pval_type = React_jsx_common.extractUncurried pval_type in - let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in + let pval_type = Jsx_common.extractUncurried pval_type in + let coreTypeOfAttr = Jsx_common.coreTypeOfAttrs pval_attributes in let typVarsOfCoreType = coreTypeOfAttr - |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.map Jsx_common.typVarsOfCoreType |> Option.value ~default:[] in let rec getPropTypes types @@ -1175,7 +1203,10 @@ let transformStructureItem ~config item = (* can't be an arrow because it will defensively uncurry *) let newExternalType = Ptyp_constr - ( {loc = pstr_loc; txt = Ldot (Lident "React", "componentLike")}, + ( { + loc = pstr_loc; + txt = Ldot (Lident (moduleAccessName config), "componentLike"); + }, [retPropsType; innerType] ) in let newStructure = @@ -1192,8 +1223,8 @@ let transformStructureItem ~config item = in [propsRecordType; newStructure] | _ -> - React_jsx_common.raiseError ~loc:pstr_loc - "Only one react.component call can exist on a component at one time") + Jsx_common.raiseError ~loc:pstr_loc + "Only one JSX component call can exist on a component at one time") (* let component = ... *) | {pstr_loc; pstr_desc = Pstr_value (recFlag, valueBindings)} -> ( let fileName = filenameFromLoc pstr_loc in @@ -1232,18 +1263,18 @@ let transformSignatureItem ~config item = psig_loc; psig_desc = Psig_value ({pval_attributes; pval_type} as psig_desc); } as psig -> ( - match List.filter React_jsx_common.hasAttr pval_attributes with + match List.filter Jsx_common.hasAttr pval_attributes with | [] -> [item] | [_] -> - checkMultipleReactComponents ~config ~loc:psig_loc; - let pval_type = React_jsx_common.extractUncurried pval_type in + checkMultipleComponents ~config ~loc:psig_loc; + let pval_type = Jsx_common.extractUncurried pval_type in check_string_int_attribute_iter.signature_item check_string_int_attribute_iter item; let hasForwardRef = ref false in - let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in + let coreTypeOfAttr = Jsx_common.coreTypeOfAttrs pval_attributes in let typVarsOfCoreType = coreTypeOfAttr - |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.map Jsx_common.typVarsOfCoreType |> Option.value ~default:[] in let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = @@ -1290,7 +1321,10 @@ let transformSignatureItem ~config item = (* can't be an arrow because it will defensively uncurry *) let newExternalType = Ptyp_constr - ( {loc = psig_loc; txt = Ldot (Lident "React", "componentLike")}, + ( { + loc = psig_loc; + txt = Ldot (Lident (moduleAccessName config), "componentLike"); + }, [retPropsType; innerType] ) in let newStructure = @@ -1307,8 +1341,8 @@ let transformSignatureItem ~config item = in [propsRecordType; newStructure] | _ -> - React_jsx_common.raiseError ~loc:psig_loc - "Only one react.component call can exist on a component at one time") + Jsx_common.raiseError ~loc:psig_loc + "Only one JSX component call can exist on a component at one time") | _ -> [item] let transformJsxCall ~config mapper callExpression callArguments jsxExprLoc @@ -1317,7 +1351,7 @@ let transformJsxCall ~config mapper callExpression callArguments jsxExprLoc | Pexp_ident caller -> ( match caller with | {txt = Lident "createElement"; loc} -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: `createElement` should be preceeded by a module name." (* Foo.createElement(~prop1=foo, ~prop2=bar, ~children=[], ()) *) | {loc; txt = Ldot (modulePath, ("createElement" | "make"))} -> @@ -1330,18 +1364,18 @@ let transformJsxCall ~config mapper callExpression callArguments jsxExprLoc transformLowercaseCall3 ~config mapper jsxExprLoc loc attrs callArguments id | {txt = Ldot (_, anythingNotCreateElementOrMake); loc} -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: the JSX attribute should be attached to a \ `YourModuleName.createElement` or `YourModuleName.make` call. We saw \ `%s` instead" anythingNotCreateElementOrMake | {txt = Lapply _; loc} -> (* don't think there's ever a case where this is reached *) - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: encountered a weird case while processing the code. Please \ report this!") | _ -> - React_jsx_common.raiseError ~loc:callExpression.pexp_loc + Jsx_common.raiseError ~loc:callExpression.pexp_loc "JSX: `createElement` should be preceeded by a simple, direct module \ name." @@ -1385,7 +1419,8 @@ let expr ~config mapper expression = let fragment = match config.mode with | "automatic" -> - Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsxFragment")} + Exp.ident ~loc + {loc; txt = Ldot (Lident (moduleAccessName config), "jsxFragment")} | "classic" | _ -> Exp.ident ~loc {loc; txt = Ldot (Lident "React", "fragment")} in @@ -1393,10 +1428,13 @@ let expr ~config mapper expression = let recordOfChildren children = Exp.record [(Location.mknoloc (Lident "children"), children)] None in - let applyReactArray expr = + let applyJsxArray expr = Exp.apply (Exp.ident - {txt = Ldot (Lident "React", "array"); loc = Location.none}) + { + txt = Ldot (Lident (moduleAccessName config), "array"); + loc = Location.none; + }) [(Nolabel, expr)] in let countOfChildren = function @@ -1411,11 +1449,11 @@ let expr ~config mapper expression = | [child] -> recordOfChildren child | _ -> ( match config.mode with - | "automatic" -> recordOfChildren @@ applyReactArray childrenExpr + | "automatic" -> recordOfChildren @@ applyJsxArray childrenExpr | "classic" | _ -> emptyRecord ~loc:Location.none)) | _ -> ( match config.mode with - | "automatic" -> recordOfChildren @@ applyReactArray childrenExpr + | "automatic" -> recordOfChildren @@ applyJsxArray childrenExpr | "classic" | _ -> emptyRecord ~loc:Location.none) in let args = @@ -1434,8 +1472,11 @@ let expr ~config mapper expression = (match config.mode with | "automatic" -> if countOfChildren childrenExpr > 1 then - Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsxs")} - else Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsx")} + Exp.ident ~loc + {loc; txt = Ldot (Lident (moduleAccessName config), "jsxs")} + else + Exp.ident ~loc + {loc; txt = Ldot (Lident (moduleAccessName config), "jsx")} | "classic" | _ -> if countOfChildren childrenExpr > 1 then Exp.ident ~loc @@ -1446,8 +1487,7 @@ let expr ~config mapper expression = (* Delegate to the default mapper, a deep identity traversal *) | e -> default_mapper.expr mapper e -let module_binding ~(config : React_jsx_common.jsxConfig) mapper module_binding - = +let module_binding ~(config : Jsx_common.jsxConfig) mapper module_binding = config.nestedModules <- module_binding.pmb_name.txt :: config.nestedModules; let mapped = default_mapper.module_binding mapper module_binding in let () = diff --git a/jscomp/syntax/src/reactjs_jsx_v3.ml b/jscomp/syntax/src/reactjs_jsx_v3.ml index 0ecbb4cf43..83316c9d5c 100644 --- a/jscomp/syntax/src/reactjs_jsx_v3.ml +++ b/jscomp/syntax/src/reactjs_jsx_v3.ml @@ -87,7 +87,7 @@ let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> acc | (Nolabel, {pexp_loc}) :: _rest -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "JSX: found non-labelled argument before the last position" | arg :: rest -> allButLast_ rest (arg :: acc) in @@ -104,7 +104,7 @@ let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = | [(_, childrenExpr)], props -> (childrenExpr, if removeLastPositionUnit then allButLast props else props) | _ -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: somehow there's more than one `children` label" let unerasableIgnore loc = @@ -122,7 +122,7 @@ let rec getFnName binding = | {ppat_desc = Ppat_var {txt}} -> txt | {ppat_desc = Ppat_constraint (pat, _)} -> getFnName pat | {ppat_loc} -> - React_jsx_common.raiseError ~loc:ppat_loc + Jsx_common.raiseError ~loc:ppat_loc "react.component calls cannot be destructured." let makeNewBinding binding expression newName = @@ -136,7 +136,7 @@ let makeNewBinding binding expression newName = pvb_attributes = [merlinFocus]; } | {pvb_loc} -> - React_jsx_common.raiseError ~loc:pvb_loc + Jsx_common.raiseError ~loc:pvb_loc "react.component calls cannot be destructured." (* Lookup the value of `props` otherwise raise Invalid_argument error *) @@ -145,7 +145,7 @@ let getPropsNameValue _acc (loc, exp) = | {txt = Lident "props"}, {pexp_desc = Pexp_ident {txt = Lident str}} -> {propsName = str} | {txt; loc}, _ -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "react.component only accepts props as an option, given: { %s }" (Longident.last txt) @@ -170,7 +170,7 @@ let getPropsAttr payload = :: _rest)) -> {propsName = "props"} | Some (PStr ({pstr_desc = Pstr_eval (_, _); pstr_loc} :: _rest)) -> - React_jsx_common.raiseError ~loc:pstr_loc + Jsx_common.raiseError ~loc:pstr_loc "react.component accepts a record config with props as an options." | _ -> defaultProps @@ -368,7 +368,7 @@ let jsxMapper ~config = | Lident path -> Lident (path ^ "Props") | Ldot (ident, path) -> Ldot (ident, path ^ "Props") | _ -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX name can't be the result of function applications" in let props = @@ -407,7 +407,7 @@ let jsxMapper ~config = "createDOMElementVariadic" (* [@JSX] div(~children= value), coming from
...(value)
*) | {pexp_loc} -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "A spread as a DOM element's children don't make sense written \ together. You can simply remove the spread." in @@ -450,11 +450,11 @@ let jsxMapper ~config = match expr.pexp_desc with (* TODO: make this show up with a loc. *) | Pexp_fun (Labelled "key", _, _, _) | Pexp_fun (Optional "key", _, _, _) -> - React_jsx_common.raiseError ~loc:expr.pexp_loc + Jsx_common.raiseError ~loc:expr.pexp_loc "Key cannot be accessed inside of a component. Don't worry - you can \ always key a component from its parent!" | Pexp_fun (Labelled "ref", _, _, _) | Pexp_fun (Optional "ref", _, _, _) -> - React_jsx_common.raiseError ~loc:expr.pexp_loc + Jsx_common.raiseError ~loc:expr.pexp_loc "Ref cannot be passed as a normal prop. Either give the prop a \ different name or use the `forwardRef` API instead." | Pexp_fun (arg, default, pattern, expression) @@ -594,10 +594,10 @@ let jsxMapper ~config = ({pval_name = {txt = fnName}; pval_attributes; pval_type} as value_description); } as pstr -> ( - match List.filter React_jsx_common.hasAttr pval_attributes with + match List.filter Jsx_common.hasAttr pval_attributes with | [] -> [item] | [_] -> - let pval_type = React_jsx_common.extractUncurried pval_type in + let pval_type = Jsx_common.extractUncurried pval_type in let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = match ptyp_desc with | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) @@ -641,15 +641,15 @@ let jsxMapper ~config = in [externalPropsDecl; newStructure] | _ -> - React_jsx_common.raiseError ~loc:pstr_loc + Jsx_common.raiseError ~loc:pstr_loc "Only one react.component call can exist on a component at one time") (* let component = ... *) | {pstr_loc; pstr_desc = Pstr_value (recFlag, valueBindings)} -> ( let fileName = filenameFromLoc pstr_loc in let emptyLoc = Location.in_file fileName in let mapBinding binding = - if React_jsx_common.hasAttrOnBinding binding then - let binding = React_jsx_common.removeArity binding in + if Jsx_common.hasAttrOnBinding binding then + let binding = Jsx_common.removeArity binding in let bindingLoc = binding.pvb_loc in let bindingPatLoc = binding.pvb_pat.ppat_loc in let binding = @@ -689,7 +689,7 @@ let jsxMapper ~config = | {pexp_desc = Pexp_constraint (innerFunctionExpression, _typ)} -> spelunkForFunExpression innerFunctionExpression | {pexp_loc} -> - React_jsx_common.raiseError ~loc:pexp_loc + Jsx_common.raiseError ~loc:pexp_loc "react.component calls can only be on function definitions \ or component wrappers (forwardRef, memo)." in @@ -814,7 +814,7 @@ let jsxMapper ~config = in let bindingWrapper, hasUnit, expression = modifiedBinding binding in let reactComponentAttribute = - try Some (List.find React_jsx_common.hasAttr binding.pvb_attributes) + try Some (List.find Jsx_common.hasAttr binding.pvb_attributes) with Not_found -> None in let _attr_loc, payload = @@ -1037,10 +1037,10 @@ let jsxMapper ~config = ({pval_name = {txt = fnName}; pval_attributes; pval_type} as psig_desc); } as psig -> ( - match List.filter React_jsx_common.hasAttr pval_attributes with + match List.filter Jsx_common.hasAttr pval_attributes with | [] -> [item] | [_] -> - let pval_type = React_jsx_common.extractUncurried pval_type in + let pval_type = Jsx_common.extractUncurried pval_type in let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = match ptyp_desc with | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) @@ -1084,7 +1084,7 @@ let jsxMapper ~config = in [externalPropsDecl; newStructure] | _ -> - React_jsx_common.raiseError ~loc:psig_loc + Jsx_common.raiseError ~loc:psig_loc "Only one react.component call can exist on a component at one time") | _ -> [item] in @@ -1094,37 +1094,35 @@ let jsxMapper ~config = | Pexp_ident caller -> ( match caller with | {txt = Lident "createElement"; loc} -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: `createElement` should be preceeded by a module name." (* Foo.createElement(~prop1=foo, ~prop2=bar, ~children=[], ()) *) | {loc; txt = Ldot (modulePath, ("createElement" | "make"))} -> ( - match config.React_jsx_common.version with + match config.Jsx_common.version with | 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments - | _ -> - React_jsx_common.raiseError ~loc "JSX: the JSX version must be 3") + | _ -> Jsx_common.raiseError ~loc "JSX: the JSX version must be 3") (* div(~prop1=foo, ~prop2=bar, ~children=[bla], ()) *) (* turn that into ReactDOMRe.createElement(~props=ReactDOMRe.props(~props1=foo, ~props2=bar, ()), [|bla|]) *) | {loc; txt = Lident id} -> ( match config.version with | 3 -> transformLowercaseCall3 mapper loc attrs callArguments id - | _ -> React_jsx_common.raiseError ~loc "JSX: the JSX version must be 3" - ) + | _ -> Jsx_common.raiseError ~loc "JSX: the JSX version must be 3") | {txt = Ldot (_, anythingNotCreateElementOrMake); loc} -> - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: the JSX attribute should be attached to a \ `YourModuleName.createElement` or `YourModuleName.make` call. We \ saw `%s` instead" anythingNotCreateElementOrMake | {txt = Lapply _; loc} -> (* don't think there's ever a case where this is reached *) - React_jsx_common.raiseError ~loc + Jsx_common.raiseError ~loc "JSX: encountered a weird case while processing the code. Please \ report this!") | _ -> - React_jsx_common.raiseError ~loc:callExpression.pexp_loc + Jsx_common.raiseError ~loc:callExpression.pexp_loc "JSX: `createElement` should be preceeded by a simple, direct module \ name." in From d206b2d37f91ed09b9a52566c2dc6bf2f9d79efb Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Tue, 30 Jan 2024 10:23:50 +0100 Subject: [PATCH 17/21] Dict as a builtin (#6590) * dict as a builtin type * fix * revert unintended changes * adapt gentype to dict as built in * changelog --- CHANGELOG.md | 1 + jscomp/gentype/TranslateTypeExprFromTypes.ml | 2 +- jscomp/ml/ast_untagged_variants.ml | 1 + jscomp/ml/predef.ml | 12 +++++++++++- jscomp/ml/predef.mli | 2 ++ jscomp/others/js_dict.res | 2 +- jscomp/others/js_dict.resi | 2 +- lib/es6/js_json.js | 3 +-- lib/js/js_json.js | 3 +-- 9 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81557b99d3..e400636cbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 - Experimental support for generic/custom JSX transforms. https://github.com/rescript-lang/rescript-compiler/pull/6565 +- `dict` is now a builtin type. https://github.com/rescript-lang/rescript-compiler/pull/6590 #### :bug: Bug Fix diff --git a/jscomp/gentype/TranslateTypeExprFromTypes.ml b/jscomp/gentype/TranslateTypeExprFromTypes.ml index 45cde1fe24..a57468dba4 100644 --- a/jscomp/gentype/TranslateTypeExprFromTypes.ml +++ b/jscomp/gentype/TranslateTypeExprFromTypes.ml @@ -236,7 +236,7 @@ let translateConstr ~config ~paramsTranslation ~(path : Path.t) ~typeEnv = | ( (["Js"; "Promise"; "t"] | ["Promise"; "t"] | ["promise"]), [paramTranslation] ) -> {paramTranslation with type_ = Promise paramTranslation.type_} - | (["Js"; "Dict"; "t"] | ["Dict"; "t"]), [paramTranslation] -> + | (["Js"; "Dict"; "t"] | ["Dict"; "t"] | ["dict"]), [paramTranslation] -> {paramTranslation with type_ = Dict paramTranslation.type_} | ["function$"], [arg; _arity] -> {dependencies = arg.dependencies; type_ = arg.type_} diff --git a/jscomp/ml/ast_untagged_variants.ml b/jscomp/ml/ast_untagged_variants.ml index 1f721eba45..440299cb32 100644 --- a/jscomp/ml/ast_untagged_variants.ml +++ b/jscomp/ml/ast_untagged_variants.ml @@ -142,6 +142,7 @@ let reportConstructorMoreThanOneArg ~loc ~name = let type_is_builtin_object (t : Types.type_expr) = match t.desc with + | Tconstr (Path.Pident ident, [_], _) when Ident.name ident = "dict" -> true | Tconstr (path, _, _) -> let name = Path.name path in name = "Js.Dict.t" || name = "Js_dict.t" diff --git a/jscomp/ml/predef.ml b/jscomp/ml/predef.ml index fe5749d7dc..a65174625e 100644 --- a/jscomp/ml/predef.ml +++ b/jscomp/ml/predef.ml @@ -40,6 +40,7 @@ and ident_array = ident_create "array" and ident_list = ident_create "list" and ident_option = ident_create "option" and ident_result = ident_create "result" +and ident_dict = ident_create "dict" and ident_int64 = ident_create "int64" and ident_lazy_t = ident_create "lazy_t" @@ -82,6 +83,7 @@ and path_array = Pident ident_array and path_list = Pident ident_list and path_option = Pident ident_option and path_result = Pident ident_result +and path_dict = Pident ident_dict and path_int64 = Pident ident_int64 @@ -105,6 +107,7 @@ and type_array t = newgenty (Tconstr(path_array, [t], ref Mnil)) and type_list t = newgenty (Tconstr(path_list, [t], ref Mnil)) and type_option t = newgenty (Tconstr(path_option, [t], ref Mnil)) and type_result t1 t2 = newgenty (Tconstr(path_result, [t1; t2], ref Mnil)) +and type_dict t = newgenty (Tconstr(path_dict, [t], ref Mnil)) and type_int64 = newgenty (Tconstr(path_int64, [], ref Mnil)) and type_lazy_t t = newgenty (Tconstr(path_lazy_t, [t], ref Mnil)) @@ -226,6 +229,12 @@ let common_initial_env add_type add_extension empty_env = Type_variant([cstr ident_ok [tvar1]; cstr ident_error [tvar2]]); type_variance = [Variance.covariant; Variance.covariant]} + and decl_dict = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_variance = [Variance.covariant]} and decl_uncurried = let tvar1, tvar2 = newgenvar(), newgenvar() in {decl_abstr with @@ -292,6 +301,7 @@ let common_initial_env add_type add_extension empty_env = add_type ident_lazy_t decl_lazy_t ( add_type ident_option decl_option ( add_type ident_result decl_result ( + add_type ident_dict decl_dict ( add_type ident_list decl_list ( add_type ident_array decl_array ( add_type ident_exn decl_exn ( @@ -305,7 +315,7 @@ let common_initial_env add_type add_extension empty_env = add_type ident_extension_constructor decl_abstr ( add_type ident_floatarray decl_abstr ( add_type ident_promise decl_promise ( - empty_env)))))))))))))))))))))))))) + empty_env))))))))))))))))))))))))))) let build_initial_env add_type add_exception empty_env = let common = common_initial_env add_type add_exception empty_env in diff --git a/jscomp/ml/predef.mli b/jscomp/ml/predef.mli index a998aa6807..a3f15f9071 100644 --- a/jscomp/ml/predef.mli +++ b/jscomp/ml/predef.mli @@ -29,6 +29,7 @@ val type_array: type_expr -> type_expr val type_list: type_expr -> type_expr val type_option: type_expr -> type_expr val type_result: type_expr -> type_expr -> type_expr +val type_dict: type_expr -> type_expr val type_int64: type_expr val type_lazy_t: type_expr -> type_expr @@ -47,6 +48,7 @@ val path_array: Path.t val path_list: Path.t val path_option: Path.t val path_result: Path.t +val path_dict: Path.t val path_int64: Path.t val path_lazy_t: Path.t diff --git a/jscomp/others/js_dict.res b/jscomp/others/js_dict.res index b08e0759b2..5daef592fd 100644 --- a/jscomp/others/js_dict.res +++ b/jscomp/others/js_dict.res @@ -25,7 +25,7 @@ /*** Provides a simple key-value dictionary abstraction over native JavaScript objects */ /** The dict type */ -type t<'a> +type t<'a> = dict<'a> /** The key type, an alias of string */ type key = string diff --git a/jscomp/others/js_dict.resi b/jscomp/others/js_dict.resi index c9c4584f44..5f6a30ffd4 100644 --- a/jscomp/others/js_dict.resi +++ b/jscomp/others/js_dict.resi @@ -39,7 +39,7 @@ Dictionary type (ie an '{ }' JS object). However it is restricted to hold a single type; therefore values must have the same type. This Dictionary type is mostly used with the Js_json.t type. */ -type t<'a> +type t<'a> = dict<'a> /** The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys. diff --git a/lib/es6/js_json.js b/lib/es6/js_json.js index 961ee2e9ab..61c6fbcd33 100644 --- a/lib/es6/js_json.js +++ b/lib/es6/js_json.js @@ -1,6 +1,5 @@ -import * as Caml_option from "./caml_option.js"; var Kind = {}; @@ -75,7 +74,7 @@ function decodeNumber(json) { function decodeObject(json) { if (typeof json === "object" && !Array.isArray(json) && json !== null) { - return Caml_option.some(json); + return json; } } diff --git a/lib/js/js_json.js b/lib/js/js_json.js index 6128ff3e74..8d9166a172 100644 --- a/lib/js/js_json.js +++ b/lib/js/js_json.js @@ -1,6 +1,5 @@ 'use strict'; -var Caml_option = require("./caml_option.js"); var Kind = {}; @@ -75,7 +74,7 @@ function decodeNumber(json) { function decodeObject(json) { if (typeof json === "object" && !Array.isArray(json) && json !== null) { - return Caml_option.some(json); + return json; } } From bd37a65970b67e587566ab58bc8f710e19e73357 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 29 Jan 2024 13:33:45 +0100 Subject: [PATCH 18/21] adapt build schema to new generic JSX transform (#6588) --- docs/docson/build-schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docson/build-schema.json b/docs/docson/build-schema.json index cc930c2bde..4c7a9a431a 100644 --- a/docs/docson/build-schema.json +++ b/docs/docson/build-schema.json @@ -323,8 +323,7 @@ }, "module": { "type": "string", - "enum": ["react"], - "description": "JSX module, currently only support the React." + "description": "JSX module. Either \"react\" for React, or (since v11.1) any valid module name to apply a generic JSX transform." }, "mode": { "type": "string", From 3b291b2b11ffa56dd3398bfaf6f968751c4054b6 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Tue, 30 Jan 2024 17:20:35 +0700 Subject: [PATCH 19/21] Prepare for 11.1.0-rc.1 release --- CHANGELOG.md | 4 ++-- jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e400636cbf..08bc68afd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,11 @@ > - :house: [Internal] > - :nail_care: [Polish] -# 11.1.0 (Unreleased) +# 11.1.0-rc.1 #### :rocket: New Feature -- Experimental support of tagged template literals, eg ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 +- Experimental support of tagged template literals, e.g. ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 - Experimental support for generic/custom JSX transforms. https://github.com/rescript-lang/rescript-compiler/pull/6565 - `dict` is now a builtin type. https://github.com/rescript-lang/rescript-compiler/pull/6590 diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index a7dba66da6..d423f1b9c9 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.1.0" +let version = "11.1.0-rc.1" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index 0dce2c204d..856804982b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.1.0", + "version": "11.1.0-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.1.0", + "version": "11.1.0-rc.1", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index b7c5ca3c7d..fb889fed88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.1.0", + "version": "11.1.0-rc.1", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index 6d1d5a7ccd..be82d95442 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.1.0", + "version": "11.1.0-rc.1", "keywords": [ "rescript", "stdlib", From 85336e023be54e8e83d673a161e4fb5b8479ba59 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 31 Jan 2024 02:57:09 +0100 Subject: [PATCH 20/21] Set version to 11.1.0-rc.2 (#6593) --- CHANGELOG.md | 2 ++ jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08bc68afd6..7468b33748 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.1.0-rc.2 (Unreleased) + # 11.1.0-rc.1 #### :rocket: New Feature diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index d423f1b9c9..8469e1906f 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.1.0-rc.1" +let version = "11.1.0-rc.2" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index 856804982b..6859b472c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.1.0-rc.1", + "version": "11.1.0-rc.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.1.0-rc.1", + "version": "11.1.0-rc.2", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index fb889fed88..dee159d707 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.1.0-rc.1", + "version": "11.1.0-rc.2", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index be82d95442..1e894b47f1 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.1.0-rc.1", + "version": "11.1.0-rc.2", "keywords": [ "rescript", "stdlib", From 579b9d7c0ec3a0d8b15f478820572188a6853554 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 31 Jan 2024 10:22:14 +0100 Subject: [PATCH 21/21] Use Github-hosted macos arm runner (macos-14) (#6595) --- .github/workflows/ci.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff71476b12..3c6ebb9b13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,12 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest, macos-arm] + os: [ + macos-13, # x64 + macos-14, # ARM + ubuntu-latest, + windows-latest, + ] ocaml_compiler: [4.14.0] runs-on: ${{matrix.os}} @@ -230,24 +235,24 @@ jobs: if: runner.os == 'Windows' run: node scripts/ciTest.js -mocha -theme -format - # Build the playground compiler on our fastest runner (macOS ARM) + # Build the playground compiler on the fastest runner (ubuntu-latest) - name: Install JSOO - if: matrix.os == 'macos-arm' + if: matrix.os == 'ubuntu-latest' run: opam install js_of_ocaml.4.0.0 - name: Build playground compiler - if: matrix.os == 'macos-arm' + if: matrix.os == 'ubuntu-latest' run: | opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js opam exec -- dune build --profile browser cp ./_build/default/jscomp/jsoo/jsoo_playground_main.bc.js playground/compiler.js - name: Test playground compiler - if: matrix.os == 'macos-arm' + if: matrix.os == 'ubuntu-latest' run: node playground/playground_test.js - name: Upload playground compiler to CDN - if: ${{ matrix.os == 'macos-arm' && startsWith(github.ref, 'refs/tags/v') }} + if: ${{ matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v') }} env: KEYCDN_USER: ${{ secrets.KEYCDN_USER }} KEYCDN_PASSWORD: ${{ secrets.KEYCDN_PASSWORD }} @@ -324,10 +329,9 @@ jobs: strategy: fail-fast: false matrix: - os: - [ - macos-latest, - macos-arm, + os: [ + macos-13, # x64 + macos-14, # ARM ubuntu-latest, buildjet-2vcpu-ubuntu-2204-arm, windows-latest,