diff --git a/CHANGELOG.md b/CHANGELOG.md index d6ba9d2e0b..8d64552e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - Remove a number of ast nodes never populated by the .res parser, and resulting dead code. https://github.com/rescript-lang/rescript-compiler/pull/6830 - Remove coercion with 2 types from internal representation. Coercion `e : t1 :> t2` was only supported in `.ml` syntax and never by the `.res` parser. https://github.com/rescript-lang/rescript-compiler/pull/6829 - Convert `caml_format` and `js_math` to `.res`. https://github.com/rescript-lang/rescript-compiler/pull/6834 +- Convert `js.ml` files to `.res`. https://github.com/rescript-lang/rescript-compiler/pull/6835 #### :nail_care: Polish diff --git a/jscomp/others/js.ml b/jscomp/others/js.res similarity index 53% rename from jscomp/others/js.ml rename to jscomp/others/js.res index 081a4a2037..8413f30f44 100644 --- a/jscomp/others/js.ml +++ b/jscomp/others/js.res @@ -1,4 +1,4 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -20,17 +20,17 @@ * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -[@@@config {flags = [|"-unboxed-types"; "-w"; "-49"|]}] -(* DESIGN: +@@config({flags: ["-unboxed-types", "-w", "-49"]}) +@@ocaml.text(/* DESIGN: - It does not have any code, all its code will be inlined so that there will never be {[ require('js')]} - Its interface should be minimal -*) +*/ -(** +" The Js module mostly contains ReScript bindings to _standard JavaScript APIs_ like [console.log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log), or the JavaScript @@ -57,234 +57,233 @@ In the meantime, there are several options for dealing with the data-last APIs: ```rescript /* Js.String (data-last API used with pipe last operator) */ -Js.log("2019-11-10" |> Js.String.split("-")) -Js.log("ReScript" |> Js.String.startsWith("Re")) +Js.log(\"2019-11-10\" |> Js.String.split(\"-\")) +Js.log(\"ReScript\" |> Js.String.startsWith(\"Re\")) /* Js.String (data-last API used with pipe first operator) */ -Js.log("2019-11-10"->Js.String.split("-", _)) -Js.log("ReScript"->Js.String.startsWith("Re", _)) +Js.log(\"2019-11-10\"->Js.String.split(\"-\", _)) +Js.log(\"ReScript\"->Js.String.startsWith(\"Re\", _)) /* Js.String (data-last API used without any piping) */ -Js.log(Js.String.split("-", "2019-11-10")) -Js.log(Js.String.startsWith("Re", "ReScript")) +Js.log(Js.String.split(\"-\", \"2019-11-10\")) +Js.log(Js.String.startsWith(\"Re\", \"ReScript\")) ``` ## Js.Xxx2 Modules Prefer `Js.Array2` over `Js.Array`, `Js.String2` over `Js.String`, etc. The latters are old modules. -*) +") -type 'a t = < .. > as 'a -(** JS object type *) +@ocaml.doc(" JS object type ") +type t<'a> = {..} as 'a module MapperRt = Js_mapperRt -module Internal = struct - external opaqueFullApply : 'a -> 'a = "%uncurried_apply" +module Internal = { + external opaqueFullApply: 'a => 'a = "%uncurried_apply" - (* Use opaque instead of [._n] to prevent some optimizations happening *) - external run : ((unit -> 'a)[@bs]) -> 'a = "#run" - external opaque : 'a -> 'a = "%opaque" -end + /* Use opaque instead of [._n] to prevent some optimizations happening */ + external run: ((. unit) => 'a) => 'a = "#run" + external opaque: 'a => 'a = "%opaque" +} -(**/**) +@@ocaml.text("/*") -(** +@ocaml.doc(" Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t. -*) -type +'a null = Value of 'a | Null [@as null] [@@unboxed] +") +@unboxed +type null<+'a> = Value('a) | @as(null) Null -type +'a undefined -(** +@ocaml.doc(" A value of this type can be either undefined or 'a. This type is equivalent to Js.Undefined.t. -*) +") +type undefined<+'a> -type +'a nullable = Value of 'a | Null [@as null] | Undefined [@as undefined] -[@@unboxed] +@unboxed type nullable<+'a> = Value('a) | @as(null) Null | @as(undefined) Undefined -(** +@@ocaml.text(" A value of this type can be undefined, null or 'a. This type is equivalent to Js.Null_undefined.t. -*) +") -type +'a null_undefined = 'a nullable +type null_undefined<+'a> = nullable<'a> -external toOption : 'a nullable -> 'a option = "#nullable_to_opt" -external undefinedToOption : 'a undefined -> 'a option = "#undefined_to_opt" -external nullToOption : 'a null -> 'a option = "#null_to_opt" -external isNullable : 'a nullable -> bool = "#is_nullable" -external import : 'a -> 'a promise = "#import" +external toOption: nullable<'a> => option<'a> = "#nullable_to_opt" +external undefinedToOption: undefined<'a> => option<'a> = "#undefined_to_opt" +external nullToOption: null<'a> => option<'a> = "#null_to_opt" +external isNullable: nullable<'a> => bool = "#is_nullable" +external import: 'a => promise<'a> = "#import" -external testAny : 'a -> bool = "#is_nullable" -(** The same as {!test} except that it is more permissive on the types of input *) +@ocaml.doc(" The same as {!test} except that it is more permissive on the types of input ") +external testAny: 'a => bool = "#is_nullable" -type (+'a, +'e) promise -(** +@ocaml.doc(" The promise type, defined here for interoperation across packages. -*) +") +type promise<+'a, +'e> -external null : 'a null = "#null" -(** +@ocaml.doc(" The same as empty in `Js.Null`. Compiles to `null`. -*) +") +external null: null<'a> = "#null" -external undefined : 'a undefined = "#undefined" -(** +@ocaml.doc(" The same as empty `Js.Undefined`. Compiles to `undefined`. -*) +") +external undefined: undefined<'a> = "#undefined" -external typeof : 'a -> string = "#typeof" -(** +@ocaml.doc(" `typeof x` will be compiled as `typeof x` in JS. Please consider functions in `Js.Types` for a type safe way of reflection. -*) +") +external typeof: 'a => string = "#typeof" -external log : 'a -> unit = "log" -[@@val] [@@scope "console"] -(** Equivalent to console.log any value. *) +@val @scope("console") @ocaml.doc(" Equivalent to console.log any value. ") +external log: 'a => unit = "log" -external log2 : 'a -> 'b -> unit = "log" [@@val] [@@scope "console"] -external log3 : 'a -> 'b -> 'c -> unit = "log" [@@val] [@@scope "console"] +@val @scope("console") external log2: ('a, 'b) => unit = "log" +@val @scope("console") external log3: ('a, 'b, 'c) => unit = "log" -external log4 : 'a -> 'b -> 'c -> 'd -> unit = "log" [@@val] [@@scope "console"] +@val @scope("console") external log4: ('a, 'b, 'c, 'd) => unit = "log" -external logMany : 'a array -> unit = "log" -[@@val] [@@scope "console"] [@@variadic] -(** A convenience function to console.log more than 4 arguments *) +@val +@scope("console") +@variadic +@ocaml.doc(" A convenience function to console.log more than 4 arguments ") +external logMany: array<'a> => unit = "log" -external eqNull : 'a -> 'a null -> bool = "%bs_equal_null" -external eqUndefined : 'a -> 'a undefined -> bool = "%bs_equal_undefined" -external eqNullable : 'a -> 'a nullable -> bool = "%bs_equal_nullable" +external eqNull: ('a, null<'a>) => bool = "%bs_equal_null" +external eqUndefined: ('a, undefined<'a>) => bool = "%bs_equal_undefined" +external eqNullable: ('a, nullable<'a>) => bool = "%bs_equal_nullable" -(** ## Operators *) +@@ocaml.text(" ## Operators ") -external unsafe_lt : 'a -> 'a -> bool = "#unsafe_lt" -(** +@ocaml.doc(" `unsafe_lt(a, b)` will be compiled as `a < b`. It is marked as unsafe, since it is impossible to give a proper semantics for comparision which applies to any type -*) +") +external unsafe_lt: ('a, 'a) => bool = "#unsafe_lt" -external unsafe_le : 'a -> 'a -> bool = "#unsafe_le" -(** +@ocaml.doc(" `unsafe_le(a, b)` will be compiled as `a <= b`. See also `Js.unsafe_lt`. -*) +") +external unsafe_le: ('a, 'a) => bool = "#unsafe_le" -external unsafe_gt : 'a -> 'a -> bool = "#unsafe_gt" -(** +@ocaml.doc(" `unsafe_gt(a, b)` will be compiled as `a > b`. See also `Js.unsafe_lt`. -*) +") +external unsafe_gt: ('a, 'a) => bool = "#unsafe_gt" -external unsafe_ge : 'a -> 'a -> bool = "#unsafe_ge" -(** +@ocaml.doc(" `unsafe_ge(a, b)` will be compiled as `a >= b`. See also `Js.unsafe_lt`. -*) +") +external unsafe_ge: ('a, 'a) => bool = "#unsafe_ge" -(** ## Nested Modules *) +@@ocaml.text(" ## Nested Modules ") +@ocaml.doc(" Provide utilities for `Js.null<'a>` ") module Null = Js_null -(** Provide utilities for `Js.null<'a>` *) +@ocaml.doc(" Provide utilities for `Js.undefined<'a>` ") module Undefined = Js_undefined -(** Provide utilities for `Js.undefined<'a>` *) +@ocaml.doc(" Provide utilities for `Js.null_undefined` ") module Nullable = Js_null_undefined -(** Provide utilities for `Js.null_undefined` *) -module Null_undefined = - Js_null_undefined - [@deprecated "Please use `Js.Nullable`"] +module Null_undefined = Js_null_undefined +@ocaml.doc(" Provide utilities for dealing with Js exceptions ") module Exn = Js_exn -(** Provide utilities for dealing with Js exceptions *) +@ocaml.doc(" Provide bindings to JS array") module Array = Js_array -(** Provide bindings to JS array*) +@ocaml.doc(" Provide bindings to JS array") module Array2 = Js_array2 -(** Provide bindings to JS array*) +@ocaml.doc(" Provide bindings to JS string ") module String = Js_string -(** Provide bindings to JS string *) +@ocaml.doc(" Provide bindings to JS string ") module String2 = Js_string2 -(** Provide bindings to JS string *) +@ocaml.doc(" Provide bindings to JS regex expression ") module Re = Js_re -(** Provide bindings to JS regex expression *) +@ocaml.doc(" Provide bindings to JS Promise ") module Promise = Js_promise -(** Provide bindings to JS Promise *) +@ocaml.doc(" Provide bindings to JS Promise ") module Promise2 = Js_promise2 -(** Provide bindings to JS Promise *) +@ocaml.doc(" Provide bindings for JS Date ") module Date = Js_date -(** Provide bindings for JS Date *) +@ocaml.doc(" Provide utilities for JS dictionary object ") module Dict = Js_dict -(** Provide utilities for JS dictionary object *) +@ocaml.doc(" Provide bindings to JS global functions in global namespace") module Global = Js_global -(** Provide bindings to JS global functions in global namespace*) +@ocaml.doc(" Provide utilities for json ") module Json = Js_json -(** Provide utilities for json *) +@ocaml.doc(" Provide bindings for JS `Math` object ") module Math = Js_math -(** Provide bindings for JS `Math` object *) +@ocaml.doc(" Provide utilities for `Js.t` ") module Obj = Js_obj -(** Provide utilities for `Js.t` *) +@ocaml.doc(" Provide bindings for JS typed array ") module Typed_array = Js_typed_array -(** Provide bindings for JS typed array *) +@ocaml.doc(" Provide bindings for JS typed array ") module TypedArray2 = Js_typed_array2 -(** Provide bindings for JS typed array *) +@ocaml.doc(" Provide utilities for manipulating JS types ") module Types = Js_types -(** Provide utilities for manipulating JS types *) +@ocaml.doc(" Provide utilities for JS float ") module Float = Js_float -(** Provide utilities for JS float *) +@ocaml.doc(" Provide utilities for int ") module Int = Js_int -(** Provide utilities for int *) +@ocaml.doc(" Provide utilities for bigint ") module BigInt = Js_bigint -(** Provide utilities for bigint *) +@ocaml.doc(" Provide utilities for File ") module File = Js_file -(** Provide utilities for File *) +@ocaml.doc(" Provide utilities for Blob ") module Blob = Js_blob -(** Provide utilities for Blob *) +@ocaml.doc(" Provide utilities for option ") module Option = Js_option -(** Provide utilities for option *) +@ocaml.doc(" Define the interface for result ") module Result = Js_result -(** Define the interface for result *) +@ocaml.doc(" Provide utilities for list ") module List = Js_list -(** Provide utilities for list *) +@ocaml.doc(" Provides bindings for JS Vector ") module Vector = Js_vector -(** Provides bindings for JS Vector *) +@ocaml.doc(" Provides bindings for console ") module Console = Js_console -(** Provides bindings for console *) +@ocaml.doc(" Provides bindings for ES6 Set ") module Set = Js_set -(** Provides bindings for ES6 Set *) +@ocaml.doc(" Provides bindings for ES6 WeakSet ") module WeakSet = Js_weakset -(** Provides bindings for ES6 WeakSet *) +@ocaml.doc(" Provides bindings for ES6 Map ") module Map = Js_map -(** Provides bindings for ES6 Map *) +@ocaml.doc(" Provides bindings for ES6 WeakMap ") module WeakMap = Js_weakmap -(** Provides bindings for ES6 WeakMap *) diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja index e2424da2d3..0ddcde6e33 100644 --- a/jscomp/others/release.ninja +++ b/jscomp/others/release.ninja @@ -11,7 +11,7 @@ rule cc_cmi o others/belt.cmj others/belt.cmi : cc others/belt.res | $bsc bsc_flags = $bsc_primitive_flags -o others/js.cmj others/js.cmi : cc others/js.ml | $bsc +o others/js.cmj others/js.cmi : cc others/js.res | $bsc bsc_flags = $bsc_primitive_flags o others/belt_internals.cmi : cc others/belt_internals.resi | $bsc bsc_flags = $bsc_primitive_flags @@ -32,35 +32,35 @@ o others/js_file.cmi others/js_file.cmj : cc others/js_file.res | others/belt_in o others/js_float.cmi others/js_float.cmj : cc others/js_float.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_global.cmi others/js_global.cmj : cc others/js_global.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_int.cmi others/js_int.cmj : cc others/js_int.res | others/belt_internals.cmi others/js.cmi $bsc -o others/js_json.cmj : cc_cmi others/js_json.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_array2.cmj others/js_dict.cmj others/js_json.cmi others/js_string.cmj others/js_types.cmj $bsc -o others/js_json.cmi : cc others/js_json.resi | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi $bsc +o others/js_json.cmj : cc_cmi others/js_json.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_dict.cmj others/js_json.cmi others/js_string.cmj others/js_types.cmj $bsc +o others/js_json.cmi : cc others/js_json.resi | others/belt_internals.cmi others/js.cmi others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi $bsc o others/js_list.cmj : cc_cmi others/js_list.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_list.cmi others/js_vector.cmj $bsc o others/js_list.cmi : cc others/js_list.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_map.cmi others/js_map.cmj : cc others/js_map.res | others/belt_internals.cmi others/js.cmi $bsc -o others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_mapperRt.cmi $bsc +o others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.res | others/belt_internals.cmi others/js.cmi others/js_mapperRt.cmi $bsc o others/js_mapperRt.cmi : cc others/js_mapperRt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_math.cmi others/js_math.cmj : cc others/js_math.res | others/belt_internals.cmi others/js.cmi others/js_int.cmj $bsc -o others/js_null.cmj : cc_cmi others/js_null.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_exn.cmj others/js_null.cmi $bsc -o others/js_null.cmi : cc others/js_null.resi | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc -o others/js_null_undefined.cmj : cc_cmi others/js_null_undefined.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_null_undefined.cmi $bsc -o others/js_null_undefined.cmi : cc others/js_null_undefined.resi | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc +o others/js_null.cmj : cc_cmi others/js_null.res | others/belt_internals.cmi others/js.cmi others/js_exn.cmj others/js_null.cmi $bsc +o others/js_null.cmi : cc others/js_null.resi | others/belt_internals.cmi others/js.cmi $bsc +o others/js_null_undefined.cmj : cc_cmi others/js_null_undefined.res | others/belt_internals.cmi others/js.cmi others/js_null_undefined.cmi $bsc +o others/js_null_undefined.cmi : cc others/js_null_undefined.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_obj.cmi others/js_obj.cmj : cc others/js_obj.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_option.cmj : cc_cmi others/js_option.res | others/belt_internals.cmi others/js.cmi others/js_exn.cmj others/js_option.cmi $bsc o others/js_option.cmi : cc others/js_option.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_promise.cmi others/js_promise.cmj : cc others/js_promise.res | others/belt_internals.cmi others/js.cmi others/js_promise2.cmj $bsc o others/js_promise2.cmi others/js_promise2.cmj : cc others/js_promise2.res | others/belt_internals.cmi others/js.cmi $bsc -o others/js_re.cmi others/js_re.cmj : cc others/js_re.res | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc +o others/js_re.cmi others/js_re.cmj : cc others/js_re.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_result.cmj : cc_cmi others/js_result.res | others/belt_internals.cmi others/js.cmi others/js_result.cmi $bsc o others/js_result.cmi : cc others/js_result.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_set.cmi others/js_set.cmj : cc others/js_set.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_string.cmi others/js_string.cmj : cc others/js_string.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc o others/js_string2.cmi others/js_string2.cmj : cc others/js_string2.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc -o others/js_typed_array.cmi others/js_typed_array.cmj : cc others/js_typed_array.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_typed_array2.cmj $bsc -o others/js_typed_array2.cmi others/js_typed_array2.cmj : cc others/js_typed_array2.res | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc -o others/js_types.cmj : cc_cmi others/js_types.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_null.cmj others/js_types.cmi $bsc +o others/js_typed_array.cmi others/js_typed_array.cmj : cc others/js_typed_array.res | others/belt_internals.cmi others/js.cmi others/js_typed_array2.cmj $bsc +o others/js_typed_array2.cmi others/js_typed_array2.cmj : cc others/js_typed_array2.res | others/belt_internals.cmi others/js.cmi $bsc +o others/js_types.cmj : cc_cmi others/js_types.res | others/belt_internals.cmi others/js.cmi others/js_null.cmj others/js_types.cmi $bsc o others/js_types.cmi : cc others/js_types.resi | others/belt_internals.cmi others/js.cmi $bsc -o others/js_undefined.cmj : cc_cmi others/js_undefined.res | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_exn.cmj others/js_undefined.cmi $bsc -o others/js_undefined.cmi : cc others/js_undefined.resi | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc +o others/js_undefined.cmj : cc_cmi others/js_undefined.res | others/belt_internals.cmi others/js.cmi others/js_exn.cmj others/js_undefined.cmi $bsc +o others/js_undefined.cmi : cc others/js_undefined.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_vector.cmj : cc_cmi others/js_vector.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_vector.cmi $bsc o others/js_vector.cmi : cc others/js_vector.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_weakmap.cmi others/js_weakmap.cmj : cc others/js_weakmap.res | others/belt_internals.cmi others/js.cmi $bsc @@ -75,8 +75,8 @@ o others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj : cc others/jsxP o others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj : cc others/jsxPPXReactSupportU.res | others/belt_internals.cmi others/js.cmi others/jsxU.cmj $bsc o others/jsxU.cmi others/jsxU.cmj : cc others/jsxU.res | others/belt_internals.cmi others/js.cmi $bsc o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_blob.cmi others/js_blob.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_file.cmi others/js_file.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_mapperRt.cmi others/js_mapperRt.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsxC.cmi others/jsxC.cmj others/jsxDOMC.cmi others/jsxDOMC.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxDOMU.cmi others/jsxDOMU.cmj others/jsxEventC.cmi others/jsxEventC.cmj others/jsxEventU.cmi others/jsxEventU.cmj others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj others/jsxU.cmi others/jsxU.cmj -o others/belt_Array.cmj : cc_cmi others/belt_Array.res | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_Array.cmi : cc others/belt_Array.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_Array.cmj : cc_cmi others/belt_Array.res | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_Array.cmi : cc others/belt_Array.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Float.cmj : cc_cmi others/belt_Float.res | others/belt.cmi others/belt_Float.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_Float.cmi : cc others/belt_Float.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_HashMap.cmj : cc_cmi others/belt_HashMap.res | others/belt.cmi others/belt_Array.cmj others/belt_HashMap.cmi others/belt_HashMapInt.cmj others/belt_HashMapString.cmj others/belt_Id.cmj others/belt_internalBuckets.cmj others/belt_internalBucketsType.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg @@ -98,29 +98,29 @@ o others/belt_Int.cmi : cc others/belt_Int.resi | others/belt_internals.cmi othe o others/belt_List.cmj : cc_cmi others/belt_List.res | others/belt.cmi others/belt_Array.cmj others/belt_List.cmi others/belt_SortArray.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_List.cmi : cc others/belt_List.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Map.cmj : cc_cmi others/belt_Map.res | others/belt.cmi others/belt_Id.cmj others/belt_Map.cmi others/belt_MapDict.cmj others/belt_MapInt.cmj others/belt_MapString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_Map.cmi : cc others/belt_Map.resi | others/belt.cmi others/belt_Id.cmi others/belt_MapDict.cmi others/belt_MapInt.cmi others/belt_MapString.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_Map.cmi : cc others/belt_Map.resi | others/belt.cmi others/belt_Id.cmi others/belt_MapDict.cmi others/belt_MapInt.cmi others/belt_MapString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_MapDict.cmj : cc_cmi others/belt_MapDict.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_MapDict.cmi others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MapDict.cmi : cc others/belt_MapDict.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MapDict.cmi : cc others/belt_MapDict.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_MapInt.cmj : cc_cmi others/belt_MapInt.res | others/belt.cmi others/belt_Array.cmj others/belt_MapInt.cmi others/belt_internalAVLtree.cmj others/belt_internalMapInt.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MapInt.cmi : cc others/belt_MapInt.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MapInt.cmi : cc others/belt_MapInt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_MapString.cmj : cc_cmi others/belt_MapString.res | others/belt.cmi others/belt_Array.cmj others/belt_MapString.cmi others/belt_internalAVLtree.cmj others/belt_internalMapString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MapString.cmi : cc others/belt_MapString.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MapString.cmi : cc others/belt_MapString.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_MutableMap.cmj : cc_cmi others/belt_MutableMap.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_MutableMap.cmi others/belt_MutableMapInt.cmj others/belt_MutableMapString.cmj others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableMap.cmi : cc others/belt_MutableMap.resi | others/belt.cmi others/belt_Id.cmi others/belt_MutableMapInt.cmi others/belt_MutableMapString.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableMap.cmi : cc others/belt_MutableMap.resi | others/belt.cmi others/belt_Id.cmi others/belt_MutableMapInt.cmi others/belt_MutableMapString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_MutableMapInt.cmj : cc_cmi others/belt_MutableMapInt.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableMapInt.cmi others/belt_internalAVLtree.cmj others/belt_internalMapInt.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableMapInt.cmi : cc others/belt_MutableMapInt.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableMapInt.cmi : cc others/belt_MutableMapInt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_MutableMapString.cmj : cc_cmi others/belt_MutableMapString.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableMapString.cmi others/belt_internalAVLtree.cmj others/belt_internalMapString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableMapString.cmi : cc others/belt_MutableMapString.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_MutableQueue.cmj : cc_cmi others/belt_MutableQueue.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableQueue.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_MutableQueue.cmi : cc others/belt_MutableQueue.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableMapString.cmi : cc others/belt_MutableMapString.resi | others/belt_internals.cmi others/js.cmi $bsc +o others/belt_MutableQueue.cmj : cc_cmi others/belt_MutableQueue.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableQueue.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_MutableQueue.cmi : cc others/belt_MutableQueue.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_MutableSet.cmj : cc_cmi others/belt_MutableSet.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_MutableSet.cmi others/belt_MutableSetInt.cmj others/belt_MutableSetString.cmj others/belt_SortArray.cmj others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableSet.cmi : cc others/belt_MutableSet.resi | others/belt.cmi others/belt_Id.cmi others/belt_MutableSetInt.cmi others/belt_MutableSetString.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableSet.cmi : cc others/belt_MutableSet.resi | others/belt.cmi others/belt_Id.cmi others/belt_MutableSetInt.cmi others/belt_MutableSetString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_MutableSetInt.cmj : cc_cmi others/belt_MutableSetInt.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableSetInt.cmi others/belt_SortArrayInt.cmj others/belt_internalAVLset.cmj others/belt_internalSetInt.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableSetInt.cmi : cc others/belt_MutableSetInt.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableSetInt.cmi : cc others/belt_MutableSetInt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_MutableSetString.cmj : cc_cmi others/belt_MutableSetString.res | others/belt.cmi others/belt_Array.cmj others/belt_MutableSetString.cmi others/belt_SortArrayString.cmj others/belt_internalAVLset.cmj others/belt_internalSetString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_MutableSetString.cmi : cc others/belt_MutableSetString.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_MutableStack.cmj : cc_cmi others/belt_MutableStack.res | others/belt.cmi others/belt_MutableStack.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_MutableStack.cmi : cc others/belt_MutableStack.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_MutableSetString.cmi : cc others/belt_MutableSetString.resi | others/belt_internals.cmi others/js.cmi $bsc +o others/belt_MutableStack.cmj : cc_cmi others/belt_MutableStack.res | others/belt.cmi others/belt_MutableStack.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_MutableStack.cmi : cc others/belt_MutableStack.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Option.cmj : cc_cmi others/belt_Option.res | others/belt.cmi others/belt_Option.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_Option.cmi : cc others/belt_Option.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Range.cmj : cc_cmi others/belt_Range.res | others/belt.cmi others/belt_Range.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg @@ -128,33 +128,33 @@ o others/belt_Range.cmi : cc others/belt_Range.resi | others/belt_internals.cmi o others/belt_Result.cmj : cc_cmi others/belt_Result.res | others/belt.cmi others/belt_Result.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_Result.cmi : cc others/belt_Result.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Set.cmj : cc_cmi others/belt_Set.res | others/belt.cmi others/belt_Id.cmj others/belt_Set.cmi others/belt_SetDict.cmj others/belt_SetInt.cmj others/belt_SetString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_Set.cmi : cc others/belt_Set.resi | others/belt.cmi others/belt_Id.cmi others/belt_SetDict.cmi others/belt_SetInt.cmi others/belt_SetString.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_Set.cmi : cc others/belt_Set.resi | others/belt.cmi others/belt_Id.cmi others/belt_SetDict.cmi others/belt_SetInt.cmi others/belt_SetString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SetDict.cmj : cc_cmi others/belt_SetDict.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_SetDict.cmi others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_SetDict.cmi : cc others/belt_SetDict.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_SetDict.cmi : cc others/belt_SetDict.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SetInt.cmj : cc_cmi others/belt_SetInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SetInt.cmi others/belt_internalAVLset.cmj others/belt_internalSetInt.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_SetInt.cmi : cc others/belt_SetInt.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_SetInt.cmi : cc others/belt_SetInt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_SetString.cmj : cc_cmi others/belt_SetString.res | others/belt.cmi others/belt_Array.cmj others/belt_SetString.cmi others/belt_internalAVLset.cmj others/belt_internalSetString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_SetString.cmi : cc others/belt_SetString.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_SetString.cmi : cc others/belt_SetString.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_SortArray.cmj : cc_cmi others/belt_SortArray.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArray.cmi others/belt_SortArrayInt.cmj others/belt_SortArrayString.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SortArray.cmi : cc others/belt_SortArray.resi | others/belt.cmi others/belt_SortArrayInt.cmi others/belt_SortArrayString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SortArrayInt.cmj : cc_cmi others/belt_SortArrayInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayInt.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SortArrayInt.cmi : cc others/belt_SortArrayInt.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_SortArrayString.cmj : cc_cmi others/belt_SortArrayString.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayString.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_SortArrayString.cmi : cc others/belt_SortArrayString.resi | others/belt_internals.cmi others/js.cmi $bsc -o others/belt_internalAVLset.cmj : cc_cmi others/belt_internalAVLset.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_SortArray.cmj others/belt_internalAVLset.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalAVLset.cmi : cc others/belt_internalAVLset.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalAVLtree.cmj : cc_cmi others/belt_internalAVLtree.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalAVLtree.cmi : cc others/belt_internalAVLtree.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalBuckets.cmj : cc_cmi others/belt_internalBuckets.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBuckets.cmi others/belt_internalBucketsType.cmj others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_internalAVLset.cmj : cc_cmi others/belt_internalAVLset.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_SortArray.cmj others/belt_internalAVLset.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalAVLset.cmi : cc others/belt_internalAVLset.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalAVLtree.cmj : cc_cmi others/belt_internalAVLtree.res | others/belt.cmi others/belt_Array.cmj others/belt_Id.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalAVLtree.cmi : cc others/belt_internalAVLtree.resi | others/belt.cmi others/belt_Id.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalBuckets.cmj : cc_cmi others/belt_internalBuckets.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBuckets.cmi others/belt_internalBucketsType.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_internalBuckets.cmi : cc others/belt_internalBuckets.resi | others/belt.cmi others/belt_internalBucketsType.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_internalBucketsType.cmj : cc_cmi others/belt_internalBucketsType.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBucketsType.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalBucketsType.cmi : cc others/belt_internalBucketsType.resi | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalMapInt.cmi others/belt_internalMapInt.cmj : cc others/belt_internalMapInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalMapString.cmi others/belt_internalMapString.cmj : cc others/belt_internalMapString.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalSetBuckets.cmj : cc_cmi others/belt_internalSetBuckets.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBucketsType.cmj others/belt_internalSetBuckets.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_internalBucketsType.cmj : cc_cmi others/belt_internalBucketsType.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBucketsType.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalBucketsType.cmi : cc others/belt_internalBucketsType.resi | others/belt_internals.cmi others/js.cmi $bsc +o others/belt_internalMapInt.cmi others/belt_internalMapInt.cmj : cc others/belt_internalMapInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalMapString.cmi others/belt_internalMapString.cmj : cc others/belt_internalMapString.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArray.cmj others/belt_internalAVLtree.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalSetBuckets.cmj : cc_cmi others/belt_internalSetBuckets.res | others/belt.cmi others/belt_Array.cmj others/belt_internalBucketsType.cmj others/belt_internalSetBuckets.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_internalSetBuckets.cmi : cc others/belt_internalSetBuckets.resi | others/belt.cmi others/belt_internalBucketsType.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg -o others/belt_internalSetInt.cmi others/belt_internalSetInt.cmj : cc others/belt_internalSetInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayInt.cmj others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg -o others/belt_internalSetString.cmi others/belt_internalSetString.cmj : cc others/belt_internalSetString.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayString.cmj others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg +o others/belt_internalSetInt.cmi others/belt_internalSetInt.cmj : cc others/belt_internalSetInt.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayInt.cmj others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg +o others/belt_internalSetString.cmi others/belt_internalSetString.cmj : cc others/belt_internalSetString.res | others/belt.cmi others/belt_Array.cmj others/belt_SortArrayString.cmj others/belt_internalAVLset.cmj others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/dom.cmi others/dom.cmj : cc others/dom.res | others/belt_internals.cmi others/dom_storage.cmj others/dom_storage2.cmj others/js.cmi $bsc js_pkg o others/dom_storage.cmi others/dom_storage.cmj : cc others/dom_storage.res | others/belt_internals.cmi others/dom_storage2.cmj others/js.cmi $bsc js_pkg o others/dom_storage2.cmi others/dom_storage2.cmj : cc others/dom_storage2.res | others/belt_internals.cmi others/js.cmi $bsc diff --git a/jscomp/runtime/js.ml b/jscomp/runtime/js.ml deleted file mode 100644 index 058038750f..0000000000 --- a/jscomp/runtime/js.ml +++ /dev/null @@ -1,245 +0,0 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - -[@@@config {flags = [|"-unboxed-types"; "-w"; "-49"|]}] -(* DESIGN: - - It does not have any code, all its code will be inlined so that - there will never be - {[ require('js')]} - - Its interface should be minimal -*) - -(** This library provides bindings and necessary support for JS FFI. - It contains all bindings into [Js] namespace. - - @example {[ - [| 1;2;3;4|] - |. Js.Array2.map (fun x -> x + 1 ) - |. Js.Array2.reduce (+) 0 - |. Js.log - ]} -*) - -(**/**) - -type 'a t = < .. > as 'a -(** Types for JS objects *) - -module MapperRt = Js_mapperRt -module Internal = struct - external opaqueFullApply : 'a -> 'a = "%uncurried_apply" - - (* Use opaque instead of [._n] to prevent some optimizations happening *) - external run : ((unit -> 'a)[@bs]) -> 'a = "#run" - external opaque : 'a -> 'a = "%opaque" -end - -(**/**) - -(** nullable, value of this type can be either [null] or ['a] - this type is the same as type [t] in {!Null} -*) -type +'a null = Value of 'a | Null [@as null] [@@unboxed] - -type +'a undefined -(** value of this type can be either [undefined] or ['a] - this type is the same as type [t] in {!Undefined} *) - -(** value of this type can be [undefined], [null] or ['a] - this type is the same as type [t] n {!Null_undefined} *) -type +'a nullable = Value of 'a | Null [@as null] | Undefined [@as undefined] -[@@unboxed] - -type +'a null_undefined = 'a nullable - -external toOption : 'a nullable -> 'a option = "#nullable_to_opt" -external undefinedToOption : 'a undefined -> 'a option = "#undefined_to_opt" -external nullToOption : 'a null -> 'a option = "#null_to_opt" - -external isNullable : 'a nullable -> bool = "#is_nullable" - -external import : 'a -> 'a promise = "#import" - -external testAny : 'a -> bool = "#is_nullable" -(** The same as {!test} except that it is more permissive on the types of input *) - -type (+'a, +'e) promise -(** The promise type, defined here for interoperation across packages - @deprecated please use {!Js.Promise} -*) - -external null : 'a null = "#null" -(** The same as [empty] in {!Js.Null} will be compiled as [null]*) - -external undefined : 'a undefined = "#undefined" -(** The same as [empty] {!Js.Undefined} will be compiled as [undefined]*) - -external typeof : 'a -> string = "#typeof" -(** [typeof x] will be compiled as [typeof x] in JS - Please consider functions in {!Types} for a type safe way of reflection -*) - -external log : 'a -> unit = "log" -[@@val] [@@scope "console"] -(** A convenience function to log everything *) - -external log2 : 'a -> 'b -> unit = "log" [@@val] [@@scope "console"] -external log3 : 'a -> 'b -> 'c -> unit = "log" [@@val] [@@scope "console"] -external log4 : 'a -> 'b -> 'c -> 'd -> unit = "log" [@@val] [@@scope "console"] - -external logMany : 'a array -> unit = "log" -[@@val] [@@scope "console"] [@@variadic] -(** A convenience function to log more than 4 arguments *) - -external eqNull : 'a -> 'a null -> bool = "%bs_equal_null" -external eqUndefined : 'a -> 'a undefined -> bool = "%bs_equal_undefined" -external eqNullable : 'a -> 'a nullable -> bool = "%bs_equal_nullable" - -(** {4 operators }*) - -external unsafe_lt : 'a -> 'a -> bool = "#unsafe_lt" -(** [unsafe_lt a b] will be compiled as [a < b]. - It is marked as unsafe, since it is impossible - to give a proper semantics for comparision which applies to any type -*) - -external unsafe_le : 'a -> 'a -> bool = "#unsafe_le" -(** [unsafe_le a b] will be compiled as [a <= b]. - See also {!unsafe_lt} -*) - -external unsafe_gt : 'a -> 'a -> bool = "#unsafe_gt" -(** [unsafe_gt a b] will be compiled as [a > b]. - See also {!unsafe_lt} -*) - -external unsafe_ge : 'a -> 'a -> bool = "#unsafe_ge" -(** [unsafe_ge a b] will be compiled as [a >= b]. - See also {!unsafe_lt} -*) - -(** {12 nested modules}*) - -module Null = Js_null -(** Provide utilities around ['a null] *) - -module Undefined = Js_undefined -(** Provide utilities around {!undefined} *) - -module Nullable = Js_null_undefined -(** Provide utilities around {!null_undefined} *) - -module Null_undefined = Js_null_undefined -(** @deprecated please use {!Js.Nullable} *) - -module Exn = Js_exn -(** Provide utilities for dealing with Js exceptions *) - -module Array = Js_array -(** Provide bindings to Js array*) - -module Array2 = Js_array2 -(** Provide bindings to Js array*) - -module String = Js_string -(** Provide bindings to JS string *) - -module String2 = Js_string2 -(** Provide bindings to JS string *) - -module Re = Js_re -(** Provide bindings to Js regex expression *) - -module Promise = Js_promise -(** Provide bindings to JS promise *) - -module Promise2 = Js_promise2 -(** Provide bindings to JS promise *) - -module Date = Js_date -(** Provide bindings for JS Date *) - -module Dict = Js_dict -(** Provide utilities for JS dictionary object *) - -module Global = Js_global -(** Provide bindings to JS global functions in global namespace*) - -module Json = Js_json -(** Provide utilities for json *) - -module Math = Js_math -(** Provide bindings for JS [Math] object *) - -module Obj = Js_obj -(** Provide utilities for {!Js.t} *) - -module Typed_array = Js_typed_array -(** Provide bindings for JS typed array *) - -module TypedArray2 = Js_typed_array2 -(** Provide bindings for JS typed array *) - -module Types = Js_types -(** Provide utilities for manipulating JS types *) - -module Float = Js_float -(** Provide utilities for JS float *) - -module Int = Js_int -(** Provide utilities for int *) - -module BigInt = Js_bigint -(** Provide utilities for bigint *) - -module File = Js_file -(** Provide utilities for File *) - -module Blob = Js_blob -(** Provide utilities for Blob *) - -module Option = Js_option -(** Provide utilities for option *) - -module Result = Js_result -(** Define the interface for result *) - -module List = Js_list -(** Provide utilities for list *) - -module Vector = Js_vector - -module Console = Js_console - -module Set = Js_set -(** Provides bindings for ES6 Set *) - -module WeakSet = Js_weakset -(** Provides bindings for ES6 WeakSet *) - -module Map = Js_map -(** Provides bindings for ES6 Map *) - -module WeakMap = Js_weakmap -(** Provides bindings for ES6 WeakMap *) diff --git a/jscomp/runtime/js.res b/jscomp/runtime/js.res new file mode 100644 index 0000000000..a784a7aae6 --- /dev/null +++ b/jscomp/runtime/js.res @@ -0,0 +1,244 @@ +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +@@config({flags: ["-unboxed-types", "-w", "-49"]}) +@@ocaml.text(/* DESIGN: + - It does not have any code, all its code will be inlined so that + there will never be + {[ require('js')]} + - Its interface should be minimal +*/ + +" This library provides bindings and necessary support for JS FFI. + It contains all bindings into [Js] namespace. + + @example {[ + [| 1;2;3;4|] + |. Js.Array2.map (fun x -> x + 1 ) + |. Js.Array2.reduce (+) 0 + |. Js.log + ]} +") + +@@ocaml.text("/*") + +@ocaml.doc(" Types for JS objects ") +type t<'a> = {..} as 'a + +module MapperRt = Js_mapperRt +module Internal = { + external opaqueFullApply: 'a => 'a = "%uncurried_apply" + + /* Use opaque instead of [._n] to prevent some optimizations happening */ + external run: ((. unit) => 'a) => 'a = "#run" + external opaque: 'a => 'a = "%opaque" +} + +@@ocaml.text("/*") + +@ocaml.doc(" nullable, value of this type can be either [null] or ['a] + this type is the same as type [t] in {!Null} +") +@unboxed +type null<+'a> = Value('a) | @as(null) Null + +@ocaml.doc(" value of this type can be either [undefined] or ['a] + this type is the same as type [t] in {!Undefined} ") +type undefined<+'a> + +@ocaml.doc(" value of this type can be [undefined], [null] or ['a] + this type is the same as type [t] n {!Null_undefined} ") +@unboxed +type nullable<+'a> = Value('a) | @as(null) Null | @as(undefined) Undefined + +type null_undefined<+'a> = nullable<'a> + +external toOption: nullable<'a> => option<'a> = "#nullable_to_opt" +external undefinedToOption: undefined<'a> => option<'a> = "#undefined_to_opt" +external nullToOption: null<'a> => option<'a> = "#null_to_opt" + +external isNullable: nullable<'a> => bool = "#is_nullable" + +external import: 'a => promise<'a> = "#import" + +@ocaml.doc(" The same as {!test} except that it is more permissive on the types of input ") +external testAny: 'a => bool = "#is_nullable" + +@ocaml.doc(" The promise type, defined here for interoperation across packages + @deprecated please use {!Js.Promise} +") +type promise<+'a, +'e> + +@ocaml.doc(" The same as [empty] in {!Js.Null} will be compiled as [null]") +external null: null<'a> = "#null" + +@ocaml.doc(" The same as [empty] {!Js.Undefined} will be compiled as [undefined]") +external undefined: undefined<'a> = "#undefined" + +@ocaml.doc(" [typeof x] will be compiled as [typeof x] in JS + Please consider functions in {!Types} for a type safe way of reflection +") +external typeof: 'a => string = "#typeof" + +@val @scope("console") @ocaml.doc(" A convenience function to log everything ") +external log: 'a => unit = "log" + +@val @scope("console") external log2: ('a, 'b) => unit = "log" +@val @scope("console") external log3: ('a, 'b, 'c) => unit = "log" +@val @scope("console") external log4: ('a, 'b, 'c, 'd) => unit = "log" + +@val @scope("console") @variadic @ocaml.doc(" A convenience function to log more than 4 arguments ") +external logMany: array<'a> => unit = "log" + +external eqNull: ('a, null<'a>) => bool = "%bs_equal_null" +external eqUndefined: ('a, undefined<'a>) => bool = "%bs_equal_undefined" +external eqNullable: ('a, nullable<'a>) => bool = "%bs_equal_nullable" + +@@ocaml.text(" {4 operators }") + +@ocaml.doc(" [unsafe_lt a b] will be compiled as [a < b]. + It is marked as unsafe, since it is impossible + to give a proper semantics for comparision which applies to any type +") +external unsafe_lt: ('a, 'a) => bool = "#unsafe_lt" + +@ocaml.doc(" [unsafe_le a b] will be compiled as [a <= b]. + See also {!unsafe_lt} +") +external unsafe_le: ('a, 'a) => bool = "#unsafe_le" + +@ocaml.doc(" [unsafe_gt a b] will be compiled as [a > b]. + See also {!unsafe_lt} +") +external unsafe_gt: ('a, 'a) => bool = "#unsafe_gt" + +@ocaml.doc(" [unsafe_ge a b] will be compiled as [a >= b]. + See also {!unsafe_lt} +") +external unsafe_ge: ('a, 'a) => bool = "#unsafe_ge" + +@@ocaml.text(" {12 nested modules}") + +@ocaml.doc(" Provide utilities around ['a null] ") +module Null = Js_null + +@ocaml.doc(" Provide utilities around {!undefined} ") +module Undefined = Js_undefined + +@ocaml.doc(" Provide utilities around {!null_undefined} ") +module Nullable = Js_null_undefined + +@ocaml.doc(" @deprecated please use {!Js.Nullable} ") +module Null_undefined = Js_null_undefined + +@ocaml.doc(" Provide utilities for dealing with Js exceptions ") +module Exn = Js_exn + +@ocaml.doc(" Provide bindings to Js array") +module Array = Js_array + +@ocaml.doc(" Provide bindings to Js array") +module Array2 = Js_array2 + +@ocaml.doc(" Provide bindings to JS string ") +module String = Js_string + +@ocaml.doc(" Provide bindings to JS string ") +module String2 = Js_string2 + +@ocaml.doc(" Provide bindings to Js regex expression ") +module Re = Js_re + +@ocaml.doc(" Provide bindings to JS promise ") +module Promise = Js_promise + +@ocaml.doc(" Provide bindings to JS promise ") +module Promise2 = Js_promise2 + +@ocaml.doc(" Provide bindings for JS Date ") +module Date = Js_date + +@ocaml.doc(" Provide utilities for JS dictionary object ") +module Dict = Js_dict + +@ocaml.doc(" Provide bindings to JS global functions in global namespace") +module Global = Js_global + +@ocaml.doc(" Provide utilities for json ") +module Json = Js_json + +@ocaml.doc(" Provide bindings for JS [Math] object ") +module Math = Js_math + +@ocaml.doc(" Provide utilities for {!Js.t} ") +module Obj = Js_obj + +@ocaml.doc(" Provide bindings for JS typed array ") +module Typed_array = Js_typed_array + +@ocaml.doc(" Provide bindings for JS typed array ") +module TypedArray2 = Js_typed_array2 + +@ocaml.doc(" Provide utilities for manipulating JS types ") +module Types = Js_types + +@ocaml.doc(" Provide utilities for JS float ") +module Float = Js_float + +@ocaml.doc(" Provide utilities for int ") +module Int = Js_int + +@ocaml.doc(" Provide utilities for bigint ") +module BigInt = Js_bigint + +@ocaml.doc(" Provide utilities for File ") +module File = Js_file + +@ocaml.doc(" Provide utilities for Blob ") +module Blob = Js_blob + +@ocaml.doc(" Provide utilities for option ") +module Option = Js_option + +@ocaml.doc(" Define the interface for result ") +module Result = Js_result + +@ocaml.doc(" Provide utilities for list ") +module List = Js_list + +module Vector = Js_vector + +module Console = Js_console + +@ocaml.doc(" Provides bindings for ES6 Set ") +module Set = Js_set + +@ocaml.doc(" Provides bindings for ES6 WeakSet ") +module WeakSet = Js_weakset + +@ocaml.doc(" Provides bindings for ES6 Map ") +module Map = Js_map + +@ocaml.doc(" Provides bindings for ES6 WeakMap ") +module WeakMap = Js_weakmap diff --git a/jscomp/runtime/release.ninja b/jscomp/runtime/release.ninja index 5fb3ac1435..d0bd28fbd2 100644 --- a/jscomp/runtime/release.ninja +++ b/jscomp/runtime/release.ninja @@ -11,7 +11,7 @@ rule cc_cmi o runtime/bs_stdlib_mini.cmi : cc runtime/bs_stdlib_mini.resi bsc_flags = -nostdlib -nopervasives -o runtime/js.cmj runtime/js.cmi : cc runtime/js.ml +o runtime/js.cmj runtime/js.cmi : cc runtime/js.res bsc_flags = $bsc_no_open_flags o runtime/caml.cmj : cc_cmi runtime/caml.res | runtime/caml.cmi runtime/caml_int64_extern.cmj o runtime/caml.cmi : cc runtime/caml.resi | runtime/bs_stdlib_mini.cmi runtime/caml_int64_extern.cmj runtime/js.cmi runtime/js.cmj @@ -21,19 +21,19 @@ o runtime/caml_bigint.cmj : cc_cmi runtime/caml_bigint.res | runtime/caml_bigint o runtime/caml_bigint.cmi : cc runtime/caml_bigint.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_bytes.cmj : cc_cmi runtime/caml_bytes.res | runtime/caml_bytes.cmi o runtime/caml_bytes.cmi : cc runtime/caml_bytes.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_exceptions.cmj : cc_cmi runtime/caml_exceptions.res | runtime/caml_exceptions.cmi runtime/js.cmj +o runtime/caml_exceptions.cmj : cc_cmi runtime/caml_exceptions.res | runtime/caml_exceptions.cmi o runtime/caml_exceptions.cmi : cc runtime/caml_exceptions.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_float.cmj : cc_cmi runtime/caml_float.res | runtime/caml_float.cmi runtime/caml_float_extern.cmj o runtime/caml_float.cmi : cc runtime/caml_float.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_format.cmj : cc_cmi runtime/caml_format.res | runtime/caml.cmj runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_format.cmi runtime/caml_int64.cmj runtime/caml_int64_extern.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj o runtime/caml_format.cmi : cc runtime/caml_format.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_hash.cmj : cc_cmi runtime/caml_hash.res | runtime/caml_hash.cmi runtime/caml_hash_primitive.cmj runtime/caml_nativeint_extern.cmj runtime/js.cmj +o runtime/caml_hash.cmj : cc_cmi runtime/caml_hash.res | runtime/caml_hash.cmi runtime/caml_hash_primitive.cmj runtime/caml_nativeint_extern.cmj o runtime/caml_hash.cmi : cc runtime/caml_hash.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_hash_primitive.cmj : cc_cmi runtime/caml_hash_primitive.res | runtime/caml_hash_primitive.cmi runtime/caml_string_extern.cmj o runtime/caml_hash_primitive.cmi : cc runtime/caml_hash_primitive.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_int32.cmj : cc_cmi runtime/caml_int32.res | runtime/caml_int32.cmi runtime/caml_nativeint_extern.cmj o runtime/caml_int32.cmi : cc runtime/caml_int32.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_int64.cmj : cc_cmi runtime/caml_int64.res | runtime/caml.cmj runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_int64.cmi runtime/caml_int64_extern.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj runtime/js.cmj +o runtime/caml_int64.cmj : cc_cmi runtime/caml_int64.res | runtime/caml.cmj runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_int64.cmi runtime/caml_int64_extern.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj o runtime/caml_int64.cmi : cc runtime/caml_int64.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_lexer.cmj : cc_cmi runtime/caml_lexer.res | runtime/caml_lexer.cmi o runtime/caml_lexer.cmi : cc runtime/caml_lexer.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj @@ -41,9 +41,9 @@ o runtime/caml_md5.cmj : cc_cmi runtime/caml_md5.res | runtime/caml_array_extern o runtime/caml_md5.cmi : cc runtime/caml_md5.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_module.cmj : cc_cmi runtime/caml_module.res | runtime/caml_array_extern.cmj runtime/caml_module.cmi runtime/caml_obj.cmj o runtime/caml_module.cmi : cc runtime/caml_module.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_obj.cmj : cc_cmi runtime/caml_obj.res | runtime/caml.cmj runtime/caml_array_extern.cmj runtime/caml_obj.cmi runtime/caml_option.cmj runtime/js.cmj +o runtime/caml_obj.cmj : cc_cmi runtime/caml_obj.res | runtime/caml.cmj runtime/caml_array_extern.cmj runtime/caml_obj.cmi runtime/caml_option.cmj o runtime/caml_obj.cmi : cc runtime/caml_obj.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_option.cmj : cc_cmi runtime/caml_option.res | runtime/caml_option.cmi runtime/caml_undefined_extern.cmj runtime/js.cmj +o runtime/caml_option.cmj : cc_cmi runtime/caml_option.res | runtime/caml_option.cmi runtime/caml_undefined_extern.cmj o runtime/caml_option.cmi : cc runtime/caml_option.resi | runtime/bs_stdlib_mini.cmi runtime/caml_undefined_extern.cmj runtime/js.cmi runtime/js.cmj o runtime/caml_parser.cmj : cc_cmi runtime/caml_parser.res | runtime/caml_parser.cmi o runtime/caml_parser.cmi : cc runtime/caml_parser.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj @@ -51,7 +51,7 @@ o runtime/caml_splice_call.cmj : cc_cmi runtime/caml_splice_call.res | runtime/c o runtime/caml_splice_call.cmi : cc runtime/caml_splice_call.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_string.cmj : cc_cmi runtime/caml_string.res | runtime/caml_string.cmi runtime/caml_string_extern.cmj o runtime/caml_string.cmi : cc runtime/caml_string.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_sys.cmj : cc_cmi runtime/caml_sys.res | runtime/caml_array_extern.cmj runtime/caml_sys.cmi runtime/caml_undefined_extern.cmj runtime/js.cmj +o runtime/caml_sys.cmj : cc_cmi runtime/caml_sys.res | runtime/caml_array_extern.cmj runtime/caml_sys.cmi runtime/caml_undefined_extern.cmj o runtime/caml_sys.cmi : cc runtime/caml_sys.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_array_extern.cmi runtime/caml_array_extern.cmj : cc runtime/caml_array_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_bigint_extern.cmi runtime/caml_bigint_extern.cmj : cc runtime/caml_bigint_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj diff --git a/packages/artifacts.txt b/packages/artifacts.txt index adda960af5..a2aa707bcf 100644 --- a/packages/artifacts.txt +++ b/packages/artifacts.txt @@ -717,7 +717,7 @@ lib/ocaml/int64.resi lib/ocaml/js.cmi lib/ocaml/js.cmj lib/ocaml/js.cmt -lib/ocaml/js.ml +lib/ocaml/js.res lib/ocaml/js_OO.cmi lib/ocaml/js_OO.cmj lib/ocaml/js_OO.cmt diff --git a/scripts/ninja.js b/scripts/ninja.js index 1a36cdf503..c349e3ae5a 100755 --- a/scripts/ninja.js +++ b/scripts/ninja.js @@ -19,7 +19,7 @@ var runtimeMlFiles = runtimeFiles.filter( x => !x.startsWith("bs_stdlib_mini") && (x.endsWith(".ml") || x.endsWith(".res")) && - x !== "js.ml", + x !== "js.res" ); var runtimeMliFiles = runtimeFiles.filter( x => @@ -849,7 +849,7 @@ ${ninjaQuickBuildList([ ], [ ["js.cmj", "js.cmi"], - "js.ml", + "js.res", "cc", ninjaCwd, [["bsc_flags", "$bsc_no_open_flags"]], @@ -940,7 +940,7 @@ ${ninjaQuickBuildList([ ], [ ["js.cmj", "js.cmi"], - "js.ml", + "js.res", "cc", ninjaCwd, [["bsc_flags", "$bsc_primitive_flags"]], @@ -969,7 +969,7 @@ ${ninjaQuickBuildList([ !x.includes(".cppo") && !x.includes(".pp") && !x.includes("#") && - x !== "js.ml", + x !== "js.res" ); var othersFiles = othersDirFiles.filter( x =>