a prettier printer for Alt-Ergo

parent ea789123
......@@ -190,8 +190,8 @@ let print_type_decl fmt ts = match ts.ts_args with
let print_enum_decl fmt ts csl =
let print_cs fmt (ls,_) = print_ident fmt ls.ls_name in
fprintf fmt "type %a =@ %a@\n@\n" print_ident ts.ts_name
(print_list alt print_cs) csl
fprintf fmt "@[<hov 2>type %a =@ %a@]@\n@\n" print_ident ts.ts_name
(print_list alt2 print_cs) csl
let print_ty_decl info fmt ts =
if Mid.mem ts.ts_name info.info_syn then () else
......
......@@ -85,6 +85,7 @@ let underscore fmt () = fprintf fmt "_"
let semi fmt () = fprintf fmt ";@ "
let space fmt () = fprintf fmt "@ "
let alt fmt () = fprintf fmt "|@ "
let alt2 fmt () = fprintf fmt "@ | "
let equal fmt () = fprintf fmt "@ =@ "
let newline fmt () = fprintf fmt "@\n"
let newline2 fmt () = fprintf fmt "@\n@\n"
......
......@@ -80,6 +80,7 @@ val print_iter22:
val space : formatter -> unit -> unit
val alt : formatter -> unit -> unit
val alt2 : formatter -> unit -> unit
val newline : formatter -> unit -> unit
val newline2 : formatter -> unit -> unit
val dot : formatter -> unit -> unit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment