Skip to content

Commit

Permalink
Expose Utils in Ppxlib_private
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Rebours <[email protected]>
  • Loading branch information
NathanReb committed Sep 4, 2024
1 parent 82d9afc commit 0b77843
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bin/pp_ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/ppxlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b77843

Please sign in to comment.