From 0b77843e3bf000d1fa106cab92d688ae6696530e Mon Sep 17 00:00:00 2001 From: Nathan Rebours Date: Wed, 4 Sep 2024 12:21:00 +0200 Subject: [PATCH] Expose Utils in Ppxlib_private Signed-off-by: Nathan Rebours --- bin/pp_ast.ml | 6 +++--- src/ppxlib.ml | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/pp_ast.ml b/bin/pp_ast.ml index 9df9187a..f7f414d7 100644 --- a/bin/pp_ast.ml +++ b/bin/pp_ast.ml @@ -4,8 +4,8 @@ module Kind = struct type t = Signature | Structure | Expression | Pattern | Core_type let to_utils_kind = function - | Structure -> Ppxlib__Utils.Kind.Impl - | Signature -> Ppxlib__Utils.Kind.Intf + | Structure -> Ppxlib_private.Utils.Kind.Impl + | Signature -> Ppxlib_private.Utils.Kind.Intf | _ -> assert false end @@ -40,7 +40,7 @@ let load_input ~kind ~input_name fn = match Driver.load_input ~kind ~input_name ~relocate:false fn with | Error (loc_err, _ver) -> Location.Error.raise loc_err | Ok (_ast_input_name, _version, ast) -> ( - match (ast : Ppxlib__Utils.Intf_or_impl.t) with + match (ast : Ppxlib_private.Utils.Intf_or_impl.t) with | Impl str -> Ast.Str str | Intf sig_ -> Ast.Sig sig_)) | Expression | Pattern | Core_type -> parse_node ~kind ~input_name fn diff --git a/src/ppxlib.ml b/src/ppxlib.ml index f786e718..c7a9193b 100644 --- a/src/ppxlib.ml +++ b/src/ppxlib.ml @@ -104,8 +104,10 @@ end (**/**) -(* For tests and Ppx_core compatibility layer *) +(* For tests, Ppx_core compatibility layer and use by ppxlib-pp-ast + and other internal tools. *) module Ppxlib_private = struct module Common = Common module Name = Name + module Utils = Utils end