Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Feb 9, 2025
1 parent cb04a8b commit 8ed70db
Show file tree
Hide file tree
Showing 77 changed files with 562 additions and 497 deletions.
4 changes: 2 additions & 2 deletions lib/es6/Intl_NumberFormat_Grouping.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


import * as Type from "./Type.js";
import * as Stdlib_Type from "./Stdlib_Type.js";

function parseJsValue(value) {
let value$1 = Type.Classify.classify(value);
let value$1 = Stdlib_Type.Classify.classify(value);
if (typeof value$1 !== "object") {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/es6/Option.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


import * as $$Error from "./Error.js";
import * as Stdlib_Error from "./Stdlib_Error.js";
import * as Primitive_option from "./Primitive_option.js";

function filter(opt, p) {
Expand All @@ -21,7 +21,7 @@ function getExn(x, message) {
if (x !== undefined) {
return Primitive_option.valFromOption(x);
} else {
return $$Error.panic(message !== undefined ? message : "Option.getExn called for None value");
return Stdlib_Error.panic(message !== undefined ? message : "Option.getExn called for None value");
}
}

Expand Down
21 changes: 0 additions & 21 deletions lib/es6/Pervasives.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@


import * as $$Error from "./Error.js";
import * as Primitive_object from "./Primitive_object.js";
import * as Primitive_exceptions from "./Primitive_exceptions.js";

function failwith(s) {
Expand Down Expand Up @@ -117,21 +115,6 @@ function $at(l1, l2) {
}
}

function assertEqual(a, b) {
if (!Primitive_object.notequal(a, b)) {
return;
}
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"Pervasives.res",
596,
4
],
Error: new Error()
};
}

let max_int = 2147483647;

let infinity = Infinity;
Expand All @@ -144,8 +127,6 @@ let min_float = 2.22507385850720138e-308;

let epsilon_float = 2.22044604925031308e-16;

let panic = $$Error.panic;

export {
failwith,
invalid_arg,
Expand All @@ -166,7 +147,5 @@ export {
bool_of_string_opt,
int_of_string_opt,
$at,
panic,
assertEqual,
}
/* No side effect */
57 changes: 57 additions & 0 deletions lib/es6/Stdlib.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@


import * as Stdlib_Error from "./Stdlib_Error.js";
import * as Primitive_object from "./Primitive_object.js";

function assertEqual(a, b) {
if (!Primitive_object.notequal(a, b)) {
return;
}
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"Stdlib.res",
292,
4
],
Error: new Error()
};
}

let $$Array;

let Console;

let $$Date;

let Dict;

let Exn;

let $$Error;

let $$Int8Array;

let $$Int16Array;

let $$Int32Array;

let $$Promise;

let $$RegExp;
Expand All @@ -19,15 +48,43 @@ let $$String;

let $$Symbol;

let Type;

let $$TypedArray;

let $$Uint8Array;

let $$Uint8ClampedArray;

let $$Uint16Array;

let $$Uint32Array;

let panic = Stdlib_Error.panic;

export {
$$Array,
Console,
$$Date,
Dict,
Exn,
$$Error,
$$Int8Array,
$$Int16Array,
$$Int32Array,
$$Promise,
$$RegExp,
Result,
$$Set,
$$String,
$$Symbol,
Type,
$$TypedArray,
$$Uint8Array,
$$Uint8ClampedArray,
$$Uint16Array,
$$Uint32Array,
panic,
assertEqual,
}
/* No side effect */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/js/Intl_NumberFormat_Grouping.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

let Type = require("./Type.js");
let Stdlib_Type = require("./Stdlib_Type.js");

function parseJsValue(value) {
let value$1 = Type.Classify.classify(value);
let value$1 = Stdlib_Type.Classify.classify(value);
if (typeof value$1 !== "object") {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/js/Option.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

let $$Error = require("./Error.js");
let Stdlib_Error = require("./Stdlib_Error.js");
let Primitive_option = require("./Primitive_option.js");

function filter(opt, p) {
Expand All @@ -21,7 +21,7 @@ function getExn(x, message) {
if (x !== undefined) {
return Primitive_option.valFromOption(x);
} else {
return $$Error.panic(message !== undefined ? message : "Option.getExn called for None value");
return Stdlib_Error.panic(message !== undefined ? message : "Option.getExn called for None value");
}
}

Expand Down
21 changes: 0 additions & 21 deletions lib/js/Pervasives.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

let $$Error = require("./Error.js");
let Primitive_object = require("./Primitive_object.js");
let Primitive_exceptions = require("./Primitive_exceptions.js");

function failwith(s) {
Expand Down Expand Up @@ -117,21 +115,6 @@ function $at(l1, l2) {
}
}

function assertEqual(a, b) {
if (!Primitive_object.notequal(a, b)) {
return;
}
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"Pervasives.res",
596,
4
],
Error: new Error()
};
}

let max_int = 2147483647;

let infinity = Infinity;
Expand All @@ -144,8 +127,6 @@ let min_float = 2.22507385850720138e-308;

let epsilon_float = 2.22044604925031308e-16;

let panic = $$Error.panic;

exports.failwith = failwith;
exports.invalid_arg = invalid_arg;
exports.Exit = Exit;
Expand All @@ -165,6 +146,4 @@ exports.bool_of_string = bool_of_string;
exports.bool_of_string_opt = bool_of_string_opt;
exports.int_of_string_opt = int_of_string_opt;
exports.$at = $at;
exports.panic = panic;
exports.assertEqual = assertEqual;
/* No side effect */
57 changes: 57 additions & 0 deletions lib/js/Stdlib.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
'use strict';

let Stdlib_Error = require("./Stdlib_Error.js");
let Primitive_object = require("./Primitive_object.js");

function assertEqual(a, b) {
if (!Primitive_object.notequal(a, b)) {
return;
}
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"Stdlib.res",
292,
4
],
Error: new Error()
};
}

let $$Array;

let Console;

let $$Date;

let Dict;

let Exn;

let $$Error;

let $$Int8Array;

let $$Int16Array;

let $$Int32Array;

let $$Promise;

let $$RegExp;
Expand All @@ -19,13 +48,41 @@ let $$String;

let $$Symbol;

let Type;

let $$TypedArray;

let $$Uint8Array;

let $$Uint8ClampedArray;

let $$Uint16Array;

let $$Uint32Array;

let panic = Stdlib_Error.panic;

exports.$$Array = $$Array;
exports.Console = Console;
exports.$$Date = $$Date;
exports.Dict = Dict;
exports.Exn = Exn;
exports.$$Error = $$Error;
exports.$$Int8Array = $$Int8Array;
exports.$$Int16Array = $$Int16Array;
exports.$$Int32Array = $$Int32Array;
exports.$$Promise = $$Promise;
exports.$$RegExp = $$RegExp;
exports.Result = Result;
exports.$$Set = $$Set;
exports.$$String = $$String;
exports.$$Symbol = $$Symbol;
exports.Type = Type;
exports.$$TypedArray = $$TypedArray;
exports.$$Uint8Array = $$Uint8Array;
exports.$$Uint8ClampedArray = $$Uint8ClampedArray;
exports.$$Uint16Array = $$Uint16Array;
exports.$$Uint32Array = $$Uint32Array;
exports.panic = panic;
exports.assertEqual = assertEqual;
/* No side effect */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8ed70db

Please sign in to comment.