src/Tools/Code/code_target.ML
changeset 41939 eb9fb5a4d27f
parent 41364 aaf5968c67ef
child 41940 a3b68a7a0e15
equal deleted inserted replaced
41938:645cca858c69 41939:eb9fb5a4d27f
   391   let
   391   let
   392     val module_name = "Code";
   392     val module_name = "Code";
   393     val { env_var, make_destination, make_command } =
   393     val { env_var, make_destination, make_command } =
   394       (#check o the_fundamental thy) target;
   394       (#check o the_fundamental thy) target;
   395     val env_param = getenv env_var;
   395     val env_param = getenv env_var;
   396     fun ext_check env_param p =
   396     fun ext_check p =
   397       let 
   397       let 
   398         val destination = make_destination p;
   398         val destination = make_destination p;
   399         val _ = export (SOME destination) (invoke_serializer thy target (SOME 80)
   399         val _ = export (SOME destination) (invoke_serializer thy target (SOME 80)
   400           module_name args naming program names_cs);
   400           module_name args naming program names_cs);
   401         val cmd = make_command env_param module_name;
   401         val cmd = make_command env_param module_name;
   405       end;
   405       end;
   406   in if env_param = ""
   406   in if env_param = ""
   407     then if strict
   407     then if strict
   408       then error (env_var ^ " not set; cannot check code for " ^ target)
   408       then error (env_var ^ " not set; cannot check code for " ^ target)
   409       else warning (env_var ^ " not set; skipped checking code for " ^ target)
   409       else warning (env_var ^ " not set; skipped checking code for " ^ target)
   410     else Isabelle_System.with_tmp_dir "Code_Test" (ext_check env_param)
   410     else Isabelle_System.with_tmp_dir "Code_Test" ext_check
   411   end;
   411   end;
   412 
   412 
   413 fun evaluation mounted_serializer prepared_program consts ((vs, ty), t) =
   413 fun evaluation mounted_serializer prepared_program consts ((vs, ty), t) =
   414   let
   414   let
   415     val _ = if Code_Thingol.contains_dict_var t then
   415     val _ = if Code_Thingol.contains_dict_var t then