Skip to content

Commit 9488542

Browse files
committed
Updates
1 parent 9b730ed commit 9488542

File tree

6 files changed

+114
-63
lines changed

6 files changed

+114
-63
lines changed

jscomp/others/belt_Float.ml

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
(* Copyright (C) 2017 Authors of BuckleScript
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
125
(** {!Belt.Float}
226
Utililites for Float
327
*)
@@ -10,10 +34,10 @@ external fromString: string -> float = "parseFloat" [@@bs.val]
1034

1135
external toString: float -> string = "String" [@@bs.val]
1236

13-
let (+) = (+.)
37+
external ( + ) : float -> float -> float = "%addfloat"
1438

15-
let (-) = (-.)
39+
external ( - ) : float -> float -> float = "%subfloat"
1640

17-
let (/) = (/.)
41+
external ( * ) : float -> float -> float = "%mulfloat"
1842

19-
let ( * ) = ( *. )
43+
external ( / ) : float -> float -> float = "%divfloat"

jscomp/others/belt_Float.mli

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
(* Copyright (C) 2017 Authors of BuckleScript
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
125
(** {!Belt.Float}
226
Utililites for Float
327
*)
@@ -10,10 +34,10 @@ external fromString: string -> float = "parseFloat" [@@bs.val]
1034

1135
external toString: float -> string = "String" [@@bs.val]
1236

13-
val (+): float -> float -> float
37+
external ( + ) : float -> float -> float = "%addfloat"
1438

15-
val (-): float -> float -> float
39+
external ( - ) : float -> float -> float = "%subfloat"
1640

17-
val (/): float -> float -> float
41+
external ( * ) : float -> float -> float = "%mulfloat"
1842

19-
val ( * ): float -> float -> float
43+
external ( / ) : float -> float -> float = "%divfloat"

jscomp/others/belt_Int.ml

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
(* Copyright (C) 2017 Authors of BuckleScript
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
125
(** {!Belt.Int}
226
Utililites for Int
327
*)
@@ -10,10 +34,10 @@ external fromString: string -> (_ [@bs.as 10]) -> int = "parseInt" [@@bs.val]
1034

1135
external toString: int -> string = "String" [@@bs.val]
1236

13-
let (+) = (+)
37+
external ( + ) : int -> int -> int = "%addint"
1438

15-
let (-) = (-)
39+
external ( - ) : int -> int -> int = "%subint"
1640

17-
let (/) = (/)
41+
external ( * ) : int -> int -> int = "%mulint"
1842

19-
let ( * ) = ( * )
43+
external ( / ) : int -> int -> int = "%divint"

jscomp/others/belt_Int.mli

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
(* Copyright (C) 2017 Authors of BuckleScript
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
125
(** {!Belt.Int}
226
Utililites for Int
327
*)
@@ -10,10 +34,10 @@ external fromString: string -> (_ [@bs.as 10]) -> int = "parseInt" [@@bs.val]
1034

1135
external toString: int -> string = "String" [@@bs.val]
1236

13-
val (+): int -> int -> int
37+
external ( + ) : int -> int -> int = "%addint"
1438

15-
val (-): int -> int -> int
39+
external ( - ) : int -> int -> int = "%subint"
1640

17-
val (/): int -> int -> int
41+
external ( * ) : int -> int -> int = "%mulint"
1842

19-
val ( * ): int -> int -> int
43+
external ( / ) : int -> int -> int = "%divint"

lib/js/belt_Float.js

+1-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
'use strict';
2-
3-
4-
function $plus(prim, prim$1) {
5-
return prim + prim$1;
6-
}
7-
8-
function $neg(prim, prim$1) {
9-
return prim - prim$1;
10-
}
11-
12-
function $slash(prim, prim$1) {
13-
return prim / prim$1;
14-
}
15-
16-
function $star(prim, prim$1) {
17-
return prim * prim$1;
18-
}
19-
20-
exports.$plus = $plus;
21-
exports.$neg = $neg;
22-
exports.$slash = $slash;
23-
exports.$star = $star;
24-
/* No side effect */
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */

lib/js/belt_Int.js

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1 @@
1-
'use strict';
2-
3-
var Caml_int32 = require("./caml_int32.js");
4-
5-
function $plus(prim, prim$1) {
6-
return prim + prim$1 | 0;
7-
}
8-
9-
function $neg(prim, prim$1) {
10-
return prim - prim$1 | 0;
11-
}
12-
13-
function $slash(prim, prim$1) {
14-
return prim / prim$1 | 0;
15-
}
16-
17-
var $star = Caml_int32.imul;
18-
19-
exports.$plus = $plus;
20-
exports.$neg = $neg;
21-
exports.$slash = $slash;
22-
exports.$star = $star;
23-
/* No side effect */
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */

0 commit comments

Comments
 (0)