@@ -534,7 +534,7 @@ module FindFunctionsCalled = struct
534
534
let super = Tast_mapper. default in
535
535
let expr (self : Tast_mapper.mapper ) (e : Typedtree.expression ) =
536
536
(match e.exp_desc with
537
- | Texp_apply ( { exp_desc = Texp_ident (callee , _ , _ )}, _args ) ->
537
+ | Texp_apply { funct = { exp_desc = Texp_ident (callee , _ , _ )}} ->
538
538
let functionName = Path. name callee in
539
539
callees := ! callees |> StringSet. add functionName
540
540
| _ -> () );
@@ -577,7 +577,10 @@ module ExtendFunctionTable = struct
577
577
} ->
578
578
Some (path, loc)
579
579
| Some
580
- {exp_desc = Texp_apply ({exp_desc = Texp_ident (path, {loc}, _)}, args)}
580
+ {
581
+ exp_desc =
582
+ Texp_apply {funct = {exp_desc = Texp_ident (path, {loc}, _)}; args};
583
+ }
581
584
when kindOpt <> None ->
582
585
let checkArg ((argLabel : Asttypes.arg_label ), _argOpt ) =
583
586
match (argLabel, kindOpt) with
@@ -617,7 +620,7 @@ module ExtendFunctionTable = struct
617
620
calls a progress function"
618
621
functionName printPos id_pos;
619
622
})))
620
- | Texp_apply ({ exp_desc = Texp_ident (callee, _, _)}, args)
623
+ | Texp_apply {funct = { exp_desc = Texp_ident (callee, _, _)}; args}
621
624
when callee |> FunctionTable. isInFunctionInTable ~function Table ->
622
625
let functionName = Path. name callee in
623
626
args
@@ -665,7 +668,8 @@ module CheckExpressionWellFormed = struct
665
668
| Texp_ident (path , {loc} , _ ) ->
666
669
checkIdent ~path ~loc ;
667
670
e
668
- | Texp_apply ({exp_desc = Texp_ident (functionPath , _ , _ )} , args ) ->
671
+ | Texp_apply {funct = {exp_desc = Texp_ident (functionPath, _, _)}; args}
672
+ ->
669
673
let functionName = Path. name functionPath in
670
674
args
671
675
|> List. iter (fun ((argLabel : Asttypes.arg_label ), argOpt ) ->
@@ -739,8 +743,10 @@ module Compile = struct
739
743
match expr.exp_desc with
740
744
| Texp_ident _ -> Command. nothing
741
745
| Texp_apply
742
- (({exp_desc = Texp_ident (calleeToRename, l, vd)} as expr), argsToExtend)
743
- -> (
746
+ {
747
+ funct = {exp_desc = Texp_ident (calleeToRename, l, vd)} as expr;
748
+ args = argsToExtend;
749
+ } -> (
744
750
let callee, args =
745
751
match
746
752
Hashtbl. find_opt ctx.innerRecursiveFunctions
@@ -844,7 +850,8 @@ module Compile = struct
844
850
and create a function call with the appropriate arguments *)
845
851
assert false
846
852
| None -> expr |> expression ~ctx |> evalArgs ~args ~ctx )
847
- | Texp_apply (expr , args ) -> expr |> expression ~ctx |> evalArgs ~args ~ctx
853
+ | Texp_apply {funct = expr ; args} ->
854
+ expr |> expression ~ctx |> evalArgs ~args ~ctx
848
855
| Texp_let
849
856
( Recursive ,
850
857
[{vb_pat = {pat_desc = Tpat_var (id, _); pat_loc}; vb_expr}],
0 commit comments