diff options
| author | Hugo Herbelin | 2016-04-13 07:56:44 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2016-06-16 17:43:28 +0200 |
| commit | 456ced60ef1fc71f8f914e07b80831fa6dd46ea5 (patch) | |
| tree | 682d4dc2ef0715ce8b5232f8eb5e347b1a1d0603 /printing/ppconstr.ml | |
| parent | a43562b661115bebb9353db6ec3b2f6f8dd603ef (diff) | |
Fixing printing of Instance.
Diffstat (limited to 'printing/ppconstr.ml')
| -rw-r--r-- | printing/ppconstr.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index 1866ca5042..eead3a6840 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -493,6 +493,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 () @@ -595,10 +600,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)]) -> @@ -731,6 +733,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 |
