aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/ppconstr.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-04-13 07:56:44 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-04-27 21:55:47 +0200
commitcbb917476e3920641352c108ec9ffaf6d1682217 (patch)
tree7267c5d833c8caa62597165593a379c1503b4589 /printing/ppconstr.ml
parentd91a1aa62edad53b41fbb7cb6f6a841f03ebcde4 (diff)
Fixing printing of Instance.
Diffstat (limited to 'printing/ppconstr.ml')
-rw-r--r--printing/ppconstr.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml
index 56fbdd5ff..ba70145b6 100644
--- a/printing/ppconstr.ml
+++ b/printing/ppconstr.ml
@@ -498,6 +498,11 @@ end) = struct
pr (lapp,L) a ++
prlist (fun a -> spc () ++ pr_expl_args pr a) l)
+ let pr_record_body_gen pr l =
+ spc () ++
+ prlist_with_sep pr_semicolon
+ (fun (id, c) -> h 1 (pr_reference id ++ spc () ++ str":=" ++ pr ltop c)) l
+
let pr_forall () = keyword "forall" ++ spc ()
let pr_fun () = keyword "fun" ++ spc ()
@@ -600,10 +605,7 @@ end) = struct
return (pr_app (pr mt) a l, lapp)
| CRecord (_,l) ->
return (
- hv 0 (str"{|" ++ spc () ++
- prlist_with_sep pr_semicolon
- (fun (id, c) -> h 1 (pr_reference id ++ spc () ++ str":=" ++ pr spc ltop c)) l
- ++ str" |}"),
+ hv 0 (str"{|" ++ pr_record_body_gen (pr spc) l ++ str" |}"),
latom
)
| CCases (_,LetPatternStyle,rtntypopt,[c,as_clause,in_clause],[(_,[(loc,[p])],b)]) ->
@@ -736,6 +738,8 @@ end) = struct
let pr_cases_pattern_expr = pr_patt ltop
+ let pr_record_body = pr_record_body_gen pr
+
let pr_binders = pr_undelimited_binders spc (pr ltop)
end