@@ -389,7 +389,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
389
389
\ To fix this, change the highlighted code so it evaluates to a \
390
390
@{<info>bool@}."
391
391
| Some Await , _ ->
392
- Cmt_utils . add_possible_action
392
+ Actions . add_possible_action
393
393
{loc; action = RemoveAwait ; description = " Remove await" };
394
394
fprintf ppf
395
395
" \n\n \
@@ -417,7 +417,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
417
417
| Some ComparisonOperator , _ ->
418
418
fprintf ppf " \n\n You can only compare things of the same type."
419
419
| Some ArrayValue , _ ->
420
- Cmt_utils . add_possible_action
420
+ Actions . add_possible_action
421
421
{loc; action = RewriteArrayToTuple ; description = " Rewrite to tuple" };
422
422
fprintf ppf
423
423
" \n\n \
@@ -478,7 +478,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
478
478
Some record
479
479
| _ -> None )
480
480
in
481
- Cmt_utils . add_possible_action
481
+ Actions . add_possible_action
482
482
{
483
483
loc;
484
484
action = RewriteObjectToRecord ;
@@ -498,7 +498,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
498
498
| _, Some ({Types. desc = Tconstr (p1, _, _)}, _)
499
499
when Path. same p1 Predef. path_promise ->
500
500
(* TODO: This should be aware of if we're in an async context or not? *)
501
- Cmt_utils . add_possible_action
501
+ Actions . add_possible_action
502
502
{loc; action = AddAwait ; description = " Await promise" };
503
503
fprintf ppf " \n\n - Did you mean to await this promise before using it?\n "
504
504
| _, Some ({Types. desc = Tconstr (p1, _, _)}, {Types. desc = Ttuple _})
@@ -507,7 +507,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
507
507
Parser. reprint_expr_at_loc loc ~mapper: (fun exp ->
508
508
match exp.Parsetree. pexp_desc with
509
509
| Pexp_array items ->
510
- Cmt_utils . add_possible_action
510
+ Actions . add_possible_action
511
511
{
512
512
loc;
513
513
action = RewriteArrayToTuple ;
@@ -538,7 +538,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
538
538
in
539
539
540
540
let print_jsx_msg ?(extra = " " ) name target_fn =
541
- Cmt_utils . add_possible_action
541
+ Actions . add_possible_action
542
542
{
543
543
loc;
544
544
action = ApplyFunction {function_name = Longident. parse target_fn};
@@ -589,7 +589,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
589
589
| ( Some (RecordField {optional = true ; field_name; jsx = None }),
590
590
Some ({desc = Tconstr (p, _, _)}, _) )
591
591
when Path. same Predef. path_option p ->
592
- Cmt_utils . add_possible_action
592
+ Actions . add_possible_action
593
593
{
594
594
loc;
595
595
action = ChangeRecordFieldOptional {optional = true };
@@ -632,7 +632,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
632
632
| ( Some (FunctionArgument {optional = true }),
633
633
Some ({desc = Tconstr (p, _, _)}, _) )
634
634
when Path. same Predef. path_option p ->
635
- Cmt_utils . add_possible_action
635
+ Actions . add_possible_action
636
636
{
637
637
loc;
638
638
action = RewriteArgType {to_type = `Optional };
@@ -696,7 +696,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
696
696
in
697
697
match (reprinted, List. mem string_value variant_constructors) with
698
698
| Some reprinted , true ->
699
- Cmt_utils . add_possible_action
699
+ Actions . add_possible_action
700
700
{
701
701
loc;
702
702
action =
@@ -763,7 +763,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
763
763
in
764
764
match reprinted with
765
765
| Some reprinted ->
766
- Cmt_utils . add_possible_action
766
+ Actions . add_possible_action
767
767
{
768
768
loc;
769
769
action =
@@ -829,7 +829,7 @@ let print_extra_type_clash_help ~extract_concrete_typedecl ~env loc ppf
829
829
in
830
830
831
831
if can_show_coercion_message && not is_constant then (
832
- Cmt_utils . add_possible_action
832
+ Actions . add_possible_action
833
833
{
834
834
loc;
835
835
action =
0 commit comments