another attempt for a uniform abort on code generation errors
authorhaftmann
Wed, 13 Feb 2013 13:38:52 +0100
changeset 51091 c007c6bf4a35
parent 51090 bee2678a3b61
child 51092 5e6398b48030
another attempt for a uniform abort on code generation errors
src/Tools/Code/code_ml.ML
src/Tools/Code/lib/Tools/codegen
--- a/src/Tools/Code/code_ml.ML	Wed Feb 13 13:38:52 2013 +0100
+++ b/src/Tools/Code/code_ml.ML	Wed Feb 13 13:38:52 2013 +0100
@@ -833,7 +833,7 @@
       check = { env_var = "ISABELLE_PROCESS",
         make_destination = fn p => Path.append p (Path.explode "ROOT.ML"),
         make_command = fn _ =>
-          "\"$ISABELLE_PROCESS\" -r -q -e 'datatype ref = datatype Unsynchronized.ref; use \"ROOT.ML\" handle _ => exit 0' Pure" } })
+          "\"$ISABELLE_PROCESS\" -r -q -e 'datatype ref = datatype Unsynchronized.ref; use \"ROOT.ML\" handle _ => exit 1' Pure" } })
   #> Code_Target.add_target
     (target_OCaml, { serializer = serializer_ocaml, literals = literals_ocaml,
       check = { env_var = "ISABELLE_OCAML",
--- a/src/Tools/Code/lib/Tools/codegen	Wed Feb 13 13:38:52 2013 +0100
+++ b/src/Tools/Code/lib/Tools/codegen	Wed Feb 13 13:38:52 2013 +0100
@@ -52,7 +52,7 @@
 
 FORMAL_CMD="Toplevel.program (fn () => (use_thy thyname; ML_Context.eval_text_in \
   (SOME (Proof_Context.init_global (Thy_Info.get_theory thyname))) false Position.none ml_cmd)) \
-  handle _ => Posix.Process.exit 0w1;"
+  handle _ => exit 1;"
 
 ACTUAL_CMD="val thyname = \"$THYNAME\"; \
   val _ = quick_and_dirty := $QUICK_AND_DIRTY; \