let hou =
if tm.Unix.tm_hour > 0 then (string_of_int tm.Unix.tm_hour ^ "h ") else ""
in
- let proof_status =
+ let proof_status,moo_content_rev =
match !status with
- | Some s -> !s.proof_status
+ | Some s -> !s.proof_status, !s.moo_content_rev
| None -> assert false
in
if proof_status <> MatitaTypes.No_proof then
end
else
begin
+ let os = open_out (MatitaMisc.obj_file_of_script fname) in
+ let output s = output_string os s in
+ output "(* GENERATED FILE: DO NOT EDIT! *)\n\n";
+ List.iter output (List.rev moo_content_rev);
+ close_out os;
MatitaLog.message
(sprintf "execution of %s completed in %s." fname (hou^min^sec));
- close_out (open_out (MatitaMisc.obj_file_of_script fname));
exit 0
end
with
- | Sys.Break -> MatitaLog.error "user break!"; exit ~-1
+ | Sys.Break ->
+ MatitaLog.error "user break!";
+ if mode = `COMPILER then
+ exit ~-1
+ else
+ pp_ocaml_mode ()
| MatitaEngine.Drop ->
if mode = `COMPILER then
exit 1
if mode = `COMPILER then
exit 1
else
- go ()
+ pp_ocaml_mode ()