actually fail on prolog errors -- such as swipl startup failure due to missing shared libraries -- assuming it normally produces clean return code 0;
--- a/src/HOL/Tools/Predicate_Compile/code_prolog.ML Fri Apr 12 17:21:51 2013 +0200
+++ b/src/HOL/Tools/Predicate_Compile/code_prolog.ML Fri Apr 12 17:56:51 2013 +0200
@@ -791,7 +791,12 @@
in
if getenv env_var = "" then
(warning (env_var ^ " not set; could not execute code for " ^ string_of_system system); "")
- else fst (Isabelle_System.bash_output (cmd ^ File.shell_path file))
+ else
+ (case Isabelle_System.bash_output (cmd ^ File.shell_path file) of
+ (out, 0) => out
+ | (_, rc) =>
+ error ("Error caused by prolog system " ^ env_var ^
+ ": return code " ^ string_of_int rc))
end