let hvbox = box Ast.HV
let hovbox = box Ast.HOV
let break = Ast.Layout Ast.Break
+let space = Ast.Literal (`Symbol " ")
let builtin_symbol s = Ast.Literal (`Symbol s)
let keyword k = add_keyword_attrs (Ast.Literal (`Keyword k))
match outty_opt with
| None -> []
| Some outty ->
- [ keyword "return"; break; remove_level_info (k outty)]
+ [ space; keyword "return"; space; break; remove_level_info (k outty)]
in
let indty_box =
match indty_opt with
| None -> []
- | Some (indty, href) -> [ keyword "in"; break; ident_w_href href indty ]
+ | Some (indty, href) -> [ space; keyword "in"; space; break; ident_w_href href indty ]
in
let match_box =
hvbox false false [
hvbox false true [
- hvbox false true [ keyword "match"; break; top_pos (k what) ];
+ hvbox false true [keyword "match"; space; break; top_pos (k what)];
break;
hvbox false true indty_box;
break;
hvbox false true outty_box
];
break;
- keyword "with"
+ space;
+ keyword "with";
+ space
]
in
let mk_case_pattern (head, href, vars) =
let (params, name, ty, body) = fst_fun in
hvbox false true ([
keyword "let";
+ space;
keyword rec_op;
+ space;
name] @
params @
(match ty with None -> [] | Some ty -> [builtin_symbol ":"; ty]) @