Skip to content

Commit 04d0658

Browse files
committed
Rename Tmod_hole to Tmod_typed_hole
1 parent 5bc4abe commit 04d0658

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

src/frontend/query_commands.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a = function
751751
let structures = Mbrowse.enclosing pos [ Mbrowse.of_typedtree typedtree ] in
752752
begin
753753
match structures with
754-
| (_, (Browse_raw.Module_expr { mod_desc = Tmod_hole; _ } as node_for_loc))
754+
| (_, (Browse_raw.Module_expr { mod_desc = Tmod_typed_hole; _ } as node_for_loc))
755755
:: (_, node)
756756
:: _parents ->
757757
let loc = Mbrowse.node_loc node_for_loc in

src/ocaml/merlin_specific/browse_raw.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ and of_module_expr_desc = function
529529
| Tmod_constraint (me, _, mtc, _) ->
530530
of_module_expr me ** app (Module_type_constraint mtc)
531531
| Tmod_unpack (e, _) -> of_expression e
532-
| Tmod_hole -> id_fold
532+
| Tmod_typed_hole -> id_fold
533533

534534
and of_structure_item_desc = function
535535
| Tstr_eval (e, _, _) -> of_expression e
@@ -994,7 +994,7 @@ let all_holes (env, node) =
994994
match node with
995995
| Expression { exp_desc = Texp_typed_hole; exp_loc; exp_type; exp_env; _ } ->
996996
(exp_loc, exp_env, `Exp exp_type) :: acc
997-
| Module_expr { mod_desc = Tmod_hole; mod_loc; mod_type; mod_env; _ } ->
997+
| Module_expr { mod_desc = Tmod_typed_hole; mod_loc; mod_type; mod_env; _ } ->
998998
(mod_loc, mod_env, `Mod mod_type) :: acc
999999
| _ -> aux acc (env, node)
10001000
in

src/ocaml/typing/cmt_format.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ let iter_on_occurrences
322322
(match mod_desc with
323323
| Tmod_ident (path, lid) -> f ~namespace:Module mod_env path lid
324324
| Tmod_structure _ | Tmod_functor _ | Tmod_apply _ | Tmod_apply_unit _
325-
| Tmod_constraint _ | Tmod_unpack _ | Tmod_hole -> ());
325+
| Tmod_constraint _ | Tmod_unpack _ | Tmod_typed_hole -> ());
326326
default_iterator.module_expr sub me);
327327

328328
open_description =

src/ocaml/typing/printtyped.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ and module_expr i ppf x =
10441044
let i = i+1 in
10451045
match x.mod_desc with
10461046
| Tmod_ident (li,_) -> line i ppf "Tmod_ident %a\n" fmt_path li;
1047-
| Tmod_hole -> line i ppf "Tmod_hole\n";
1047+
| Tmod_typed_hole -> line i ppf "Tmod_typed_hole\n";
10481048
| Tmod_structure (s) ->
10491049
line i ppf "Tmod_structure\n";
10501050
structure i ppf s;

src/ocaml/typing/tast_iterator.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ let module_expr sub {mod_loc; mod_desc; mod_env; mod_attributes; _} =
560560
sub.attributes sub mod_attributes;
561561
sub.env sub mod_env;
562562
match mod_desc with
563-
| Tmod_hole -> ()
563+
| Tmod_typed_hole -> ()
564564
| Tmod_ident (_, lid) -> iter_loc sub lid
565565
| Tmod_structure st -> sub.structure sub st
566566
| Tmod_functor (arg, mexpr) ->

src/ocaml/typing/tast_mapper.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ let module_expr sub x =
762762
let mod_desc =
763763
match x.mod_desc with
764764
| Tmod_ident (path, lid) -> Tmod_ident (path, map_loc sub lid)
765-
| Tmod_hole -> Tmod_hole
765+
| Tmod_typed_hole -> Tmod_typed_hole
766766
| Tmod_structure st -> Tmod_structure (sub.structure sub st)
767767
| Tmod_functor (arg, mexpr) ->
768768
Tmod_functor (functor_parameter sub arg, sub.module_expr sub mexpr)

src/ocaml/typing/typecore.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4370,7 +4370,7 @@ and is_nonexpansive_mod mexp =
43704370
match mexp.mod_desc with
43714371
| Tmod_ident _
43724372
| Tmod_functor _
4373-
| Tmod_hole -> true
4373+
| Tmod_typed_hole -> true
43744374
| Tmod_unpack (e, _) -> is_nonexpansive e
43754375
| Tmod_constraint (m, _, _, _) -> is_nonexpansive_mod m
43764376
| Tmod_structure str ->

src/ocaml/typing/typedtree.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ and module_expr_desc =
501501
| Tmod_constraint of
502502
module_expr * Types.module_type * module_type_constraint * module_coercion
503503
| Tmod_unpack of expression * Types.module_type
504-
| Tmod_hole
504+
| Tmod_typed_hole
505505

506506
and structure = {
507507
str_items : structure_item list;

src/ocaml/typing/typedtree.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ and module_expr_desc =
757757
(ME : MT) (constraint = Tmodtype_explicit MT)
758758
*)
759759
| Tmod_unpack of expression * Types.module_type
760-
| Tmod_hole
760+
| Tmod_typed_hole
761761

762762
and structure = {
763763
str_items : structure_item list;

src/ocaml/typing/typemod.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,7 @@ let rec path_of_module mexp =
22532253
| Tmod_constraint (mexp, _, _, _) ->
22542254
path_of_module mexp
22552255
| (Tmod_structure _ | Tmod_functor _ | Tmod_apply_unit _ | Tmod_unpack _ |
2256-
Tmod_apply _ | Tmod_hole) ->
2256+
Tmod_apply _ | Tmod_typed_hole) ->
22572257
raise Not_a_path
22582258

22592259
let path_of_module mexp =
@@ -2738,7 +2738,7 @@ and type_module_aux ~alias sttn funct_body anchor env smod =
27382738
| Pmod_extension ({ txt; _ }, _) when txt = Ast_helper.hole_txt ->
27392739
Msupport.raise_error exn;
27402740
{
2741-
mod_desc = Tmod_hole;
2741+
mod_desc = Tmod_typed_hole;
27422742
mod_type = Mty_for_hole;
27432743
mod_loc = sarg.pmod_loc;
27442744
mod_env = env;
@@ -2782,7 +2782,7 @@ and type_module_aux ~alias sttn funct_body anchor env smod =
27822782
mod_loc = smod.pmod_loc },
27832783
Shape.leaf_for_unpack
27842784
| Pmod_extension ({ txt; _ }, _) when txt = Ast_helper.hole_txt ->
2785-
{ mod_desc = Tmod_hole;
2785+
{ mod_desc = Tmod_typed_hole;
27862786
mod_type = Mty_for_hole;
27872787
mod_env = env;
27882788
mod_attributes = smod.pmod_attributes;

0 commit comments

Comments
 (0)