summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--parsing/pprintast.ml8
2 files changed, 5 insertions, 4 deletions
diff --git a/Changes b/Changes
index 96efe2bf8..f77f0616d 100644
--- a/Changes
+++ b/Changes
@@ -26,6 +26,7 @@ Compilers:
- improve type-specialization of unapplied primitives
(Frédéric Bour, review by Gabriel Scherer)
- PR#6737: fix Typedtree attributes on (fun x -> body) expressions
+- PR#6679: fix pprintast printing of constraints in type declarations
Runtime system:
- PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml
index 6d1d22c14..c72e09941 100644
--- a/parsing/pprintast.ml
+++ b/parsing/pprintast.ml
@@ -1289,11 +1289,11 @@ class printer ()= object(self:'self)
| Ptype_open -> pp f "%t@;.." intro
in
let constraints f =
- self#list ~first:"@ "
- (fun f (ct1,ct2,_) ->
- pp f "@[<hov2>constraint@ %a@ =@ %a@]"
+ List.iter
+ (fun (ct1,ct2,_) ->
+ pp f "@[<hov2>@ constraint@ %a@ =@ %a@]"
self#core_type ct1 self#core_type ct2)
- f x.ptype_cstrs
+ x.ptype_cstrs
in
pp f "%t%t%t%t" priv manifest repr constraints