Skip to content

Commit 90048aa

Browse files
committed
refactor
1 parent 76814fd commit 90048aa

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

compiler/frontend/ast_comb.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ let tuple_type_pair ?loc kind arity =
5757
result )
5858
| [] -> assert false
5959

60-
let re_id = Ast_literal.Lid.js_re_id
60+
let regexp_id = Ast_literal.Lid.regexp_id
6161

62-
let to_js_re_type loc = Typ.constr ~loc {txt = re_id; loc} []
62+
let to_regexp_type loc = Typ.constr ~loc {txt = regexp_id; loc} []
6363

6464
let to_undefined_type loc x =
6565
Typ.constr ~loc {txt = Ast_literal.Lid.js_undefined; loc} [x]

compiler/frontend/ast_comb.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ val tuple_type_pair :
3939

4040
val to_undefined_type : Location.t -> Parsetree.core_type -> Parsetree.core_type
4141

42-
val to_js_re_type : Location.t -> Parsetree.core_type
42+
val to_regexp_type : Location.t -> Parsetree.core_type
4343

4444
val single_non_rec_value :
4545
?attrs:Parsetree.attributes ->

compiler/frontend/ast_exp_extension.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let handle_extension e (self : Bs_ast_mapper.mapper)
6060
| "re" ->
6161
Exp.constraint_ ~loc
6262
(Ast_exp_handle_external.handle_raw ~kind:Raw_re loc payload)
63-
(Ast_comb.to_js_re_type loc)
63+
(Ast_comb.to_regexp_type loc)
6464
| "external" -> (
6565
Location.deprecated loc
6666
"%external is deprecated, use %raw or regular FFI syntax instead.";

compiler/frontend/ast_literal.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ module Lid = struct
7070
(* FIXME: Use primitive module *)
7171
let js_null_undefined : t = Ldot (Lident "Js", "null_undefined")
7272

73-
(* FIXME: Use primitive module *)
74-
let js_re_id : t = Ldot (Lident "Stdlib_RegExp", "t")
73+
let regexp_id : t = Ldot (Lident "Stdlib_RegExp", "t")
7574
end
7675

7776
module No_loc = struct

compiler/frontend/ast_literal.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module Lid : sig
5757

5858
val js_null_undefined : t
5959

60-
val js_re_id : t
60+
val regexp_id : t
6161
end
6262

6363
type expression_lit = Parsetree.expression lit

0 commit comments

Comments
 (0)