diff options
| author | Hugo Herbelin | 2019-12-03 00:50:29 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2019-12-03 00:53:24 +0100 |
| commit | be04b1536fe250e8f761701f9e99650bede608d6 (patch) | |
| tree | fd6db3a51abbb8a4160b0b0b0782e45ae5db48fc /printing/ppconstr.ml | |
| parent | 79bbca336a226693770e37db3a8f05b2819acb5c (diff) | |
Improving printing of or-patterns.
Diffstat (limited to 'printing/ppconstr.ml')
| -rw-r--r-- | printing/ppconstr.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index 2da163b8ee..b55a41471a 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -275,7 +275,7 @@ let tag_var = tag Tag.variable pr_reference r, latom | CPatOr pl -> - let pp = pr_patt mt (lpator,Any) in + let pp p = hov 0 (pr_patt mt (lpator,Any) p) in surround (hov 0 (prlist_with_sep pr_spcbar pp pl)), lpator | CPatNotation ((_,"( _ )"),([p],[]),[]) -> @@ -304,7 +304,8 @@ let tag_var = tag Tag.variable spc() ++ hov 4 (pr_with_comments ?loc (str "| " ++ - hov 0 (prlist_with_sep pr_spcbar (prlist_with_sep sep_v (pr_patt ltop)) pl + hov 0 (prlist_with_sep pr_spcbar + (fun p -> hov 0 (prlist_with_sep sep_v (pr_patt ltop) p)) pl ++ str " =>") ++ pr_sep_com spc (pr ltop) rhs)) |
