Commit 12f21150 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

use zero separator only when there are several goals

parent 304617d7
...@@ -275,13 +275,14 @@ let do_file env drv src_filename_printer dest_filename_printer file = ...@@ -275,13 +275,14 @@ let do_file env drv src_filename_printer dest_filename_printer file =
match !output_file with match !output_file with
| None -> () | None -> ()
| Some file (* we are in the output file mode *) -> | Some file (* we are in the output file mode *) ->
List.iter let fmt = if file = "-" then std_formatter
(fun (th,task,drv) -> else formatter_of_out_channel (open_out file)
let fmt = if file = "-" in
then std_formatter let print_task fmt (th,task,drv) =
else formatter_of_out_channel (open_out file) in fprintf fmt "@[%a@]" (Driver.print_task drv) task
fprintf fmt "%a\000@?" (Driver.print_task drv) task) in
goals let print_zero fmt () = fprintf fmt "\000@?" in
fprintf fmt "%a@?" (Pp.print_list print_zero print_task) goals
end; end;
if !call then if !call then
(* we are in the call mode *) (* we are in the call mode *)
......
...@@ -153,7 +153,7 @@ let print_type_decl drv fmt = function ...@@ -153,7 +153,7 @@ let print_type_decl drv fmt = function
| Driver.Tag _ -> | Driver.Tag _ ->
match ts.ts_args with match ts.ts_args with
| [] -> fprintf fmt "type %a" print_ident ts.ts_name; true | [] -> fprintf fmt "type %a" print_ident ts.ts_name; true
| _ -> fprintf fmt "type (%a)%a" | _ -> fprintf fmt "type (%a) %a"
(print_list comma print_tvsymbols) ts.ts_args (print_list comma print_tvsymbols) ts.ts_args
print_ident ts.ts_name; true print_ident ts.ts_name; true
end end
......
Supports Markdown
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