Skip to content

Commit 7e93c44

Browse files
committed
clean up
1 parent 3cd7da9 commit 7e93c44

25 files changed

+18303
-18327
lines changed

jscomp/main/builtin_cmi_datasets.ml

+48-48
Large diffs are not rendered by default.

jscomp/main/builtin_cmj_datasets.ml

+15-15
Large diffs are not rendered by default.

jscomp/stdlib-406/pervasives.ml

+1-3
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,7 @@ external format_of_string :
609609
('a, 'b, 'c, 'd, 'e, 'f) format6 ->
610610
('a, 'b, 'c, 'd, 'e, 'f) format6 = "%identity"
611611

612-
let ( ^^ ) (Format (fmt1, str1)) (Format (fmt2, str2)) =
613-
Format (CamlinternalFormatBasics.concat_fmt fmt1 fmt2,
614-
str1 ^ "%," ^ str2)
612+
615613

616614
(* Miscellaneous *)
617615

jscomp/stdlib-406/pervasives.mli

-10
Original file line numberDiff line numberDiff line change
@@ -1294,16 +1294,6 @@ external format_of_string :
12941294
{!Scanf.format_from_string} function.
12951295
*)
12961296

1297-
val ( ^^ ) :
1298-
('a, 'b, 'c, 'd, 'e, 'f) format6 ->
1299-
('f, 'b, 'c, 'e, 'g, 'h) format6 ->
1300-
('a, 'b, 'c, 'd, 'g, 'h) format6
1301-
(** [f1 ^^ f2] catenates format strings [f1] and [f2]. The result is a
1302-
format string that behaves as the concatenation of format strings [f1] and
1303-
[f2]: in case of formatted output, it accepts arguments from [f1], then
1304-
arguments from [f2]; in case of formatted input, it returns results from
1305-
[f1], then results from [f2].
1306-
Right-associative operator at precedence level 5/11. *)
13071297

13081298

13091299
(** {1 Program termination} *)

jscomp/test/caml_format_test.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var Printf = require("../../lib/js/printf.js");
1010
var Caml_int64 = require("../../lib/js/caml_int64.js");
1111
var Pervasives = require("../../lib/js/pervasives.js");
1212
var Caml_format = require("../../lib/js/caml_format.js");
13+
var CamlinternalFormatBasics = require("../../lib/js/camlinternalFormatBasics.js");
1314

1415
var of_string = [
1516
[
@@ -280,6 +281,13 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({
280281
];
281282
}), pairs$1))))));
282283

284+
function $caret$caret(param, param$1) {
285+
return /* Format */{
286+
_0: CamlinternalFormatBasics.concat_fmt(param._0, param$1._0),
287+
_1: param._1 + ("%," + param$1._1)
288+
};
289+
}
290+
283291
function ff(param) {
284292
return Caml_format.caml_format_int("%32d", param);
285293
}
@@ -289,7 +297,7 @@ var formatter_suites_0 = [
289297
(function (param) {
290298
return {
291299
TAG: /* Eq */0,
292-
_0: Curry._6(Format.asprintf(Pervasives.$caret$caret(/* Format */{
300+
_0: Curry._6(Format.asprintf($caret$caret(/* Format */{
293301
_0: {
294302
TAG: /* String */2,
295303
_0: /* No_padding */0,
@@ -359,7 +367,7 @@ var formatter_suites_1 = {
359367
(function (param) {
360368
return {
361369
TAG: /* Eq */0,
362-
_0: Curry._8(Format.asprintf(Pervasives.$caret$caret(/* Format */{
370+
_0: Curry._8(Format.asprintf($caret$caret(/* Format */{
363371
_0: {
364372
TAG: /* String */2,
365373
_0: /* No_padding */0,
@@ -2338,7 +2346,7 @@ var int64_suites_1 = {
23382346
],
23392347
tl: {
23402348
hd: [
2341-
"File \"caml_format_test.ml\", line 206, characters 4-11",
2349+
"File \"caml_format_test.ml\", line 209, characters 4-11",
23422350
(function (param) {
23432351
return {
23442352
TAG: /* Eq */0,
@@ -2378,7 +2386,7 @@ var int64_suites_1 = {
23782386
],
23792387
tl: {
23802388
hd: [
2381-
"File \"caml_format_test.ml\", line 214, characters 4-11",
2389+
"File \"caml_format_test.ml\", line 217, characters 4-11",
23822390
(function (param) {
23832391
return {
23842392
TAG: /* Eq */0,
@@ -2398,7 +2406,7 @@ var int64_suites_1 = {
23982406
],
23992407
tl: {
24002408
hd: [
2401-
"File \"caml_format_test.ml\", line 215, characters 4-11",
2409+
"File \"caml_format_test.ml\", line 218, characters 4-11",
24022410
(function (param) {
24032411
return {
24042412
TAG: /* Eq */0,
@@ -2418,7 +2426,7 @@ var int64_suites_1 = {
24182426
],
24192427
tl: {
24202428
hd: [
2421-
"File \"caml_format_test.ml\", line 219, characters 4-11",
2429+
"File \"caml_format_test.ml\", line 222, characters 4-11",
24222430
(function (param) {
24232431
return {
24242432
TAG: /* Eq */0,
@@ -2438,7 +2446,7 @@ var int64_suites_1 = {
24382446
],
24392447
tl: {
24402448
hd: [
2441-
"File \"caml_format_test.ml\", line 222, characters 4-11",
2449+
"File \"caml_format_test.ml\", line 225, characters 4-11",
24422450
(function (param) {
24432451
return {
24442452
TAG: /* Eq */0,
@@ -2458,7 +2466,7 @@ var int64_suites_1 = {
24582466
],
24592467
tl: {
24602468
hd: [
2461-
"File \"caml_format_test.ml\", line 225, characters 4-11",
2469+
"File \"caml_format_test.ml\", line 228, characters 4-11",
24622470
(function (param) {
24632471
return {
24642472
TAG: /* Eq */0,
@@ -2759,6 +2767,7 @@ exports.u = u;
27592767
exports.to_str = to_str;
27602768
exports.v = v;
27612769
exports.suites = suites;
2770+
exports.$caret$caret = $caret$caret;
27622771
exports.ff = ff;
27632772
exports.a = a;
27642773
exports.formatter_suites = formatter_suites;

jscomp/test/caml_format_test.ml

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ let suites : Mt.pair_suites =
6969
float_of_string b)))
7070
|> Array.to_list )
7171

72+
let ( ^^ ) (Format (fmt1, str1) : _ format6) (Format (fmt2, str2) : _ format6) : _ format6 =
73+
Format (CamlinternalFormatBasics.concat_fmt fmt1 fmt2,
74+
str1 ^ "%," ^ str2)
7275

7376

7477
let ff = format_int "%32d"

0 commit comments

Comments
 (0)