diff options
| author | Gabriel Kerneis | 2014-05-20 18:39:46 +0100 |
|---|---|---|
| committer | Gabriel Kerneis | 2014-05-20 18:40:00 +0100 |
| commit | 58f119fc232c362b4623253f5b74d5d8a6fa4a20 (patch) | |
| tree | 815f9d1a3bf2a3c9887d14fe2acc05af7dd43c35 /src/pretty_print.ml | |
| parent | a7154183a2487cdf96b981e1daef192ce878fbc8 (diff) | |
Fix semicolon in scattered unions
Diffstat (limited to 'src/pretty_print.ml')
| -rw-r--r-- | src/pretty_print.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml index 04d18f85..c41df269 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -900,8 +900,8 @@ let rec doc_range (BF_aux(r,_)) = match r with | BF_concat(ir1,ir2) -> (doc_range ir1) ^^ comma ^^ (doc_range ir2) let doc_type_union (Tu_aux(typ_u,_)) = match typ_u with - | Tu_ty_id(typ,id) -> concat [doc_typ typ; space; doc_id id; semi] - | Tu_id id -> doc_id id ^^ semi + | Tu_ty_id(typ,id) -> separate space [doc_typ typ; doc_id id] + | Tu_id id -> doc_id id let doc_typdef (TD_aux(td,_)) = match td with | TD_abbrev(id,nm,typschm) -> @@ -913,7 +913,7 @@ let doc_typdef (TD_aux(td,_)) = match td with (concat [string "typedef"; space; doc_id id; doc_namescm nm]) (string "const struct" ^^ space ^^ doc_typquant typq (braces fs_doc)) | TD_variant(id,nm,typq,ar,_) -> - let ar_doc = group (separate_map (break 1) doc_type_union ar) in + let ar_doc = group (separate_map (semi ^^ break 1) doc_type_union ar) in doc_op equals (concat [string "typedef"; space; doc_id id; doc_namescm nm]) (string "const union" ^^ space ^^ doc_typquant typq (braces ar_doc)) |
