summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Kerneis2014-05-15 16:17:47 +0100
committerGabriel Kerneis2014-05-15 16:17:47 +0100
commit5a23af520ddd3dedd9d5c4d7aeab5c5d6f2a7a4f (patch)
tree9987d502fe45a0bbf7aa494dbb945a459ebd380b /src
parent63225e783e67562702f484179b3767d5e4382ce1 (diff)
Group definitions
This is only a first step towards sensible spacing. As it turns out, I use too many breaks (hidden in ^/^) instead of separate space [...] for instance.
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml
index 82a877a9..9d435e1d 100644
--- a/src/pretty_print.ml
+++ b/src/pretty_print.ml
@@ -1272,7 +1272,7 @@ let doc_scattered (SD_aux (sdef, _)) = match sdef with
string "member" ^/^ doc_type_union tu
| SD_scattered_end id -> string "end" ^/^ doc_id id
-let doc_def = function
+let doc_def def = group (match def with
| DEF_default df -> doc_default df
| DEF_spec v_spec -> doc_spec v_spec
| DEF_type t_def -> doc_typdef t_def
@@ -1280,6 +1280,7 @@ let doc_def = function
| DEF_val lbind -> doc_let lbind
| DEF_reg_dec dec -> doc_dec dec
| DEF_scattered sdef -> doc_scattered sdef
+ )
let doc_defs (Defs(defs)) =
separate_map hardline doc_def defs