From 4cf525e2ee0b758ebeacf202746434a4347738fc Mon Sep 17 00:00:00 2001 From: mattiasdrp Date: Fri, 6 Dec 2024 16:39:41 +0100 Subject: [PATCH 1/2] Add missing functions to pprintast (binding, longindent, payload) Signed-off-by: mattiasdrp --- astlib/pprintast.ml | 2 ++ astlib/pprintast.mli | 3 +++ 2 files changed, 5 insertions(+) diff --git a/astlib/pprintast.ml b/astlib/pprintast.ml index 51316cca8..d27f4ddb8 100644 --- a/astlib/pprintast.ml +++ b/astlib/pprintast.ml @@ -1756,3 +1756,5 @@ let module_type = module_type reset_ctxt let signature_item = signature_item reset_ctxt let structure_item = structure_item reset_ctxt let type_declaration = type_declaration reset_ctxt +let binding = binding reset_ctxt +let payload = payload reset_ctxt diff --git a/astlib/pprintast.mli b/astlib/pprintast.mli index 65e221734..1bed8b910 100644 --- a/astlib/pprintast.mli +++ b/astlib/pprintast.mli @@ -26,6 +26,9 @@ val pattern : Format.formatter -> Parsetree.pattern -> unit val signature : Format.formatter -> Parsetree.signature -> unit val structure : Format.formatter -> Parsetree.structure -> unit val string_of_structure : Parsetree.structure -> string +val binding : Format.formatter -> Parsetree.value_binding -> unit +val longident : Format.formatter -> Longident.t -> unit +val payload : Format.formatter -> Parsetree.payload -> unit (* Added in the ppxlib copy *) val class_expr : Format.formatter -> Parsetree.class_expr -> unit From 0089d0f190c4114b145a95ebe65e1900757fe704 Mon Sep 17 00:00:00 2001 From: Nathan Rebours Date: Tue, 10 Dec 2024 10:28:36 +0100 Subject: [PATCH 2/2] Add changelog entry for new Pprintast functions Signed-off-by: Nathan Rebours --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 85bc97894..f1c72af5e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,8 @@ details. ### Other changes +- Add `Pprintast.binding`, `longident` and `payload` (#542, @mattiasdrp) + - Fix `deriving_inline` round-trip check so that it works with 5.01 <-> 5.02 migrations (#519, @NathanReb)