diff --git a/src/analysis/ppx_expand.ml b/src/analysis/ppx_expand.ml index d38d1eab8..0953b252a 100644 --- a/src/analysis/ppx_expand.ml +++ b/src/analysis/ppx_expand.ml @@ -76,13 +76,13 @@ let check_extension ~parsetree ~pos = in !kind -let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_attr : +let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_with_attr : Query_protocol.ppxed_source = let expression = ref [] in let signature = ref [] in let structure = ref [] in let () = - match ppx_kind_attr with + match ppx_kind_with_attr with | Expr original_expr, _ -> ( let expr (self : Ast_iterator.iterator) (new_expr : Parsetree.expression) = @@ -124,7 +124,7 @@ let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_attr : | `Interface si -> iterator.signature iterator si | `Implementation str -> iterator.structure iterator str) in - match (ppx_kind_attr : ppx_kind * Warnings.loc) with + match (ppx_kind_with_attr : ppx_kind * Warnings.loc) with | Expr _, ext_loc -> let exp = List.iter diff --git a/src/frontend/query_commands.ml b/src/frontend/query_commands.ml index 20cf63861..720266ba8 100644 --- a/src/frontend/query_commands.ml +++ b/src/frontend/query_commands.ml @@ -515,12 +515,12 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a = let pos = Mpipeline.get_lexing_pos pipeline pos in let parsetree = Mpipeline.reader_parsetree pipeline in let ppxed_parsetree = Mpipeline.ppx_parsetree pipeline in - let ppx_kind_attr = Ppx_expand.check_extension ~parsetree ~pos in - match ppx_kind_attr with + let ppx_kind_with_attr = Ppx_expand.check_extension ~parsetree ~pos in + match ppx_kind_with_attr with | Some _ -> `Found (Ppx_expand.get_ppxed_source ~ppxed_parsetree ~pos - (Option.get ppx_kind_attr)) + (Option.get ppx_kind_with_attr)) | None -> `No_ppx) | Locate (patho, ml_or_mli, pos) ->