change or-pattern printing to use spaces instead of cuts

(A p1 | B p2 | C p3) instead of (A p1|B p2|C p3)
master
Gabriel Scherer 2020-11-03 16:29:06 +01:00
parent bdcd9baa03
commit 89d6a2094b
3 changed files with 3 additions and 3 deletions

View File

@ -416,7 +416,7 @@ and pattern_or ctxt f x =
| [] -> assert false | [] -> assert false
| [x] -> pattern1 ctxt f x | [x] -> pattern1 ctxt f x
| orpats -> | orpats ->
pp f "@[<hov0>%a@]" (list ~sep:"@,|" (pattern1 ctxt)) orpats pp f "@[<hov0>%a@]" (list ~sep:"@ | " (pattern1 ctxt)) orpats
and pattern1 ctxt (f:Format.formatter) (x:pattern) : unit = and pattern1 ctxt (f:Format.formatter) (x:pattern) : unit =
let rec pattern_list_helper f = function let rec pattern_list_helper f = function