Skip to content

Commit 47bbdff

Browse files
DZakhcristianoc
authored andcommitted
Remove some reason syntax
1 parent b3e7e29 commit 47bbdff

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

jscomp/others/js_null.resi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525
/*** Provides functionality for dealing with the `Js.null<'a>` type */
2626

27-
@unboxed /** Local alias for `Js.null('a)` */
27+
@unboxed /** Local alias for `Js.null<'a>` */
2828
type t<+'a> = Js.null<'a> =
2929
| Value('a)
3030
| @as(null) Null
3131

32-
/** Constructs a value of `Js.null('a)` containing a value of `'a`. */
32+
/** Constructs a value of `Js.null<'a>` containing a value of `'a`. */
3333
external return: 'a => t<'a> = "%identity"
3434

3535
@deprecated("Use = Js.null directly ")
@@ -45,9 +45,9 @@ let getExn: t<'a> => 'a
4545
/**
4646
Maps the contained value using the given function.
4747
48-
If `Js.null('a)` contains a value, that value is unwrapped, mapped to a `'b`
48+
If `Js.null<'a>` contains a value, that value is unwrapped, mapped to a `'b`
4949
using the given function `'a => 'b`, then wrapped back up and returned as
50-
`Js.null('b)`.
50+
`Js.null<'b>`.
5151
5252
```res example
5353
let maybeGreetWorld = (maybeGreeting: Js.null<string>) =>
@@ -58,7 +58,7 @@ let bind: (t<'a>, (. 'a) => 'b) => t<'b>
5858

5959
/**
6060
Iterates over the contained value with the given function.
61-
If `Js.null('a)` contains a value, that value is unwrapped and applied to the given function.
61+
If `Js.null<'a>` contains a value, that value is unwrapped and applied to the given function.
6262
6363
```res example
6464
let maybeSay = (maybeMessage: Js.null<string>) =>
@@ -68,7 +68,7 @@ let maybeSay = (maybeMessage: Js.null<string>) =>
6868
let iter: (t<'a>, (. 'a) => unit) => unit
6969

7070
/**
71-
Maps `option('a)` to `Js.null('a)`.
71+
Maps `option<'a>` to `Js.null<'a>`.
7272
`Some(a)` => `a`
7373
`None` => `empty`
7474
*/
@@ -77,7 +77,7 @@ let fromOption: option<'a> => t<'a>
7777
@deprecated("Use fromOption instead") let from_opt: option<'a> => t<'a>
7878

7979
/**
80-
Maps `Js.null('a)` to `option('a)`.
80+
Maps `Js.null<'a>` to `option<'a>`.
8181
`a` => `Some(a)`
8282
`empty` => `None`
8383
*/

jscomp/others/js_null_undefined.resi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@
2424

2525
/*** Contains functionality for dealing with values that can be both `null` and `undefined` */
2626

27-
@unboxed /** Local alias for `Js.null_undefined('a)`. */
27+
@unboxed /** Local alias for `Js.null_undefined<'a>`. */
2828
type t<+'a> = Js.nullable<'a> =
2929
| Value('a)
3030
| @as(null) Null
3131
| @as(undefined) Undefined
3232

33-
/** Constructs a value of `Js.null_undefined('a)` containing a value of `'a`. */
33+
/** Constructs a value of `Js.null_undefined<'a>` containing a value of `'a`. */
3434
external return: 'a => t<'a> = "%identity"
3535

3636
/** Returns `true` if the given value is null or undefined, `false` otherwise. */
3737
external isNullable: t<'a> => bool = "#is_nullable"
3838

39-
/** The null value of type `Js.null_undefined('a)`. */
39+
/** The null value of type `Js.null_undefined<'a>`. */
4040
external null: t<'a> = "#null"
4141

42-
/** The undefined value of type `Js.null_undefined('a)`. */
42+
/** The undefined value of type `Js.null_undefined<'a>`. */
4343
external undefined: t<'a> = "#undefined"
4444

4545
/**
4646
Maps the contained value using the given function.
4747
48-
If `Js.null_undefined('a)` contains a value, that value is unwrapped, mapped to
48+
If `Js.null_undefined<'a>` contains a value, that value is unwrapped, mapped to
4949
a `'b` using the given function `a' => 'b`, then wrapped back up and returned
50-
as `Js.null_undefined('b)`.
50+
as `Js.null_undefined<'b>`.
5151
5252
```res example
5353
let maybeGreetWorld = (maybeGreeting: Js.null_undefined<string>) =>
@@ -58,7 +58,7 @@ let bind: (t<'a>, (. 'a) => 'b) => t<'b>
5858

5959
/**
6060
Iterates over the contained value with the given function.
61-
If `Js.null_undefined('a)` contains a value, that value is unwrapped and applied to the given function.
61+
If `Js.null_undefined<'a>` contains a value, that value is unwrapped and applied to the given function.
6262
6363
```res example
6464
let maybeSay = (maybeMessage: Js.null_undefined<string>) =>
@@ -68,7 +68,7 @@ let maybeSay = (maybeMessage: Js.null_undefined<string>) =>
6868
let iter: (t<'a>, (. 'a) => unit) => unit
6969

7070
/**
71-
Maps `option('a)` to `Js.null_undefined('a)`.
71+
Maps `option<'a>` to `Js.null_undefined<'a>`.
7272
`Some(a)` => `a`
7373
`None` => `undefined`
7474
*/
@@ -77,7 +77,7 @@ let fromOption: option<'a> => t<'a>
7777
@deprecated("Use fromOption instead") let from_opt: option<'a> => t<'a>
7878

7979
/**
80-
Maps `Js.null_undefined('a)` to `option('a)`.
80+
Maps `Js.null_undefined<'a>` to `option<'a>`.
8181
`a` => `Some(a)`
8282
`undefined` => `None`
8383
`null` => `None`

jscomp/others/js_string.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ external length: t => int = "length"
117117
/**
118118
`get(s, n)` returns as a `string` the character at the given index number. If
119119
`n` is out of range, this function returns `undefined`, so at some point this
120-
function may be modified to return `option(string)`.
120+
function may be modified to return `option<string>`.
121121
122122
```res example
123123
Js.String2.get("Reason", 0) == "R"

jscomp/others/js_string2.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ external length: t => int = "length"
122122
/**
123123
`get(s, n)` returns as a `string` the character at the given index number. If
124124
`n` is out of range, this function returns `undefined`,so at some point this
125-
function may be modified to return `option(string)`.
125+
function may be modified to return `option<string>`.
126126
127127
```res example
128128
Js.String2.get("Reason", 0) == "R"

jscomp/others/js_undefined.resi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

25-
/*** Provides functionality for dealing with the `Js.undefined('a)` type */
25+
/*** Provides functionality for dealing with the `Js.undefined<'a>` type */
2626

27-
/** Local alias for `Js.undefined('a)` */
27+
/** Local alias for `Js.undefined<'a>` */
2828
type t<+'a> = Js.undefined<'a>
2929

30-
/** Constructs a value of `Js.undefined('a)` containing a value of `'a`. */
30+
/** Constructs a value of `Js.undefined<'a>` containing a value of `'a`. */
3131
external return: 'a => t<'a> = "%identity"
3232

3333
@deprecated("Use = Js.undefined directly")
@@ -49,9 +49,9 @@ let getExn: t<'a> => 'a
4949

5050
/**
5151
Maps the contained value using the given function.
52-
If `Js.undefined('a)` contains a value, that value is unwrapped, mapped to a
52+
If `Js.undefined<'a>` contains a value, that value is unwrapped, mapped to a
5353
`'b` using the given function `a' => 'b`, then wrapped back up and returned as
54-
`Js.undefined('b)`.
54+
`Js.undefined<'b>`.
5555
5656
```res example
5757
let maybeGreetWorld = (maybeGreeting: Js.undefined<string>) =>
@@ -62,7 +62,7 @@ let bind: (t<'a>, (. 'a) => 'b) => t<'b>
6262

6363
/**
6464
Iterates over the contained value with the given function. If
65-
`Js.undefined('a)` contains a value, that value is unwrapped and applied to the
65+
`Js.undefined<'a>` contains a value, that value is unwrapped and applied to the
6666
given function.
6767
6868
```res example
@@ -73,7 +73,7 @@ let maybeSay = (maybeMessage: Js.undefined<string>) =>
7373
let iter: (t<'a>, (. 'a) => unit) => unit
7474

7575
/**
76-
Maps `option('a)` to `Js.undefined('a)`.
76+
Maps `option<'a>` to `Js.undefined<'a>`.
7777
`Some(a)` => `a`
7878
`None` => `empty`
7979
*/
@@ -82,7 +82,7 @@ let fromOption: option<'a> => t<'a>
8282
@deprecated("Use fromOption instead") let from_opt: option<'a> => t<'a>
8383

8484
/**
85-
Maps `Js.undefined('a)` to `option('a)`
85+
Maps `Js.undefined<'a>` to `option<'a>`
8686
`a` => `Some(a)`
8787
`empty` => `None`
8888
*/

jscomp/syntax/src/reactjs_jsx_v3.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ let rec recursivelyMakeNamedArgsForExternal list args =
228228
}
229229
(* ~foo: int=1 *)
230230
| _label, Some type_, Some _ -> type_
231-
(* ~foo: option(int)=? *)
231+
(* ~foo: option<int>=? *)
232232
| ( label,
233233
Some {ptyp_desc = Ptyp_constr ({txt = Lident "option"}, [type_])},
234234
_ )
@@ -477,7 +477,7 @@ let jsxMapper ~config =
477477
(Preprocessor
478478
(Printf.sprintf
479479
"React: optional argument annotations must have explicit \
480-
`option`. Did you mean `option(%s)=?`?"
480+
`option`. Did you mean `option<%s>=?`?"
481481
currentType)))
482482
| _ -> ()
483483
in

jscomp/syntax/src/reactjs_jsx_v4.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ let rec recursivelyTransformNamedArgsForMake expr args newtypes coreType =
628628
(Preprocessor
629629
(Printf.sprintf
630630
"React: optional argument annotations must have explicit \
631-
`option`. Did you mean `option(%s)=?`?"
631+
`option`. Did you mean `option<%s>=?`?"
632632
currentType)))
633633
| _ -> ()
634634
in

0 commit comments

Comments
 (0)