From df1a633ba03023c44122ca30481a5252bdfc5cd6 Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Sun, 18 Feb 2024 23:09:49 +0900 Subject: [PATCH 1/4] remove lazy keyword --- jscomp/dune | 2 +- jscomp/runtime/caml_module.res | 2 +- jscomp/stdlib-406/camlinternalLazy.res | 17 ++ jscomp/stdlib-406/camlinternalLazy.resi | 4 + jscomp/stdlib-406/hashtbl.res | 2 +- jscomp/stdlib-406/lazy.res | 4 +- jscomp/stdlib-406/stream.res | 8 +- jscomp/syntax/src/res_core.ml | 10 - jscomp/syntax/src/res_grammar.ml | 18 +- jscomp/syntax/src/res_token.ml | 7 +- .../covid-19charts.com/src/Data.res | 10 +- .../tests/idempotency/genType/src/Arnold.res | 2 +- .../idempotency/genType/src/DeadValue.res | 4 +- .../tests/idempotency/genType/src/Log_.res | 2 +- .../genType/src/ModuleResolver.res | 4 +- .../parsing/grammar/expressions/arrow.res | 2 - .../parsing/grammar/expressions/binary.res | 2 - .../grammar/expressions/parenthesized.res | 2 - .../parsing/grammar/pattern/constant.res | 2 - .../tests/parsing/grammar/pattern/lazy.res | 49 ---- .../tests/parsing/grammar/pattern/or.res | 2 - .../parsing/grammar/pattern/polyvariants.res | 1 - .../tests/printer/comments/blockExpr.res | 12 - jscomp/syntax/tests/printer/comments/expr.res | 3 - .../syntax/tests/printer/comments/pattern.res | 3 - jscomp/syntax/tests/printer/expr/assert.res | 1 - .../syntax/tests/printer/expr/asyncAwait.res | 2 - jscomp/syntax/tests/printer/expr/binary.res | 3 - jscomp/syntax/tests/printer/expr/braced.res | 1 - .../syntax/tests/printer/expr/exoticIdent.res | 2 - jscomp/syntax/tests/printer/expr/field.res | 1 - jscomp/syntax/tests/printer/expr/jsx.res | 2 - jscomp/syntax/tests/printer/expr/lazy.res | 56 ---- jscomp/syntax/tests/printer/expr/ternary.res | 2 +- jscomp/syntax/tests/printer/expr/unary.res | 2 - .../tests/printer/expr/underscoreApply.res | 1 - .../syntax/tests/printer/pattern/constant.res | 2 - jscomp/syntax/tests/printer/pattern/lazy.res | 3 - .../syntax/tests/printer/pattern/record.res | 2 - .../syntax/tests/printer/pattern/variant.res | 1 - jscomp/test/build.ninja | 3 +- jscomp/test/ext_filename_test.js | 14 +- jscomp/test/ext_filename_test.res | 4 +- jscomp/test/gpr_3697_test.js | 9 +- jscomp/test/gpr_3697_test.res | 4 +- jscomp/test/hamming_test.res | 225 ---------------- jscomp/test/lazy_demo.js | 14 +- jscomp/test/lazy_demo.res | 9 +- jscomp/test/lazy_test.js | 241 ++++-------------- jscomp/test/lazy_test.res | 67 +++-- jscomp/test/mpr_6033_test.js | 12 +- jscomp/test/mpr_6033_test.res | 4 +- jscomp/test/recursive_module.js | 28 +- jscomp/test/recursive_module.res | 8 +- lib/es6/caml_module.js | 7 +- lib/es6/camlinternalLazy.js | 16 ++ lib/es6/hashtbl.js | 7 +- lib/es6/lazy.js | 14 +- lib/es6/stream.js | 20 +- lib/js/caml_module.js | 7 +- lib/js/camlinternalLazy.js | 16 ++ lib/js/hashtbl.js | 7 +- lib/js/lazy.js | 14 +- lib/js/stream.js | 20 +- 64 files changed, 234 insertions(+), 791 deletions(-) delete mode 100644 jscomp/syntax/tests/parsing/grammar/pattern/lazy.res delete mode 100644 jscomp/syntax/tests/printer/expr/lazy.res delete mode 100644 jscomp/syntax/tests/printer/pattern/lazy.res delete mode 100644 jscomp/test/hamming_test.res diff --git a/jscomp/dune b/jscomp/dune index 035072c2f4..97b3d99fdd 100644 --- a/jscomp/dune +++ b/jscomp/dune @@ -1,5 +1,5 @@ (dirs bsb bsb_exe bsb_helper bsb_helper_exe bsc cmij common core depends ext - frontend gentype jsoo js_parser ml napkin ounit_tests syntax) + frontend gentype jsoo js_parser ml ounit_tests syntax) (env (dev diff --git a/jscomp/runtime/caml_module.res b/jscomp/runtime/caml_module.res index a510385349..8b645038c3 100644 --- a/jscomp/runtime/caml_module.res +++ b/jscomp/runtime/caml_module.res @@ -53,7 +53,7 @@ let init_mod = (loc: (string, int, int), shape: shape) => { let rec loop = (shape: shape, struct_: Obj.t, idx) => switch shape { | Function => set_field(struct_, idx, Obj.magic(undef_module)) - | Lazy => set_field(struct_, idx, Obj.magic(lazy undef_module)) + | Lazy => set_field(struct_, idx, Obj.magic(undef_module)) | Class => set_field( struct_, diff --git a/jscomp/stdlib-406/camlinternalLazy.res b/jscomp/stdlib-406/camlinternalLazy.res index e3727857da..4db5dddacc 100644 --- a/jscomp/stdlib-406/camlinternalLazy.res +++ b/jscomp/stdlib-406/camlinternalLazy.res @@ -35,6 +35,7 @@ type t<'a> = { %%private(external fnToVal: ((. unit) => 'a) => 'a = "%identity") %%private(external valToFn: 'a => (. unit) => 'a = "%identity") %%private(external castToConcrete: lazy_t<'a> => t<'a> = "%identity") +%%private(external castFromConcrete: t<'a> => lazy_t<'a> = "%identity") let is_val = (type a, l: lazy_t): bool => castToConcrete(l).tag @@ -90,3 +91,19 @@ let force_val = (type a, lzv: lazy_t): a => { force_val_lazy_block(lzv) } } + +let from_fun = (type a, closure: (. unit) => a): lazy_t => { + let blk = { + tag: false, + value: fnToVal(closure), + } + castFromConcrete(blk) +} + +let from_val = (type a, value: a): lazy_t => { + let blk = { + tag: true, + value: value, + } + castFromConcrete(blk) +} diff --git a/jscomp/stdlib-406/camlinternalLazy.resi b/jscomp/stdlib-406/camlinternalLazy.resi index 82e0be301d..24582c4bc0 100644 --- a/jscomp/stdlib-406/camlinternalLazy.resi +++ b/jscomp/stdlib-406/camlinternalLazy.resi @@ -25,3 +25,7 @@ let force: lazy_t<'a> => 'a let force_val: lazy_t<'a> => 'a let is_val: lazy_t<'a> => bool + +let from_fun: ((. unit) => 'a) => lazy_t<'a> + +let from_val: 'a => lazy_t<'a> diff --git a/jscomp/stdlib-406/hashtbl.res b/jscomp/stdlib-406/hashtbl.res index b29afbca2e..58c3ac9735 100644 --- a/jscomp/stdlib-406/hashtbl.res +++ b/jscomp/stdlib-406/hashtbl.res @@ -56,7 +56,7 @@ let randomized = ref(randomized_default) let randomize = () => randomized := true let is_randomized = () => randomized.contents -let prng = lazy Random.State.make_self_init() +let prng = Lazy.from_fun(() => Random.State.make_self_init()) /* Creating a fresh, empty table */ diff --git a/jscomp/stdlib-406/lazy.res b/jscomp/stdlib-406/lazy.res index 967946d257..a6a85521dd 100644 --- a/jscomp/stdlib-406/lazy.res +++ b/jscomp/stdlib-406/lazy.res @@ -55,9 +55,9 @@ external force: t<'a> => 'a = "%lazy_force" let force_val = CamlinternalLazy.force_val -let from_fun = f => lazy f() +let from_fun = f => CamlinternalLazy.from_fun((. ) => f()) -let from_val = v => lazy v +let from_val = v => CamlinternalLazy.from_val(v) let is_val = CamlinternalLazy.is_val diff --git a/jscomp/stdlib-406/stream.res b/jscomp/stdlib-406/stream.res index d819559b63..03bbd7240c 100644 --- a/jscomp/stdlib-406/stream.res +++ b/jscomp/stdlib-406/stream.res @@ -218,13 +218,13 @@ let iapp = (i, s) => Some({count: 0, data: Sapp(data(i), data(s))}) let icons = (i, s) => Some({count: 0, data: Scons(i, data(s))}) let ising = i => Some({count: 0, data: Scons(i, Sempty)}) -let lapp = (f, s) => Some({count: 0, data: Slazy(lazy Sapp(data(f()), data(s)))}) +let lapp = (f, s) => Some({count: 0, data: Slazy(Lazy.from_fun(() => Sapp(data(f()), data(s))))}) -let lcons = (f, s) => Some({count: 0, data: Slazy(lazy Scons(f(), data(s)))}) -let lsing = f => Some({count: 0, data: Slazy(lazy Scons(f(), Sempty))}) +let lcons = (f, s) => Some({count: 0, data: Slazy(Lazy.from_fun(() => Scons(f(), data(s))))}) +let lsing = f => Some({count: 0, data: Slazy(Lazy.from_fun(() => Scons(f(), Sempty)))}) let sempty = None -let slazy = f => Some({count: 0, data: Slazy(lazy data(f()))}) +let slazy = f => Some({count: 0, data: Slazy(Lazy.from_fun(() => data(f())))}) /* For debugging use */ diff --git a/jscomp/syntax/src/res_core.ml b/jscomp/syntax/src/res_core.ml index eb44638408..7bb73e812a 100644 --- a/jscomp/syntax/src/res_core.ml +++ b/jscomp/syntax/src/res_core.ml @@ -1108,11 +1108,6 @@ let rec parsePattern ?(alias = true) ?(or_ = true) p = let pat = parsePattern ~alias:false ~or_:false p in let loc = mkLoc startPos p.prevEndPos in Ast_helper.Pat.exception_ ~loc ~attrs pat - | Lazy -> - Parser.next p; - let pat = parsePattern ~alias:false ~or_:false p in - let loc = mkLoc startPos p.prevEndPos in - Ast_helper.Pat.lazy_ ~loc ~attrs pat | List -> Parser.next p; parseListPattern ~startPos ~attrs p @@ -2128,11 +2123,6 @@ and parseOperandExpr ~context p = let () = attrs := [] in parseAsyncArrowExpression ~arrowAttrs p | Await -> parseAwaitExpression p - | Lazy -> - Parser.next p; - let expr = parseUnaryExpr p in - let loc = mkLoc startPos p.prevEndPos in - Ast_helper.Exp.lazy_ ~loc expr | Try -> parseTryExpression p | If -> parseIfOrIfLetExpression p | For -> parseForExpression p diff --git a/jscomp/syntax/src/res_grammar.ml b/jscomp/syntax/src/res_grammar.ml index 61e6f4ea81..a7888f2f23 100644 --- a/jscomp/syntax/src/res_grammar.ml +++ b/jscomp/syntax/src/res_grammar.ml @@ -129,7 +129,7 @@ let isSignatureItemStart = function let isAtomicPatternStart = function | Token.Int _ | String _ | Codepoint _ | Backtick | Lparen | Lbracket | Lbrace - | Underscore | Lident _ | Uident _ | List | Exception | Lazy | Percent -> + | Underscore | Lident _ | Uident _ | List | Exception | Percent -> true | _ -> false @@ -148,9 +148,9 @@ let isAtomicTypExprStart = function let isExprStart = function | Token.Assert | At | Await | Backtick | Bang | Codepoint _ | False | Float _ - | For | Hash | If | Int _ | Lazy | Lbrace | Lbracket | LessThan | Lident _ - | List | Lparen | Minus | MinusDot | Module | Percent | Plus | PlusDot - | String _ | Switch | True | Try | Uident _ | Underscore (* _ => doThings() *) + | For | Hash | If | Int _ | Lbrace | Lbracket | LessThan | Lident _ | List + | Lparen | Minus | MinusDot | Module | Percent | Plus | PlusDot | String _ + | Switch | True | Try | Uident _ | Underscore (* _ => doThings() *) | While -> true | _ -> false @@ -169,7 +169,7 @@ let isStructureItemStart = function let isPatternStart = function | Token.Int _ | Float _ | String _ | Codepoint _ | Backtick | True | False | Minus | Plus | Lparen | Lbracket | Lbrace | List | Underscore | Lident _ - | Uident _ | Hash | Exception | Lazy | Percent | Module | At -> + | Uident _ | Hash | Exception | Percent | Module | At -> true | _ -> false @@ -257,10 +257,10 @@ let isJsxChildStart = isAtomicExprStart let isBlockExprStart = function | Token.Assert | At | Await | Backtick | Bang | Codepoint _ | Exception - | False | Float _ | For | Forwardslash | Hash | If | Int _ | Lazy | Lbrace - | Lbracket | LessThan | Let | Lident _ | List | Lparen | Minus | MinusDot - | Module | Open | Percent | Plus | PlusDot | String _ | Switch | True | Try - | Uident _ | Underscore | While -> + | False | Float _ | For | Forwardslash | Hash | If | Int _ | Lbrace | Lbracket + | LessThan | Let | Lident _ | List | Lparen | Minus | MinusDot | Module | Open + | Percent | Plus | PlusDot | String _ | Switch | True | Try | Uident _ + | Underscore | While -> true | _ -> false diff --git a/jscomp/syntax/src/res_token.ml b/jscomp/syntax/src/res_token.ml index 5d12e0f141..27020106f8 100644 --- a/jscomp/syntax/src/res_token.ml +++ b/jscomp/syntax/src/res_token.ml @@ -55,7 +55,6 @@ type t = | Hash | HashEqual | Assert - | Lazy | Tilde | Question | If @@ -166,7 +165,6 @@ let toString = function | AsteriskDot -> "*." | Exponentiation -> "**" | Assert -> "assert" - | Lazy -> "lazy" | Tilde -> "tilde" | Question -> "?" | If -> "if" @@ -222,7 +220,6 @@ let keywordTable = function | "if" -> If | "in" -> In | "include" -> Include - | "lazy" -> Lazy | "let" -> Let | "list{" -> List | "module" -> Module @@ -242,8 +239,8 @@ let keywordTable = function let isKeyword = function | Await | And | As | Assert | Constraint | Else | Exception | External | False - | For | If | In | Include | Land | Lazy | Let | List | Lor | Module | Mutable - | Of | Open | Private | Rec | Switch | True | Try | Typ | When | While -> + | For | If | In | Include | Land | Let | List | Lor | Module | Mutable | Of + | Open | Private | Rec | Switch | True | Try | Typ | When | While -> true | _ -> false diff --git a/jscomp/syntax/tests/idempotency/covid-19charts.com/src/Data.res b/jscomp/syntax/tests/idempotency/covid-19charts.com/src/Data.res index dc57f5e259..4d0c1abac0 100644 --- a/jscomp/syntax/tests/idempotency/covid-19charts.com/src/Data.res +++ b/jscomp/syntax/tests/idempotency/covid-19charts.com/src/Data.res @@ -57,7 +57,7 @@ type value = let dataWithGrowth = Map.entries(data) |> Js.Array.map(((countryId, dataPoints)) => { - let data = lazy { + let data = Lazy.from_fun(() => { let countryDataWithGrowth = Map.empty() let _ = Js.Array.reduce((prevRecord, day) => { let record = Map.get(dataPoints, day) @@ -72,7 +72,7 @@ let dataWithGrowth = Some(record) }, None, days) countryDataWithGrowth - } + }) (countryId, data) }) |> Belt.Map.String.fromArray @@ -92,7 +92,7 @@ let calendar: t = Js.Array.mapi((day, index) => { Belt.HashMap.String.set( values, Map.get(locations, countryId).name, - lazy Map.get(Belt.Map.String.getExn(dataWithGrowth, countryId) |> Lazy.force, day), + Lazy.from_fun(() => Map.get(Belt.Map.String.getExn(dataWithGrowth, countryId) |> Lazy.force, day)), ), countryIds, ) @@ -140,7 +140,7 @@ let getValue = (dataType, dataItem) => getValueFromRecord(dataType, getRecord(da let alignToDay0 = (dataType, threshold) => { let data = Belt.Map.String.mapU(dataWithGrowth, (. dataPoints) => - lazy { + Lazy.from_fun(() => { let dataPoints = Lazy.force(dataPoints) Map.entries(dataPoints) |> Js.Array.map(((date, value)) => (Map.get(dayToIndex, date), value)) @@ -149,7 +149,7 @@ let alignToDay0 = (dataType, threshold) => { |> Js.Array.filter(value => getValue(dataType, value) >= threshold) |> Js.Array.mapi((value, index) => (index, value)) |> Belt.Map.Int.fromArray - } + }) ) Array.init(Js.Array.length(days), day => { diff --git a/jscomp/syntax/tests/idempotency/genType/src/Arnold.res b/jscomp/syntax/tests/idempotency/genType/src/Arnold.res index a6df0375b0..f7ed09949c 100644 --- a/jscomp/syntax/tests/idempotency/genType/src/Arnold.res +++ b/jscomp/syntax/tests/idempotency/genType/src/Arnold.res @@ -1359,7 +1359,7 @@ let traverseAst = (~valueBindingsTable) => { valueBindings |> List.iter((vb: Typedtree.value_binding) => switch vb.vb_pat.pat_desc { | Tpat_var(id, {loc: {loc_start: pos}}) => - let callees = lazy FindFunctionsCalled.findCallees(vb.vb_expr) + let callees = Lazy.from_fun(() => FindFunctionsCalled.findCallees(vb.vb_expr)) Hashtbl.replace(valueBindingsTable, Ident.name(id), (pos, vb.vb_expr, callees)) | _ => () } diff --git a/jscomp/syntax/tests/idempotency/genType/src/DeadValue.res b/jscomp/syntax/tests/idempotency/genType/src/DeadValue.res index fc5587f7a8..54099c6217 100644 --- a/jscomp/syntax/tests/idempotency/genType/src/DeadValue.res +++ b/jscomp/syntax/tests/idempotency/genType/src/DeadValue.res @@ -12,12 +12,12 @@ let whiteListSideEffects = list{ "Int64.one", "String.length", } -let whiteTableSideEffects = lazy { +let whiteTableSideEffects = Lazy.from_fun(() => { let tbl = Hashtbl.create(11) whiteListSideEffects |> List.iter(s => Hashtbl.add(tbl, s, ())) tbl -} +}) let pathIsWhitelistedForSideEffects = path => switch path |> Path.flatten { diff --git a/jscomp/syntax/tests/idempotency/genType/src/Log_.res b/jscomp/syntax/tests/idempotency/genType/src/Log_.res index dbc1f505fb..dff5cb55ad 100644 --- a/jscomp/syntax/tests/idempotency/genType/src/Log_.res +++ b/jscomp/syntax/tests/idempotency/genType/src/Log_.res @@ -1,5 +1,5 @@ module Color = { - let color_enabled = lazy Unix.isatty(Unix.stdout) + let color_enabled = Lazy.from_fun(() => Unix.isatty(Unix.stdout)) let forceColor = ref(false) let get_color_enabled = () => forceColor.contents || Lazy.force(color_enabled) diff --git a/jscomp/syntax/tests/idempotency/genType/src/ModuleResolver.res b/jscomp/syntax/tests/idempotency/genType/src/ModuleResolver.res index f54262804a..318466c5c1 100644 --- a/jscomp/syntax/tests/idempotency/genType/src/ModuleResolver.res +++ b/jscomp/syntax/tests/idempotency/genType/src/ModuleResolver.res @@ -189,7 +189,7 @@ type resolver = { } let createLazyResolver = (~config, ~extensions, ~excludeFile) => { - lazyFind: lazy { + lazyFind: Lazy.from_fun(() => { let (moduleNameMap, bsDependenciesFileMap) = sourcedirsJsonToMap( ~config, ~extensions, @@ -210,7 +210,7 @@ let createLazyResolver = (~config, ~extensions, ~excludeFile) => { moduleName |> find(~bsDependencies=true, ~map=bsDependenciesFileMap) | res => res } - }, + }), } let apply = (~resolver, ~useBsDependencies, moduleName) => diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/arrow.res b/jscomp/syntax/tests/parsing/grammar/expressions/arrow.res index 3b48ffaf0f..9d37007aaf 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/arrow.res +++ b/jscomp/syntax/tests/parsing/grammar/expressions/arrow.res @@ -22,8 +22,6 @@ let f = ((a, b)) => a + b let f = ((a, b), (c, d)) => a + b + c + d let f = (exception Terminate) => () let f = (exception Terminate, exception Exit) => () -let f = (lazy x) => () -let f = (lazy x, lazy y) => () let f = (list{}) => () let f = (list{x, ...xs}) => x + xs->Belt.List.length diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/binary.res b/jscomp/syntax/tests/parsing/grammar/expressions/binary.res index 32cc091ef4..19e31b21ee 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/binary.res +++ b/jscomp/syntax/tests/parsing/grammar/expressions/binary.res @@ -18,8 +18,6 @@ let x = z |> switch z {| _ => false} let x = z |> @attr switch z {| _ => false} let x = z |> assert(z) let x = z |> @attr assert(z) -let x = z |> lazy z -let x = z |> @attr lazy z let x = z |> try sideEffect() catch { | _ => f() } let x = z |> @attr try sideEffect() catch { | _ => f() } let x = z |> for i in 0 to 10 { () } diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/parenthesized.res b/jscomp/syntax/tests/parsing/grammar/expressions/parenthesized.res index 5efe5ba6bc..bfb814f21c 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/parenthesized.res +++ b/jscomp/syntax/tests/parsing/grammar/expressions/parenthesized.res @@ -30,8 +30,6 @@ let blockExpression = ({ let assertSmthing = (assert(true)) -let lazyThing = (lazy true) - let jsx = (
foo
) let ifExpr = (if true { diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/constant.res b/jscomp/syntax/tests/parsing/grammar/pattern/constant.res index e81f4a30dc..28c3a04eff 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/constant.res +++ b/jscomp/syntax/tests/parsing/grammar/pattern/constant.res @@ -83,7 +83,6 @@ switch science { | -4.15 as x => true | -4.15 | +4.15 => true | (-3.14 : float) => true -| lazy 5.678 => true | exception 19.34 => true | _ => false } @@ -99,7 +98,6 @@ switch literal { | `literal` as x => true | `literal` | `literal` => true | (`literal` : string) => true -| lazy `literal` => true | exception `literal` => true | _ => false } diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/lazy.res b/jscomp/syntax/tests/parsing/grammar/pattern/lazy.res deleted file mode 100644 index cf500ee32e..0000000000 --- a/jscomp/syntax/tests/parsing/grammar/pattern/lazy.res +++ /dev/null @@ -1,49 +0,0 @@ -let lazy x = () -let lazy x as l = () -let lazy (x as l) = () -let (lazy x) = () -let (lazy x) as l = () -let (lazy x as l) = () -let (lazy (x as l)) = () -let (lazy (x: int)) = () -let lazy (x: int) = () -let (lazy x: Lazy.t) = () -let (lazy x: Lazy.t) as l = () -let (lazy (x as l): Lazy.t) = () - -let lazy exception x = () -let lazy (exception x) = () - -switch x { -| lazy foo => () -| lazy foo as l => () -| lazy (foo as l) => () -| (lazy x: Lazy.t) => () -} - -let f = (lazy x) => () -let f = (lazy x as l) => () -let f = (lazy (x as l)) => () -let f = ((lazy x)) => () -let f = ((lazy x) as l) => () -let f = ((lazy (x as l))) => () -let f = (lazy x: Lazy.t) => () -let f = ((lazy x: Lazy.t) as x) => () -let f = ((lazy (x: Lazy.t) as x) ) => () -let f = ((lazy ((x: Lazy.t) as l) ) ) => () -let f = ((lazy x: Lazy.t)) => () - -for lazy x in z to g { () } -for lazy x as l in z to g { () } -for lazy (x as l) in z to g { () } -for (lazy x in z to g) { () } -for (lazy x as l in z to g) { () } -for (lazy (x as l) in z to g) { () } -for ((lazy x) in z to g) { () } -for ((lazy x) as l in z to g) { () } -for ((lazy x as l) in z to g) { () } -for ((lazy (x as l)) in z to g) { () } -for ((lazy x: Lazy.t) in z to g) { () } -for ((lazy x: Lazy.t) as l in z to g) { () } -for ((lazy (x: Lazy.t) as l) in z to g) { () } -for ((lazy ((x: Lazy.t) as l)) in z to g) { () } diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/or.res b/jscomp/syntax/tests/parsing/grammar/pattern/or.res index d7f37cc590..d83a3bb2f7 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/or.res +++ b/jscomp/syntax/tests/parsing/grammar/pattern/or.res @@ -5,6 +5,4 @@ switch x { | (Blue as c1) | (Red as c2) => () | exception Exit | exception Continue => () | exception (Exit | exception Continue) => () -| lazy x | lazy y => () -| lazy (x | lazy y) => () } diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/polyvariants.res b/jscomp/syntax/tests/parsing/grammar/pattern/polyvariants.res index 44e891b6a7..9a725e04ac 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/polyvariants.res +++ b/jscomp/syntax/tests/parsing/grammar/pattern/polyvariants.res @@ -94,7 +94,6 @@ let cmp = (selectedChoice, value) => | #...a as x => true | # ...a | # ... b => true | (#...a : typ) => true - | lazy #...a => true | exception #...a => true | _ => false } diff --git a/jscomp/syntax/tests/printer/comments/blockExpr.res b/jscomp/syntax/tests/printer/comments/blockExpr.res index 665752d659..8f1aca233e 100644 --- a/jscomp/syntax/tests/printer/comments/blockExpr.res +++ b/jscomp/syntax/tests/printer/comments/blockExpr.res @@ -369,18 +369,6 @@ assert({ // test }) -lazy { - // here - open /* inside */ Matrix - // c - - // c2 - compare(m1, m2) - // after - - // test -} - user.name = { // here open /* inside */ Names diff --git a/jscomp/syntax/tests/printer/comments/expr.res b/jscomp/syntax/tests/printer/comments/expr.res index a6c20dca71..52d77f5fc0 100644 --- a/jscomp/syntax/tests/printer/comments/expr.res +++ b/jscomp/syntax/tests/printer/comments/expr.res @@ -64,9 +64,6 @@ let x = { // Pexp_assert let x = /* here */ assert( /* c0 */ true /* c1 */) -// Pexp_lazy -let x = /* here */ lazy /* c0 */ true /* c1 */ - // Pexp_constraint let x = (/* c0 */ "string" /* c1 */: /* c2 */ string /* c3 */) // after diff --git a/jscomp/syntax/tests/printer/comments/pattern.res b/jscomp/syntax/tests/printer/comments/pattern.res index 230bbafd09..8bcb620b8f 100644 --- a/jscomp/syntax/tests/printer/comments/pattern.res +++ b/jscomp/syntax/tests/printer/comments/pattern.res @@ -75,9 +75,6 @@ let _ = switch "anything" { // Ppat_constraint let /* c0 */ number /* c1 */: /* c2 */ int /* c3 */ = 123 -// Ppat_lazy -let /* before */ lazy /* a */ x /* b */ /* after */ = lazy 1 - // Ppat_unpack let /* before */ module(/* h1 */ Hashtbl /* h2 */) /* after */ = Hashtbl let /* before */ module(/* h1 */ Hashtbl /* h2 */: /* h3 */ MutableTable /* h4 */) /* after */ = Hashtbl diff --git a/jscomp/syntax/tests/printer/expr/assert.res b/jscomp/syntax/tests/printer/expr/assert.res index e7501eb6a8..471e69f61e 100644 --- a/jscomp/syntax/tests/printer/expr/assert.res +++ b/jscomp/syntax/tests/printer/expr/assert.res @@ -40,7 +40,6 @@ let x = assert (while i < 10 { print_int(i) }) -let x = assert (lazy false) let x = assert (try sideEffect() catch {| Exit => ()}) let x = assert (@attr expr) diff --git a/jscomp/syntax/tests/printer/expr/asyncAwait.res b/jscomp/syntax/tests/printer/expr/asyncAwait.res index e6cd380ec9..870f770ba5 100644 --- a/jscomp/syntax/tests/printer/expr/asyncAwait.res +++ b/jscomp/syntax/tests/printer/expr/asyncAwait.res @@ -22,7 +22,6 @@ let maybeSomeValue = switch await fetchData(url) { -(await f) await 1 + await 2 -lazy (await f()) assert(await f()) (await f).json() @@ -63,7 +62,6 @@ let _ = await (f(x) : Js.Promise.t) let _ = await (while true { infiniteLoop() }) let _ = await (try ok() catch { | _ => logError() }) let _ = await (for i in 0 to 10 { sideEffect()}) -let _ = await (lazy x) let _ = await (assert(x)) let _ = await promises[0] let _ = await promises["resolved"] diff --git a/jscomp/syntax/tests/printer/expr/binary.res b/jscomp/syntax/tests/printer/expr/binary.res index 4d84f5526a..22507f3eee 100644 --- a/jscomp/syntax/tests/printer/expr/binary.res +++ b/jscomp/syntax/tests/printer/expr/binary.res @@ -251,9 +251,6 @@ let x = a && {exception Exit; raise(Exit)} && {exception Exit; raise(Exit)} let x = a && assert(false) let x = a && assert(false) && assert(true) -let x = a && lazy false -let x = a && lazy false && lazy true - let x = a && {open React; killPerform()} let x = a && {open React; killPerform()} && {open Dom; regainPerform()} diff --git a/jscomp/syntax/tests/printer/expr/braced.res b/jscomp/syntax/tests/printer/expr/braced.res index 93f463ca74..d04e1478c0 100644 --- a/jscomp/syntax/tests/printer/expr/braced.res +++ b/jscomp/syntax/tests/printer/expr/braced.res @@ -126,7 +126,6 @@ map(( let _ = assert({ true }) let _ = { assert({ true }) } -let _ = { lazy { true } } let _ = { %extension } let _ = { module(ME) } diff --git a/jscomp/syntax/tests/printer/expr/exoticIdent.res b/jscomp/syntax/tests/printer/expr/exoticIdent.res index afec5bd3f4..c096f19c5d 100644 --- a/jscomp/syntax/tests/printer/expr/exoticIdent.res +++ b/jscomp/syntax/tests/printer/expr/exoticIdent.res @@ -45,8 +45,6 @@ let x = (\"type" : \"module") assert(\"let") -lazy \"let" - %\"let" %\"let"(`console.log`) diff --git a/jscomp/syntax/tests/printer/expr/field.res b/jscomp/syntax/tests/printer/expr/field.res index 918f7c0eea..f0f48c55f8 100644 --- a/jscomp/syntax/tests/printer/expr/field.res +++ b/jscomp/syntax/tests/printer/expr/field.res @@ -42,7 +42,6 @@ let x = (while i < 10 { }).x let x = (assert(false)).x -let x = (lazy false).x let x = (try sideEffect() catch {| Exit => ()}).x let x = (@attr expr).x diff --git a/jscomp/syntax/tests/printer/expr/jsx.res b/jscomp/syntax/tests/printer/expr/jsx.res index acd7debfbe..7387b073e7 100644 --- a/jscomp/syntax/tests/printer/expr/jsx.res +++ b/jscomp/syntax/tests/printer/expr/jsx.res @@ -176,7 +176,6 @@ let x = exception Exit; raise(Exit) }} - lazyExpr={lazy stuff()} assertExpr={assert(true)} pack=module(Foo) pack={module(Foo)} @@ -248,7 +247,6 @@ let x = exception Exit; raise(Exit) }} - {lazy stuff()} {assert(true)} {module(Foo)} module(Foo) diff --git a/jscomp/syntax/tests/printer/expr/lazy.res b/jscomp/syntax/tests/printer/expr/lazy.res deleted file mode 100644 index 9d0fd7b04a..0000000000 --- a/jscomp/syntax/tests/printer/expr/lazy.res +++ /dev/null @@ -1,56 +0,0 @@ -let x = lazy sideEffect - -// parens -let x = lazy true -let x = lazy 12 -let x = lazy (12: int) -let x = lazy 12 -let x = lazy list{1, 2, ...x} -let x = lazy module(Foo: Bar) -let x = lazy module(Foo) -let x = lazy Rgb(1, 2, 3) -let x = lazy [a, b, c] -let x = lazy {x: 1, y: 3} -let x = lazy (1, 2, 3) -let x = lazy %extension -let x = lazy user.name -let x = lazy streets[0] -let x = lazy apply(arg1, arg2) -let x = lazy apply(. arg1, arg2) -let x = lazy -1 -let x = lazy !true -let x = lazy (x => print(x)) -let x = lazy (switch x { - | Blue => () - | Yello => () -}) - -let x = lazy (for i in 0 to 10 { - print_int(i) -}) - -let x = lazy (if i < 10 { - print_int(i) -} else { - print_int(1000) -}) - -let x = lazy (while i < 10 { - print_int(i) -}) - -let x = lazy (assert(false)) -let x = lazy (try sideEffect() catch {| Exit => ()}) - -let x = lazy (@attr expr) - -let x = lazy (a + b) - -let x = @attr lazy x - -let x = lazy street["number"] -let x = lazy streets[0] - -lazy (address["street"] = "Brusselsestraat") - -lazy (true ? 0 : 1) diff --git a/jscomp/syntax/tests/printer/expr/ternary.res b/jscomp/syntax/tests/printer/expr/ternary.res index 8476516155..51725ca0a4 100644 --- a/jscomp/syntax/tests/printer/expr/ternary.res +++ b/jscomp/syntax/tests/printer/expr/ternary.res @@ -99,7 +99,7 @@ let () = condition1 ? for i in 0 to 10 { () } : for i in 10 to 20 { () } let () = (truth : bool) ? (10: int) : (20: int) let () = condition ? {module L = Logger; L.log()} : {exception Exit; raise(Exit)} -let () = condition ? lazy foo() : assert(false) +let () = condition ? foo() : assert(false) let x = condition ? module(Foo) : module(Int : Number) let x = condition ? module(ModuleWithVeryLooooooooooooooooongNameHere) : module(ModuleWithVeryLooooooooooooooooongNameHereInt : Number) diff --git a/jscomp/syntax/tests/printer/expr/unary.res b/jscomp/syntax/tests/printer/expr/unary.res index 0aba0aea7e..f7aa2905b5 100644 --- a/jscomp/syntax/tests/printer/expr/unary.res +++ b/jscomp/syntax/tests/printer/expr/unary.res @@ -25,8 +25,6 @@ let x = -a.bar // same as above let x = -(a.bar) -!(lazy x) -lazy !x !(assert(x)) assert(!x) !(@attr expr) diff --git a/jscomp/syntax/tests/printer/expr/underscoreApply.res b/jscomp/syntax/tests/printer/expr/underscoreApply.res index 373f365550..6740f76784 100644 --- a/jscomp/syntax/tests/printer/expr/underscoreApply.res +++ b/jscomp/syntax/tests/printer/expr/underscoreApply.res @@ -41,7 +41,6 @@ f(a, b, _) + g(x, _, z) f(a, b, _) + g(x, _, z) + h(alpha, beta, _) assert(f(a, b, _)) -lazy f(a, b, _) getDirector(a, b, _).name diff --git a/jscomp/syntax/tests/printer/pattern/constant.res b/jscomp/syntax/tests/printer/pattern/constant.res index caed977dd9..d36776f74f 100644 --- a/jscomp/syntax/tests/printer/pattern/constant.res +++ b/jscomp/syntax/tests/printer/pattern/constant.res @@ -23,7 +23,6 @@ switch science { | -4.15 as x => true | -4.15 | +4.15 => true | (-3.14 : float) => true -| lazy 5.678 => true | exception 19.34 => true | _ => false } @@ -50,7 +49,6 @@ switch literal { | `literal` as x => true | `literal` | `literal` => true | (`literal` : string) => true -| lazy `literal` => true | exception `literal` => true | _ => false } diff --git a/jscomp/syntax/tests/printer/pattern/lazy.res b/jscomp/syntax/tests/printer/pattern/lazy.res deleted file mode 100644 index 77a8286a09..0000000000 --- a/jscomp/syntax/tests/printer/pattern/lazy.res +++ /dev/null @@ -1,3 +0,0 @@ -let lazy x = 1 -let lazy (Foo | Bar) = 1 -let lazy (x as y) = 1 diff --git a/jscomp/syntax/tests/printer/pattern/record.res b/jscomp/syntax/tests/printer/pattern/record.res index e627e6c74a..e880cb0182 100644 --- a/jscomp/syntax/tests/printer/pattern/record.res +++ b/jscomp/syntax/tests/printer/pattern/record.res @@ -52,8 +52,6 @@ let get_age3 = ({age: Red | Blue | Green, name: _}) => age2 let get_age3 = ({age: #...ppatType, name: _}) => age2 -let get_age3 = ({age: lazy ppatType, name: _}) => age2 - let get_age3 = ({age: module(P), name: _}) => age2 let get_age3 = ({age: module(P: S), name: _}) => age2 diff --git a/jscomp/syntax/tests/printer/pattern/variant.res b/jscomp/syntax/tests/printer/pattern/variant.res index dce2b21a3a..08e54f3656 100644 --- a/jscomp/syntax/tests/printer/pattern/variant.res +++ b/jscomp/syntax/tests/printer/pattern/variant.res @@ -25,7 +25,6 @@ let cmp = (selectedChoice, value) => | #...a as x => true | #...a | #...b => true | (#...a : typ) => true - | lazy #...a => true | exception #...a => true | #"1" => true | #"123" => true diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index ec03b4cfab..b1ce7ef10a 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -338,7 +338,6 @@ o test/gpr_977_test.cmi test/gpr_977_test.cmj : cc test/gpr_977_test.res | test/ o test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj : cc test/gpr_return_type_unused_attribute.res | $bsc $stdlib runtime o test/gray_code_test.cmi test/gray_code_test.cmj : cc test/gray_code_test.res | $bsc $stdlib runtime o test/guide_for_ext.cmi test/guide_for_ext.cmj : cc test/guide_for_ext.res | $bsc $stdlib runtime -o test/hamming_test.cmi test/hamming_test.cmj : cc test/hamming_test.res | test/mt.cmj $bsc $stdlib runtime o test/hash_collision_test.cmi test/hash_collision_test.cmj : cc test/hash_collision_test.res | test/mt.cmj $bsc $stdlib runtime o test/hash_sugar_desugar.cmj : cc_cmi test/hash_sugar_desugar.res | test/hash_sugar_desugar.cmi $bsc $stdlib runtime o test/hash_sugar_desugar.cmi : cc test/hash_sugar_desugar.resi | $bsc $stdlib runtime @@ -714,4 +713,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/ImportAttributes.cmi test/ImportAttributes.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_projector_test.cmi test/derive_projector_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/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 +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/ImportAttributes.cmi test/ImportAttributes.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_projector_test.cmi test/derive_projector_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/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/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/ext_filename_test.js b/jscomp/test/ext_filename_test.js index 229a506941..39ccaaa4b2 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -20,12 +20,9 @@ var node_parent = ".."; var node_current = "."; -var cwd = { - LAZY_DONE: false, - VAL: (function () { +var cwd = CamlinternalLazy.from_fun(function () { return Caml_sys.sys_getcwd(); - }) -}; + }); function path_as_directory(x) { if (x === "" || Ext_string_test.ends_with(x, Filename.dir_sep)) { @@ -195,13 +192,10 @@ function find_package_json_dir(cwd) { return find_root_filename(cwd, Test_literals.bsconfig_json); } -var package_dir = { - LAZY_DONE: false, - VAL: (function () { +var package_dir = CamlinternalLazy.from_fun(function () { var cwd$1 = CamlinternalLazy.force(cwd); return find_root_filename(cwd$1, Test_literals.bsconfig_json); - }) -}; + }); function module_name_of_file(file) { var s = Filename.chop_extension(Curry._1(Filename.basename, file)); diff --git a/jscomp/test/ext_filename_test.res b/jscomp/test/ext_filename_test.res index fcb80a6da1..86ffdaf2f8 100644 --- a/jscomp/test/ext_filename_test.res +++ b/jscomp/test/ext_filename_test.res @@ -32,7 +32,7 @@ type t = [ | #Dir(string) ] -let cwd = lazy Sys.getcwd() +let cwd = Lazy.from_fun(() => Sys.getcwd()) let \"//" = Filename.concat @@ -211,7 +211,7 @@ let rec find_root_filename = (~cwd, filename) => let find_package_json_dir = cwd => find_root_filename(~cwd, Test_literals.bsconfig_json) -let package_dir = lazy find_package_json_dir(Lazy.force(cwd)) +let package_dir = Lazy.from_fun(() => find_package_json_dir(Lazy.force(cwd))) let module_name_of_file = file => String.capitalize_ascii(\"@@"(Filename.chop_extension, Filename.basename(file))) diff --git a/jscomp/test/gpr_3697_test.js b/jscomp/test/gpr_3697_test.js index 8f637814e5..1b6f27b4ba 100644 --- a/jscomp/test/gpr_3697_test.js +++ b/jscomp/test/gpr_3697_test.js @@ -6,12 +6,9 @@ var CamlinternalLazy = require("../../lib/js/camlinternalLazy.js"); function fix(param) { return { TAG: "Fix", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return fix(); }) - } }; } @@ -25,8 +22,8 @@ function unfixLeak(_f) { function unfix(p) { while(true) { - var match = p.contents; - p.contents = CamlinternalLazy.force(match._0); + var h = p.contents; + p.contents = CamlinternalLazy.force(h._0); }; } diff --git a/jscomp/test/gpr_3697_test.res b/jscomp/test/gpr_3697_test.res index 96d88c5d48..0c11967c4d 100644 --- a/jscomp/test/gpr_3697_test.res +++ b/jscomp/test/gpr_3697_test.res @@ -1,6 +1,6 @@ type rec t<'a> = Fix(lazy_t>) -let rec fix = () => Fix(lazy fix()) +let rec fix = () => Fix(Lazy.from_fun(fix)) let rec unfixLeak = (Fix(f)) => \"@@"(unfixLeak, Lazy.force(f)) @@ -8,7 +8,7 @@ let unfix = p => while true { p := switch p.contents { - | Fix(lazy h) => h + | Fix(h) => Lazy.force(h) } } /* ;; unfixLeak (fix ()) */ diff --git a/jscomp/test/hamming_test.res b/jscomp/test/hamming_test.res deleted file mode 100644 index 9f5ae622db..0000000000 --- a/jscomp/test/hamming_test.res +++ /dev/null @@ -1,225 +0,0 @@ -/* ********************************************************************* */ -/* */ -/* OCaml */ -/* */ -/* Damien Doligez, projet Moscova, INRIA Rocquencourt */ -/* */ -/* Copyright 2002 Institut National de Recherche en Informatique et */ -/* en Automatique. All rights reserved. This file is distributed */ -/* under the terms of the Q Public License version 1.0. */ -/* */ -/* ********************************************************************* */ - -/* We cannot use bignums because we don't do custom runtimes, but - int64 is a bit short, so we roll our own 37-digit numbers... -*/ - -let n0 = Int64.of_int(0) -let n1 = Int64.of_int(1) -let n2 = Int64.of_int(2) -let n3 = Int64.of_int(3) -let n5 = Int64.of_int(5) - -let \"%" = Int64.rem -let \"*" = Int64.mul -let \"/" = Int64.div -let \"+" = Int64.add -let digit = Int64.of_string("1000000000000000000") - -let mul = (n, (pl, ph)) => (\"%"(n * pl, digit), n * ph + n * pl / digit) -let cmp = ((nl, nh), (pl, ph)) => - if nh < ph { - -1 - } else if nh > ph { - 1 - } else if nl < pl { - -1 - } else if nl > pl { - 1 - } else { - 0 - } - -let x2 = p => mul(n2, p) -let x3 = p => mul(n3, p) -let x5 = p => mul(n5, p) - -let nn1 = (n1, n0) -let buf = Buffer.create(5000) -let paddding = s => - if String.length(s) <= 18 { - Js.String2.repeat("0", 18 - String.length(s)) ++ s - } else { - s - } -let pr = ((nl, nh)) => - if compare(nh, n0) == 0 { - Buffer.add_string(buf, Int64.to_string(nl)) - Buffer.add_string(buf, "\n") - } else { - Buffer.add_string(buf, Int64.to_string(nh)) - Buffer.add_string(buf, paddding(Int64.to_string(nl))) - Buffer.add_string(buf, "\n") - } - -/* This is where the interesting stuff begins. */ - -open Lazy - -type rec lcons<'a> = Cons('a, Lazy.t>) -type llist<'a> = Lazy.t> - -let rec map = (f, l) => - lazy ( - switch force(l) { - | Cons(x, ll) => Cons(f(x), map(f, ll)) - } - ) - -let rec merge = (cmp, l1, l2) => - lazy ( - switch (force(l1), force(l2)) { - | (Cons(x1, ll1), Cons(x2, ll2)) => - let c = cmp(x1, x2) - if c == 0 { - Cons(x1, merge(cmp, ll1, ll2)) - } else if c < 0 { - Cons(x1, merge(cmp, ll1, l2)) - } else { - Cons(x2, merge(cmp, l1, ll2)) - } - } - ) - -let rec iter_interval = (f, l, (start, stop)) => - if stop == 0 { - () - } else { - switch force(l) { - | Cons(x, ll) => - if start <= 0 { - f(x) - } - iter_interval(f, ll, (start - 1, stop - 1)) - } - } - -let rec hamming = lazy Cons(nn1, merge(cmp, ham2, merge(cmp, ham3, ham5))) -and ham2 = lazy force(map(x2, hamming)) -and ham3 = lazy force(map(x3, hamming)) -and ham5 = lazy force(map(x5, hamming)) - -iter_interval(pr, hamming, (88000, 88100)) - -Mt.from_pair_suites( - __MODULE__, - list{ - ( - "output", - _ => Eq( - Buffer.contents(buf), - `6726050156250000000000000000000000000 -6729216728661136606575523242669244416 -6730293634611118019721084375000000000 -6731430439413948088320000000000000000 -6733644878411293029785156250000000000 -6736815026358904613608094481682268160 -6739031236724077363200000000000000000 -6743282904874568941599068856042651648 -6744421903677486140423997176256921600 -6746640616477458432000000000000000000 -6750000000000000000000000000000000000 -6750897085400702945836103937453588480 -6752037370304563380023474956271616000 -6754258588364960445000000000000000000 -6755399441055744000000000000000000000 -6757621765136718750000000000000000000 -6758519863481752323552044362431792300 -6759661435938757375539248533340160000 -6761885162088395001166534423828125000 -6763027302973440000000000000000000000 -6765252136392518877983093261718750000 -6767294110289640371843415775641600000 -6768437164792816653010961694720000000 -6770663777894400000000000000000000000 -6774935403077748181101173538816000000 -6776079748261363229431903027200000000 -6778308875544000000000000000000000000 -6782585324034592562287109312160000000 -6783730961356018699387011072000000000 -6785962605658597412109375000000000000 -6789341568946838378906250000000000000 -6791390813820928754681118720000000000 -6794772480000000000000000000000000000 -6799059315411241693033267200000000000 -6800207735332289107722240000000000000 -6802444800000000000000000000000000000 -6806736475893120841673472000000000000 -6807886192552970708582400000000000000 -6810125783203125000000000000000000000 -6814422305043756994967597929687500000 -6815573319906622439424000000000000000 -6817815439391434192657470703125000000 -6821025214188390921278195662703296512 -6821210263296961784362792968750000000 -6823269127183128330240000000000000000 -6828727177473454717179297140960133120 -6830973624183426662400000000000000000 -6834375000000000000000000000000000000 -6835283298968211732659055236671758336 -6836437837433370422273768393225011200 -6838686820719522450562500000000000000 -6839841934068940800000000000000000000 -6842092037200927734375000000000000000 -6844157203887991842733489140006912000 -6845313241232438768082197309030400000 -6847565144260608000000000000000000000 -6849817788097425363957881927490234375 -6851885286668260876491458472837120000 -6853042629352726861173598715904000000 -6855297075118080000000000000000000000 -6859622095616220033364938208051200000 -6860780745114630269799801815040000000 -6863037736488300000000000000000000000 -6866455078125000000000000000000000000 -6867367640585024969315698178562000000 -6868527598372968933129348710400000000 -6870787138229329879760742187500000000 -6871947673600000000000000000000000000 -6874208338558673858642578125000000000 -6876283198993690364114632704000000000 -6879707136000000000000000000000000000 -6884047556853882214196183040000000000 -6885210332023942721568768000000000000 -6887475360000000000000000000000000000 -6891820681841784852194390400000000000 -6892984769959882842439680000000000000 -6895252355493164062500000000000000000 -6899602583856803957404692903808593750 -6900767986405455219916800000000000000 -6903038132383827120065689086914062500 -6906475391588173806667327880859375000 -6908559991272917434368000000000000000 -6912000000000000000000000000000000000 -6914086267191872901144038355222134784 -6916360794485719495680000000000000000 -6917529027641081856000000000000000000 -6919804687500000000000000000000000000 -6921893310401287552552190498140323840 -6924170405978516481194531250000000000 -6925339958244802560000000000000000000 -6927618187665939331054687500000000000 -6929709168936591740767657754256998400 -6930879656747844252683224775393280000 -6933159708563865600000000000000000000 -6937533852751614137447601703747584000 -6938705662219635946938268699852800000 -6940988288557056000000000000000000000 -6945367371811422783781999935651840000 -6946540504428563148172299337728000000 -6948825708194403750000000000000000000 -`, - ), - ), - }, -) diff --git a/jscomp/test/lazy_demo.js b/jscomp/test/lazy_demo.js index 9d5062f583..4fdc4f534b 100644 --- a/jscomp/test/lazy_demo.js +++ b/jscomp/test/lazy_demo.js @@ -3,18 +3,14 @@ var CamlinternalLazy = require("../../lib/js/camlinternalLazy.js"); -var lazy1 = { - LAZY_DONE: false, - VAL: (function () { +var lazy1 = CamlinternalLazy.from_fun(function () { console.log("Hello, lazy"); return 1; - }) -}; + }); -var lazy2 = { - LAZY_DONE: true, - VAL: 3 -}; +var lazy2 = CamlinternalLazy.from_fun(function () { + return 3; + }); console.log(lazy1, lazy2); diff --git a/jscomp/test/lazy_demo.res b/jscomp/test/lazy_demo.res index 65c9eb30fb..c3e4abc3f1 100644 --- a/jscomp/test/lazy_demo.res +++ b/jscomp/test/lazy_demo.res @@ -1,12 +1,13 @@ -let lazy1 = lazy { +let lazy1 = Lazy.from_fun(() => { "Hello, lazy"->Js.log 1 -} +}) -let lazy2 = lazy 3 +let lazy2 = Lazy.from_fun(() => 3) Js.log2(lazy1, lazy2) -let (lazy la, lazy lb) = (lazy1, lazy2) +// can't destructure lazy values +let (la, lb) = (Lazy.force(lazy1), Lazy.force(lazy2)) Js.log2(la, lb) diff --git a/jscomp/test/lazy_test.js b/jscomp/test/lazy_test.js index b973dbdc5e..59956c4420 100644 --- a/jscomp/test/lazy_test.js +++ b/jscomp/test/lazy_test.js @@ -4,18 +4,14 @@ var Mt = require("./mt.js"); var Lazy = require("../../lib/js/lazy.js"); var CamlinternalLazy = require("../../lib/js/camlinternalLazy.js"); -var Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); var u = { contents: 3 }; -var v = { - LAZY_DONE: false, - VAL: (function () { +var v = CamlinternalLazy.from_fun(function () { u.contents = 32; - }) -}; + }); function lazy_test(param) { var h = u.contents; @@ -27,156 +23,62 @@ function lazy_test(param) { ]; } -function f(x) { - CamlinternalLazy.force(x[0]); - var match = x[2].contents; - if (match === undefined) { - return 0; - } - CamlinternalLazy.force(x[1]); - var x$1 = x[2].contents; - if (x$1 !== undefined) { - return 1; - } - throw { - RE_EXN_ID: "Match_failure", - _1: [ - "lazy_test.res", - 14, - 2 - ], - Error: new Error() - }; -} - -var s = { - contents: undefined -}; - -var set_true = { - LAZY_DONE: false, - VAL: (function () { - s.contents = 1; - }) -}; - -var set_false = { - LAZY_DONE: false, - VAL: (function () { - s.contents = undefined; - }) -}; - -var h; - -try { - h = f([ - set_true, - set_false, - s - ]); -} -catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.RE_EXN_ID === "Match_failure") { - h = 2; - } else { - throw exn; - } -} - var u_v = { contents: 0 }; -var u$1 = { - LAZY_DONE: false, - VAL: (function () { +var u$1 = CamlinternalLazy.from_fun(function () { u_v.contents = 2; - }) -}; + }); CamlinternalLazy.force(u$1); var exotic = CamlinternalLazy.force; -var l_from_fun = { - LAZY_DONE: false, - VAL: (function () { +var l_from_fun = CamlinternalLazy.from_fun(function () { return 3; - }) -}; + }); -var forward_test = { - LAZY_DONE: false, - VAL: (function () { +var forward_test = CamlinternalLazy.from_fun(function () { var u = 3; u = u + 1 | 0; return u; - }) -}; + }); -var f005 = { - LAZY_DONE: true, - VAL: 6 -}; +var f005 = CamlinternalLazy.from_fun(function () { + return 6; + }); -var f006 = { - LAZY_DONE: false, - VAL: (function () { +var f006 = CamlinternalLazy.from_fun(function () { return function (param) { return 3; }; - }) -}; + }); -var f007 = { - LAZY_DONE: false, - VAL: (function () { +var f007 = CamlinternalLazy.from_fun(function () { throw { RE_EXN_ID: "Not_found", Error: new Error() }; - }) -}; + }); -var f008 = { - LAZY_DONE: false, - VAL: (function () { +var f008 = CamlinternalLazy.from_fun(function () { console.log("hi"); throw { RE_EXN_ID: "Not_found", Error: new Error() }; - }) -}; + }); -function a2(x) { - return { - LAZY_DONE: true, - VAL: x - }; -} +var a2 = CamlinternalLazy.from_val; -var a3 = { - LAZY_DONE: true, - VAL: 3 -}; +var a3 = CamlinternalLazy.from_val(3); -var a4 = { - LAZY_DONE: true, - VAL: 3 -}; +var a4 = CamlinternalLazy.from_val(3); -var a5 = { - LAZY_DONE: true, - VAL: undefined -}; +var a5 = CamlinternalLazy.from_val(undefined); -var a6 = { - LAZY_DONE: true, - VAL: undefined -}; +var a6 = CamlinternalLazy.from_val(); var a7 = CamlinternalLazy.force(a5); @@ -198,80 +100,70 @@ Mt.from_pair_suites("Lazy_test", { ], tl: { hd: [ - "lazy_match", + "lazy_force", (function (param) { return { TAG: "Eq", - _0: h, + _0: u_v.contents, _1: 2 }; }) ], tl: { hd: [ - "lazy_force", + "lazy_from_fun", (function (param) { return { TAG: "Eq", - _0: u_v.contents, - _1: 2 + _0: CamlinternalLazy.force(l_from_fun), + _1: 3 }; }) ], tl: { hd: [ - "lazy_from_fun", + "lazy_from_val", (function (param) { return { TAG: "Eq", - _0: CamlinternalLazy.force(l_from_fun), + _0: CamlinternalLazy.force(CamlinternalLazy.from_val(3)), _1: 3 }; }) ], tl: { hd: [ - "lazy_from_val", + "lazy_from_val2", (function (param) { return { TAG: "Eq", - _0: CamlinternalLazy.force({ - LAZY_DONE: true, - VAL: 3 - }), + _0: CamlinternalLazy.force(CamlinternalLazy.force(CamlinternalLazy.from_val(CamlinternalLazy.from_fun(function () { + return 3; + })))), _1: 3 }; }) ], tl: { hd: [ - "lazy_from_val2", + "lazy_from_val3", (function (param) { + debugger; return { TAG: "Eq", - _0: CamlinternalLazy.force(CamlinternalLazy.force({ - LAZY_DONE: true, - VAL: { - LAZY_DONE: true, - VAL: 3 - } - })), - _1: 3 + _0: CamlinternalLazy.force(CamlinternalLazy.force(CamlinternalLazy.from_val(forward_test))), + _1: 4 }; }) ], tl: { hd: [ - "lazy_from_val3", + "lazy_test.res", (function (param) { - debugger; return { TAG: "Eq", - _0: CamlinternalLazy.force(CamlinternalLazy.force({ - LAZY_DONE: true, - VAL: forward_test - })), - _1: 4 + _0: a3, + _1: a4 }; }) ], @@ -281,8 +173,8 @@ Mt.from_pair_suites("Lazy_test", { (function (param) { return { TAG: "Eq", - _0: a3, - _1: a4 + _0: a7, + _1: undefined }; }) ], @@ -292,55 +184,37 @@ Mt.from_pair_suites("Lazy_test", { (function (param) { return { TAG: "Eq", - _0: a7, + _0: a8, _1: undefined }; }) ], tl: { hd: [ - "lazy_test.res", + "File \"lazy_test.res\", line 95, characters 7-14", (function (param) { return { - TAG: "Eq", - _0: a8, - _1: undefined + TAG: "Ok", + _0: Lazy.is_val(CamlinternalLazy.from_val(3)) }; }) ], tl: { hd: [ - "File \"lazy_test.res\", line 98, characters 7-14", + "File \"lazy_test.res\", line 96, characters 7-14", (function (param) { return { TAG: "Ok", - _0: Lazy.is_val({ - LAZY_DONE: true, - VAL: 3 - }) + _0: !Lazy.is_val(CamlinternalLazy.from_fun(function () { + throw { + RE_EXN_ID: "Not_found", + Error: new Error() + }; + })) }; }) ], - tl: { - hd: [ - "File \"lazy_test.res\", line 99, characters 7-14", - (function (param) { - return { - TAG: "Ok", - _0: !Lazy.is_val({ - LAZY_DONE: false, - VAL: (function () { - throw { - RE_EXN_ID: "Not_found", - Error: new Error() - }; - }) - }) - }; - }) - ], - tl: /* [] */0 - } + tl: /* [] */0 } } } @@ -355,11 +229,6 @@ Mt.from_pair_suites("Lazy_test", { exports.v = v; exports.lazy_test = lazy_test; -exports.f = f; -exports.s = s; -exports.set_true = set_true; -exports.set_false = set_false; -exports.h = h; exports.u_v = u_v; exports.u = u$1; exports.exotic = exotic; @@ -376,4 +245,4 @@ exports.a5 = a5; exports.a6 = a6; exports.a7 = a7; exports.a8 = a8; -/* h Not a pure module */ +/* Not a pure module */ diff --git a/jscomp/test/lazy_test.res b/jscomp/test/lazy_test.res index 709542a23e..00b9bd7c32 100644 --- a/jscomp/test/lazy_test.res +++ b/jscomp/test/lazy_test.res @@ -1,5 +1,5 @@ let u = ref(3) -let v = lazy (u := 32) +let v = Lazy.from_fun(() => (u := 32)) let lazy_test = () => { let h = u.contents @@ -10,24 +10,21 @@ let lazy_test = () => { (h, g) } -let f = x => - switch x { - | (lazy (), _, {contents: None}) => 0 - | (_, lazy (), {contents: Some(x)}) => 1 - } +/* lazy_match isn't available anymore */ +// let f = x => +// switch x { +// | (lazy (), _, {contents: None}) => 0 +// | (_, lazy (), {contents: Some(x)}) => 1 +// } -/* PR #5992 */ -/* Was segfaulting */ -let s = ref(None) -let set_true = lazy (s := Some(1)) -let set_false = lazy (s := None) - -let h = try f((set_true, set_false, s)) catch { -| Match_failure(_) => 2 -} +// /* PR #5992 */ +// /* Was segfaulting */ +// let s = ref(None) +// let set_true = lazy (s := Some(1)) +// let set_false = lazy (s := None) let u_v = ref(0) -let u = lazy (u_v := 2) +let u = Lazy.from_fun(() => u_v := 2) let () = Lazy.force(u) /* module Mt = Mock_mt */ @@ -35,41 +32,41 @@ let () = Lazy.force(u) let exotic = x => switch x { /* Lazy in a pattern. (used in advi) */ - | lazy y => y + | y => Lazy.force(y) } /* let l_from_val = Lazy.from_val 3 */ let l_from_fun = Lazy.from_fun(_ => 3) -let forward_test = lazy { +let forward_test = Lazy.from_fun(() => { let u = ref(3) incr(u) u.contents -} +}) /* module Mt = Mock_mt */ -let f005 = lazy (1 + 2 + 3) +let f005 = Lazy.from_fun(() => (1 + 2 + 3)) -let f006 = lazy { +let f006: lazy_t<() => int> = Lazy.from_fun(() => { let x = 3 _ => x -} +}) -let f007 = lazy raise(Not_found) -let f008 = lazy { +let f007 = Lazy.from_fun(() => raise(Not_found)) +let f008 = Lazy.from_fun(() => { print_endline("hi") raise(Not_found) -} +}) -let a2 = x => lazy x +let a2 = x => Lazy.from_val(x) -let a3 = lazy 3 +let a3 = Lazy.from_val(3) let a4 = a2(3) -let a5 = lazy None -let a6 = lazy () +let a5 = Lazy.from_val(None) +let a6 = Lazy.from_val(()) -let lazy a7 = a5 -let lazy a8 = a6 +let a7 = Lazy.force(a5) +let a8 = Lazy.force(a6) Mt.from_pair_suites( __MODULE__, @@ -77,11 +74,11 @@ Mt.from_pair_suites( open Mt list{ ("simple", _ => Eq(lazy_test(), (3, 32))), - ("lazy_match", _ => Eq(h, 2)), + // ("lazy_match", _ => Eq(h, 2)), ("lazy_force", _ => Eq(u_v.contents, 2)), ("lazy_from_fun", _ => Eq(Lazy.force(l_from_fun), 3)), ("lazy_from_val", _ => Eq(Lazy.force(Lazy.from_val(3)), 3)), - ("lazy_from_val2", _ => Eq(\"@@"(Lazy.force, Lazy.force(Lazy.from_val(lazy 3))), 3)), + ("lazy_from_val2", _ => Eq(\"@@"(Lazy.force, Lazy.force(Lazy.from_val(Lazy.from_fun(() => 3)))), 3)), ( "lazy_from_val3", _ => Eq( @@ -95,8 +92,8 @@ Mt.from_pair_suites( (__FILE__, _ => Eq(a3, a4)), (__FILE__, _ => Eq(a7, None)), (__FILE__, _ => Eq(a8, ())), - (__LOC__, _ => Ok(Lazy.is_val(lazy 3))), - (__LOC__, _ => Ok(\"@@"(not, Lazy.is_val(lazy raise(Not_found))))), + (__LOC__, _ => Ok(Lazy.is_val(Lazy.from_val(3)))), + (__LOC__, _ => Ok(\"@@"(not, Lazy.is_val(Lazy.from_fun(() => raise(Not_found)))))), } }, ) diff --git a/jscomp/test/mpr_6033_test.js b/jscomp/test/mpr_6033_test.js index d6d1999965..79fe507930 100644 --- a/jscomp/test/mpr_6033_test.js +++ b/jscomp/test/mpr_6033_test.js @@ -30,18 +30,16 @@ function eq(loc, x, y) { } function f(x) { - var y = CamlinternalLazy.force(x); - return y + "abc"; + return CamlinternalLazy.force(x) + "abc"; } -var x = { - LAZY_DONE: true, - VAL: "def" -}; +var x = CamlinternalLazy.from_fun(function () { + return "def"; + }); CamlinternalLazy.force(x); -var u = f(x); +var u = CamlinternalLazy.force(x) + "abc"; eq("File \"mpr_6033_test.res\", line 20, characters 3-10", u, "defabc"); diff --git a/jscomp/test/mpr_6033_test.res b/jscomp/test/mpr_6033_test.res index 14a3e60103..e363b65b55 100644 --- a/jscomp/test/mpr_6033_test.res +++ b/jscomp/test/mpr_6033_test.res @@ -8,11 +8,11 @@ let eq = (loc, x, y) => { let f = x => switch x { - | lazy y => y ++ "abc" + | y => Lazy.force(y) ++ "abc" } let u = { - let x = lazy "def" + let x = Lazy.from_fun(() => "def") ignore(Lazy.force(x)) f(x) } diff --git a/jscomp/test/recursive_module.js b/jscomp/test/recursive_module.js index 439491cec3..6c6117c7f6 100644 --- a/jscomp/test/recursive_module.js +++ b/jscomp/test/recursive_module.js @@ -71,12 +71,9 @@ var Intb = Caml_module.init_mod([ ]] }); -var a = { - LAZY_DONE: false, - VAL: (function () { +var a = CamlinternalLazy.from_fun(function () { return CamlinternalLazy.force(Intb.a); - }) -}; + }); Caml_module.update_mod({ TAG: "Module", @@ -88,12 +85,9 @@ Caml_module.update_mod({ a: a }); -var a$1 = { - LAZY_DONE: false, - VAL: (function () { +var a$1 = CamlinternalLazy.from_fun(function () { return CamlinternalLazy.force(Inta.a) + 1 | 0; - }) -}; + }); Caml_module.update_mod({ TAG: "Module", @@ -145,12 +139,9 @@ var Intb$1 = Caml_module.init_mod([ ]] }); -var a$2 = { - LAZY_DONE: false, - VAL: (function () { +var a$2 = CamlinternalLazy.from_fun(function () { return CamlinternalLazy.force(Intb$1.a) + 1 | 0; - }) -}; + }); Caml_module.update_mod({ TAG: "Module", @@ -162,10 +153,9 @@ Caml_module.update_mod({ a: a$2 }); -var a$3 = { - LAZY_DONE: true, - VAL: 2 -}; +var a$3 = CamlinternalLazy.from_fun(function () { + return 2; + }); Caml_module.update_mod({ TAG: "Module", diff --git a/jscomp/test/recursive_module.res b/jscomp/test/recursive_module.res index 55ce60b8b2..5b618a193d 100644 --- a/jscomp/test/recursive_module.res +++ b/jscomp/test/recursive_module.res @@ -27,12 +27,12 @@ module rec Int3: { module rec Inta: { let a: lazy_t } = { - let a = lazy Lazy.force(Intb.a) + let a = Lazy.from_fun(() => Lazy.force(Intb.a)) } and Intb: { let a: lazy_t } = { - let a = lazy (Lazy.force(Inta.a) + 1) + let a = Lazy.from_fun(() => (Lazy.force(Inta.a) + 1)) } eq( @@ -47,12 +47,12 @@ module A = { module rec Inta: { let a: lazy_t } = { - let a = lazy (Lazy.force(Intb.a) + 1) + let a = Lazy.from_fun(() => (Lazy.force(Intb.a) + 1)) } and Intb: { let a: lazy_t } = { - let a = lazy 2 + let a = Lazy.from_fun(() => 2) } } diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index 5ec8926a27..e1268d6391 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -14,13 +14,8 @@ function init_mod(loc, shape) { if (typeof shape !== "object") { switch (shape) { case "Function" : - struct_[idx] = undef_module; - return ; case "Lazy" : - struct_[idx] = { - LAZY_DONE: true, - VAL: undef_module - }; + struct_[idx] = undef_module; return ; case "Class" : struct_[idx] = [ diff --git a/lib/es6/camlinternalLazy.js b/lib/es6/camlinternalLazy.js index 697cd9e5de..50aa8b04ef 100644 --- a/lib/es6/camlinternalLazy.js +++ b/lib/es6/camlinternalLazy.js @@ -50,10 +50,26 @@ function force_val(lzv) { } } +function from_fun(closure) { + return { + LAZY_DONE: false, + VAL: closure + }; +} + +function from_val(value) { + return { + LAZY_DONE: true, + VAL: value + }; +} + export { Undefined , force , force_val , is_val , + from_fun , + from_val , } /* No side effect */ diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index 621cc7b164..7795871253 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -39,12 +39,9 @@ function is_randomized(param) { return randomized.contents; } -var prng = { - LAZY_DONE: false, - VAL: (function () { +var prng = CamlinternalLazy.from_fun(function () { return Random.State.make_self_init(); - }) -}; + }); function power_2_above(_x, n) { while(true) { diff --git a/lib/es6/lazy.js b/lib/es6/lazy.js index 28fba1aefe..4a0416cb3a 100644 --- a/lib/es6/lazy.js +++ b/lib/es6/lazy.js @@ -4,20 +4,12 @@ import * as Curry from "./curry.js"; import * as CamlinternalLazy from "./camlinternalLazy.js"; function from_fun(f) { - return { - LAZY_DONE: false, - VAL: (function () { + return CamlinternalLazy.from_fun(function () { return Curry._1(f, undefined); - }) - }; + }); } -function from_val(v) { - return { - LAZY_DONE: true, - VAL: v - }; -} +var from_val = CamlinternalLazy.from_val; var Undefined = CamlinternalLazy.Undefined; diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 9352357c60..1e590cefe3 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -360,16 +360,13 @@ function lapp(f, s) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Sapp", _0: data(Curry._1(f, undefined)), _1: data(s) }; }) - } } }; } @@ -379,16 +376,13 @@ function lcons(f, s) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Scons", _0: Curry._1(f, undefined), _1: data(s) }; }) - } } }; } @@ -398,16 +392,13 @@ function lsing(f) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Scons", _0: Curry._1(f, undefined), _1: "Sempty" }; }) - } } }; } @@ -417,12 +408,9 @@ function slazy(f) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return data(Curry._1(f, undefined)); }) - } } }; } diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index aec2274939..1cd2221f78 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -14,13 +14,8 @@ function init_mod(loc, shape) { if (typeof shape !== "object") { switch (shape) { case "Function" : - struct_[idx] = undef_module; - return ; case "Lazy" : - struct_[idx] = { - LAZY_DONE: true, - VAL: undef_module - }; + struct_[idx] = undef_module; return ; case "Class" : struct_[idx] = [ diff --git a/lib/js/camlinternalLazy.js b/lib/js/camlinternalLazy.js index f812859e83..58643ff0c9 100644 --- a/lib/js/camlinternalLazy.js +++ b/lib/js/camlinternalLazy.js @@ -50,8 +50,24 @@ function force_val(lzv) { } } +function from_fun(closure) { + return { + LAZY_DONE: false, + VAL: closure + }; +} + +function from_val(value) { + return { + LAZY_DONE: true, + VAL: value + }; +} + exports.Undefined = Undefined; exports.force = force; exports.force_val = force_val; exports.is_val = is_val; +exports.from_fun = from_fun; +exports.from_val = from_val; /* No side effect */ diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index 83edfef324..ae6d7290d9 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -39,12 +39,9 @@ function is_randomized(param) { return randomized.contents; } -var prng = { - LAZY_DONE: false, - VAL: (function () { +var prng = CamlinternalLazy.from_fun(function () { return Random.State.make_self_init(); - }) -}; + }); function power_2_above(_x, n) { while(true) { diff --git a/lib/js/lazy.js b/lib/js/lazy.js index b22e3f9952..ffcd9a78b3 100644 --- a/lib/js/lazy.js +++ b/lib/js/lazy.js @@ -4,20 +4,12 @@ var Curry = require("./curry.js"); var CamlinternalLazy = require("./camlinternalLazy.js"); function from_fun(f) { - return { - LAZY_DONE: false, - VAL: (function () { + return CamlinternalLazy.from_fun(function () { return Curry._1(f, undefined); - }) - }; + }); } -function from_val(v) { - return { - LAZY_DONE: true, - VAL: v - }; -} +var from_val = CamlinternalLazy.from_val; var Undefined = CamlinternalLazy.Undefined; diff --git a/lib/js/stream.js b/lib/js/stream.js index 434ed12774..324cf40805 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -360,16 +360,13 @@ function lapp(f, s) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Sapp", _0: data(Curry._1(f, undefined)), _1: data(s) }; }) - } } }; } @@ -379,16 +376,13 @@ function lcons(f, s) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Scons", _0: Curry._1(f, undefined), _1: data(s) }; }) - } } }; } @@ -398,16 +392,13 @@ function lsing(f) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return { TAG: "Scons", _0: Curry._1(f, undefined), _1: "Sempty" }; }) - } } }; } @@ -417,12 +408,9 @@ function slazy(f) { count: 0, data: { TAG: "Slazy", - _0: { - LAZY_DONE: false, - VAL: (function () { + _0: CamlinternalLazy.from_fun(function () { return data(Curry._1(f, undefined)); }) - } } }; } From 4c24110d1540d81e219b91deac9c577b900fd84e Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Sun, 18 Feb 2024 23:31:18 +0900 Subject: [PATCH 2/4] fix contributing doc stating old ocaml ver --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dda45b2ba1..666b22de69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ Make sure you have [opam](https://opam.ocaml.org/doc/Install.html) installed on opam init # Any recent OCaml version works as a development compiler -opam switch create 4.14.1 # can also create local switch with opam switch create . 4.14.1 +opam switch create 5.1.1 # can also create local switch with opam switch create # Install dev dependencies from OPAM opam install . --deps-only From 0a0a65f7a8fab25604c6fbcb81f9cfb4f913111e Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Mon, 19 Feb 2024 20:41:52 +0900 Subject: [PATCH 3/4] sync test output --- .../grammar/expressions/expected/arrow.res.txt | 2 -- .../grammar/expressions/expected/binary.res.txt | 2 -- .../expressions/expected/parenthesized.res.txt | 1 - .../grammar/pattern/expected/constant.res.txt | 2 -- .../parsing/grammar/pattern/expected/or.res.txt | 4 +--- .../grammar/pattern/expected/polyvariants.res.txt | 1 - .../printer/comments/expected/blockExpr.res.txt | 12 ------------ .../tests/printer/comments/expected/expr.res.txt | 3 --- .../tests/printer/comments/expected/pattern.res.txt | 3 --- .../tests/printer/expr/expected/assert.res.txt | 1 - .../tests/printer/expr/expected/asyncAwait.res.txt | 2 -- .../tests/printer/expr/expected/binary.res.txt | 3 --- .../tests/printer/expr/expected/braced.res.txt | 1 - .../tests/printer/expr/expected/exoticIdent.res.txt | 2 -- .../syntax/tests/printer/expr/expected/field.res.txt | 1 - .../syntax/tests/printer/expr/expected/jsx.res.txt | 2 -- .../tests/printer/expr/expected/ternary.res.txt | 2 +- .../syntax/tests/printer/expr/expected/unary.res.txt | 2 -- .../printer/expr/expected/underscoreApply.res.txt | 1 - .../tests/printer/pattern/expected/constant.res.txt | 2 -- .../tests/printer/pattern/expected/record.res.txt | 2 -- .../tests/printer/pattern/expected/variant.res.txt | 1 - 22 files changed, 2 insertions(+), 50 deletions(-) diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/expected/arrow.res.txt b/jscomp/syntax/tests/parsing/grammar/expressions/expected/arrow.res.txt index c907472b4e..caded38220 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/expected/arrow.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/expressions/expected/arrow.res.txt @@ -17,8 +17,6 @@ let f (a, b) = a + b let f (a, b) (c, d) = ((a + b) + c) + d let f exception Terminate = () let f exception Terminate exception Exit = () -let f (lazy x) = () -let f (lazy x) (lazy y) = () let f [] = () let f (x::xs) = x + (xs |. Belt.List.length) let f (x : int) (y : int) = x + y diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/expected/binary.res.txt b/jscomp/syntax/tests/parsing/grammar/expressions/expected/binary.res.txt index 81e51b8c75..8d7dc689d3 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/expected/binary.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/expressions/expected/binary.res.txt @@ -5,8 +5,6 @@ let x = z |> (match z with | _ -> false) let x = z |> ((match z with | _ -> false)[@attr ]) let x = z |> (assert z) let x = z |> ((assert z)[@attr ]) -let x = z |> (lazy z) -let x = z |> ((lazy z)[@attr ]) let x = z |> (try sideEffect () with | _ -> f ()) let x = z |> ((try sideEffect () with | _ -> f ())[@attr ]) let x = z |> for i = 0 to 10 do () done diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/expected/parenthesized.res.txt b/jscomp/syntax/tests/parsing/grammar/expressions/expected/parenthesized.res.txt index 4b873ec64c..9507c0cfe4 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/expected/parenthesized.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/expressions/expected/parenthesized.res.txt @@ -16,7 +16,6 @@ let aTuple = (1, 2) let aRecord = { name = {js|steve|js}; age = 30 } let blockExpression = ((let a = 1 in let b = 2 in a + b)[@res.braces ]) let assertSmthing = assert true -let lazyThing = lazy true let jsx = ((div ~className:(({js|cx|js})[@res.namedArgLoc ]) ~children:[foo] ()) [@JSX ]) diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/expected/constant.res.txt b/jscomp/syntax/tests/parsing/grammar/pattern/expected/constant.res.txt index 376b534ac3..bc30806ef9 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/expected/constant.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/pattern/expected/constant.res.txt @@ -66,7 +66,6 @@ let (-1)..(-1.) = x | (-4.15) as x -> true | (-4.15)|4.15 -> true | ((-3.14) : float) -> true - | (lazy 5.678) -> true | exception 19.34 -> true | _ -> false ;;match literal with @@ -92,7 +91,6 @@ let (-1)..(-1.) = x | (({js|literal|js})[@res.template ])|(({js|literal|js})[@res.template ]) -> true | ((({js|literal|js})[@res.template ]) : string) -> true - | (lazy (({js|literal|js})[@res.template ])) -> true | exception (({js|literal|js})[@res.template ]) -> true | _ -> false let (({js|literal constant|js})[@res.template ]) = x diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/expected/or.res.txt b/jscomp/syntax/tests/parsing/grammar/pattern/expected/or.res.txt index f7e47046b5..d337882221 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/expected/or.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/pattern/expected/or.res.txt @@ -4,6 +4,4 @@ | Blue as c1|Red as c2 -> () | Blue as c1|Red as c2 -> () | exception Exit|exception Continue -> () - | exception (Exit|exception Continue) -> () - | (lazy x)|(lazy y) -> () - | (lazy (x|(lazy y))) -> () \ No newline at end of file + | exception (Exit|exception Continue) -> () \ No newline at end of file diff --git a/jscomp/syntax/tests/parsing/grammar/pattern/expected/polyvariants.res.txt b/jscomp/syntax/tests/parsing/grammar/pattern/expected/polyvariants.res.txt index 2f39ab9930..553ad2cdf2 100644 --- a/jscomp/syntax/tests/parsing/grammar/pattern/expected/polyvariants.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/pattern/expected/polyvariants.res.txt @@ -73,7 +73,6 @@ let cmp selectedChoice value = | #a as x -> true | #a|#b -> true | (#a : typ) -> true - | (lazy #a) -> true | exception #a -> true | _ -> false ;;match polyVar with diff --git a/jscomp/syntax/tests/printer/comments/expected/blockExpr.res.txt b/jscomp/syntax/tests/printer/comments/expected/blockExpr.res.txt index 9dbc1248ed..a2efeccdc3 100644 --- a/jscomp/syntax/tests/printer/comments/expected/blockExpr.res.txt +++ b/jscomp/syntax/tests/printer/comments/expected/blockExpr.res.txt @@ -366,18 +366,6 @@ assert({ // test }) -lazy { - // here - open /* inside */ Matrix - // c - - // c2 - compare(m1, m2) - // after - - // test -} - user.name = { // here open /* inside */ Names diff --git a/jscomp/syntax/tests/printer/comments/expected/expr.res.txt b/jscomp/syntax/tests/printer/comments/expected/expr.res.txt index fc70428328..f7bd280769 100644 --- a/jscomp/syntax/tests/printer/comments/expected/expr.res.txt +++ b/jscomp/syntax/tests/printer/comments/expected/expr.res.txt @@ -64,9 +64,6 @@ let x = { // Pexp_assert let x = /* here */ assert(/* c0 */ true /* c1 */) -// Pexp_lazy -let x = /* here */ lazy /* c0 */ true /* c1 */ - // Pexp_constraint let x = (/* c0 */ "string" /* c1 */: /* c2 */ string /* c3 */) // after diff --git a/jscomp/syntax/tests/printer/comments/expected/pattern.res.txt b/jscomp/syntax/tests/printer/comments/expected/pattern.res.txt index ed6b8d6a15..5463de9be0 100644 --- a/jscomp/syntax/tests/printer/comments/expected/pattern.res.txt +++ b/jscomp/syntax/tests/printer/comments/expected/pattern.res.txt @@ -79,9 +79,6 @@ _ => "4" // Ppat_constraint let /* c0 */ number /* c1 */: /* c2 */ int /* c3 */ = 123 -// Ppat_lazy -let /* before */ lazy /* a */ x /* b */ /* after */ = lazy 1 - // Ppat_unpack let /* before */ module(/* h1 */ Hashtbl /* h2 */) /* after */ = Hashtbl let /* before */ module(/* h1 */ Hashtbl /* h2 */: /* h3 */ MutableTable /* h4 */) /* after */ = Hashtbl diff --git a/jscomp/syntax/tests/printer/expr/expected/assert.res.txt b/jscomp/syntax/tests/printer/expr/expected/assert.res.txt index 593516a11b..15fba13316 100644 --- a/jscomp/syntax/tests/printer/expr/expected/assert.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/assert.res.txt @@ -40,7 +40,6 @@ let x = assert(while i < 10 { print_int(i) }) -let x = assert(lazy false) let x = assert(try sideEffect() catch { | Exit => () }) diff --git a/jscomp/syntax/tests/printer/expr/expected/asyncAwait.res.txt b/jscomp/syntax/tests/printer/expr/expected/asyncAwait.res.txt index 20da7e35f9..69b231ced2 100644 --- a/jscomp/syntax/tests/printer/expr/expected/asyncAwait.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/asyncAwait.res.txt @@ -21,7 +21,6 @@ let maybeSomeValue = switch await fetchData(url) { -(await f) (await 1) + (await 2) -lazy (await f()) assert(await f()) (await f).json() @@ -85,7 +84,6 @@ let _ = await ( sideEffect() } ) -let _ = await (lazy x) let _ = await (assert(x)) let _ = await promises[0] let _ = await promises["resolved"] diff --git a/jscomp/syntax/tests/printer/expr/expected/binary.res.txt b/jscomp/syntax/tests/printer/expr/expected/binary.res.txt index a699c3261f..db53bc0fc3 100644 --- a/jscomp/syntax/tests/printer/expr/expected/binary.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/binary.res.txt @@ -373,9 +373,6 @@ let x = let x = a && assert(false) let x = a && assert(false && assert(true)) -let x = a && lazy false -let x = a && lazy false && lazy true - let x = a && { open React diff --git a/jscomp/syntax/tests/printer/expr/expected/braced.res.txt b/jscomp/syntax/tests/printer/expr/expected/braced.res.txt index d60e067b4f..0ca6ce4ed5 100644 --- a/jscomp/syntax/tests/printer/expr/expected/braced.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/braced.res.txt @@ -208,7 +208,6 @@ map((arr, i): coordinate => { let _ = assert(true) let _ = {assert(true)} -let _ = {lazy {true}} let _ = {%extension} let _ = {module(ME)} diff --git a/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt b/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt index d3dc9ecd77..9048697886 100644 --- a/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/exoticIdent.res.txt @@ -53,8 +53,6 @@ let x = (\"type": \"module") assert(\"let") -lazy \"let" - %let %let(`console.log`) diff --git a/jscomp/syntax/tests/printer/expr/expected/field.res.txt b/jscomp/syntax/tests/printer/expr/expected/field.res.txt index 642e540c3f..98b169851a 100644 --- a/jscomp/syntax/tests/printer/expr/expected/field.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/field.res.txt @@ -49,7 +49,6 @@ let x = ( ).x let x = (assert(false)).x -let x = (lazy false).x let x = ( try sideEffect() catch { | Exit => () diff --git a/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt b/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt index fe0101d26c..30eae4bc43 100644 --- a/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/jsx.res.txt @@ -192,7 +192,6 @@ let x = exception Exit raise(Exit) } - lazyExpr={lazy stuff()} assertExpr={assert(true)} pack=module(Foo) pack={module(Foo)} @@ -272,7 +271,6 @@ let x = exception Exit raise(Exit) } - {lazy stuff()} {assert(true)} {module(Foo)} module(Foo) diff --git a/jscomp/syntax/tests/printer/expr/expected/ternary.res.txt b/jscomp/syntax/tests/printer/expr/expected/ternary.res.txt index 21a26a3d19..6af0e980ca 100644 --- a/jscomp/syntax/tests/printer/expr/expected/ternary.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/ternary.res.txt @@ -219,7 +219,7 @@ let () = condition exception Exit raise(Exit) } -let () = condition ? lazy foo() : assert(false) +let () = condition ? foo() : assert(false) let x = condition ? module(Foo) : module(Int: Number) let x = condition diff --git a/jscomp/syntax/tests/printer/expr/expected/unary.res.txt b/jscomp/syntax/tests/printer/expr/expected/unary.res.txt index cfe9b42193..4f7ad8b0f9 100644 --- a/jscomp/syntax/tests/printer/expr/expected/unary.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/unary.res.txt @@ -24,8 +24,6 @@ let x = -a.bar // same as above let x = -a.bar -!(lazy x) -lazy !x !(assert(x)) assert(!x) !(@attr expr) diff --git a/jscomp/syntax/tests/printer/expr/expected/underscoreApply.res.txt b/jscomp/syntax/tests/printer/expr/expected/underscoreApply.res.txt index 38d46244f6..0f72ee325e 100644 --- a/jscomp/syntax/tests/printer/expr/expected/underscoreApply.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/underscoreApply.res.txt @@ -39,7 +39,6 @@ f(a, b, _) + g(x, _, z) f(a, b, _) + g(x, _, z) + h(alpha, beta, _) assert(f(a, b, _)) -lazy f(a, b, _) getDirector(a, b, _).name diff --git a/jscomp/syntax/tests/printer/pattern/expected/constant.res.txt b/jscomp/syntax/tests/printer/pattern/expected/constant.res.txt index 895b20989c..bd3f68f309 100644 --- a/jscomp/syntax/tests/printer/pattern/expected/constant.res.txt +++ b/jscomp/syntax/tests/printer/pattern/expected/constant.res.txt @@ -23,7 +23,6 @@ switch science { | -4.15 as x => true | -4.15 | 4.15 => true | (-3.14: float) => true -| lazy 5.678 => true | exception 19.34 => true | _ => false } @@ -50,7 +49,6 @@ switch literal { | `literal` as x => true | `literal` | `literal` => true | (`literal`: string) => true -| lazy `literal` => true | exception `literal` => true | _ => false } diff --git a/jscomp/syntax/tests/printer/pattern/expected/record.res.txt b/jscomp/syntax/tests/printer/pattern/expected/record.res.txt index 58fae7db62..a2c73f23d6 100644 --- a/jscomp/syntax/tests/printer/pattern/expected/record.res.txt +++ b/jscomp/syntax/tests/printer/pattern/expected/record.res.txt @@ -108,8 +108,6 @@ let get_age3 = ({age: Red | Blue | Green, name: _}) => age2 let get_age3 = ({age: #...ppatType, name: _}) => age2 -let get_age3 = ({age: lazy ppatType, name: _}) => age2 - let get_age3 = ({age: module(P), name: _}) => age2 let get_age3 = ({age: module(P: S), name: _}) => age2 diff --git a/jscomp/syntax/tests/printer/pattern/expected/variant.res.txt b/jscomp/syntax/tests/printer/pattern/expected/variant.res.txt index 74d2f187eb..1f45a8182d 100644 --- a/jscomp/syntax/tests/printer/pattern/expected/variant.res.txt +++ b/jscomp/syntax/tests/printer/pattern/expected/variant.res.txt @@ -25,7 +25,6 @@ let cmp = (selectedChoice, value) => | #...a as x => true | #...a | #...b => true | (#...a: typ) => true - | lazy #...a => true | exception #...a => true | #1 => true | #123 => true From cce539d1729b473524d0937fb182914676317f98 Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Tue, 20 Feb 2024 14:55:42 +0900 Subject: [PATCH 4/4] change CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 469de0a6d4..14d9eaa053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - Build with OCaml 5.1.1. https://github.com/rescript-lang/rescript-compiler/pull/6641 +#### :boom: Breaking Change + +- `lazy` syntax is no longer supported. If you're using it, use `Lazy` module or `React.lazy_` instead. https://github.com/rescript-lang/rescript-compiler/pull/6342 + # 11.1.0-rc.2 #### :rocket: New Feature