Commit 6ce61536 by POTTIER Francois

In --infer mode, leave the .ml file around if ocamlc fails.

parent 88656f37
2015/10/05:
In --infer mode, leave the .ml file around (instead of removing it) if
ocamlc fails, so we have a chance to understand what's wrong.
2015/09/21:
Re-established some error messages concerning the mis-use of $i which
had disappeared on 2015/06/29.
......
......@@ -304,10 +304,16 @@ let infer grammar =
in
let output =
Option.project (
IO.with_file mlname (write grammar) (fun () ->
IO.invoke ocamlc_command
))
write grammar ();
match IO.invoke ocamlc_command with
| Some result ->
Sys.remove mlname;
result
| None ->
(* 2015/10/05: intentionally do not remove the [.ml] file if [ocamlc]
fails. (Or if an exception is thrown.) We cannot understand why
[ocaml] complains if we can't see the [.ml] file. *)
exit 1
in
(* Make sense out of ocamlc's output. *)
......
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