@@ -534,7 +534,7 @@ module FindFunctionsCalled = struct
534534 let super = Tast_mapper. default in
535535 let expr (self : Tast_mapper.mapper ) (e : Typedtree.expression ) =
536536 (match e.exp_desc with
537- | Texp_apply ( { exp_desc = Texp_ident (callee , _ , _ )}, _args ) ->
537+ | Texp_apply { funct = { exp_desc = Texp_ident (callee , _ , _ )}} ->
538538 let functionName = Path. name callee in
539539 callees := ! callees |> StringSet. add functionName
540540 | _ -> () );
@@ -577,7 +577,10 @@ module ExtendFunctionTable = struct
577577 } ->
578578 Some (path, loc)
579579 | 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+ }
581584 when kindOpt <> None ->
582585 let checkArg ((argLabel : Asttypes.arg_label ), _argOpt ) =
583586 match (argLabel, kindOpt) with
@@ -617,7 +620,7 @@ module ExtendFunctionTable = struct
617620 calls a progress function"
618621 functionName printPos id_pos;
619622 })))
620- | Texp_apply ({ exp_desc = Texp_ident (callee, _, _)}, args)
623+ | Texp_apply {funct = { exp_desc = Texp_ident (callee, _, _)}; args}
621624 when callee |> FunctionTable. isInFunctionInTable ~function Table ->
622625 let functionName = Path. name callee in
623626 args
@@ -665,7 +668,8 @@ module CheckExpressionWellFormed = struct
665668 | Texp_ident (path , {loc} , _ ) ->
666669 checkIdent ~path ~loc ;
667670 e
668- | Texp_apply ({exp_desc = Texp_ident (functionPath , _ , _ )} , args ) ->
671+ | Texp_apply {funct = {exp_desc = Texp_ident (functionPath, _, _)}; args}
672+ ->
669673 let functionName = Path. name functionPath in
670674 args
671675 |> List. iter (fun ((argLabel : Asttypes.arg_label ), argOpt ) ->
@@ -739,8 +743,10 @@ module Compile = struct
739743 match expr.exp_desc with
740744 | Texp_ident _ -> Command. nothing
741745 | Texp_apply
742- (({exp_desc = Texp_ident (calleeToRename, l, vd)} as expr), argsToExtend)
743- -> (
746+ {
747+ funct = {exp_desc = Texp_ident (calleeToRename, l, vd)};
748+ args = argsToExtend;
749+ } -> (
744750 let callee, args =
745751 match
746752 Hashtbl. find_opt ctx.innerRecursiveFunctions
@@ -844,7 +850,8 @@ module Compile = struct
844850 and create a function call with the appropriate arguments *)
845851 assert false
846852 | 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
848855 | Texp_let
849856 ( Recursive ,
850857 [{vb_pat = {pat_desc = Tpat_var (id, _); pat_loc}; vb_expr}],
0 commit comments