src/HOL/Library/code_test.ML
changeset 64957 3faa9b31ff78
parent 64901 18e6f83e4a09
child 65531 24544e3f183d
equal deleted inserted replaced
64956:de7ce0fad5bc 64957:3faa9b31ff78
   163     val debug = Config.get (Proof_Context.init_global thy) overlord
   163     val debug = Config.get (Proof_Context.init_global thy) overlord
   164     val with_dir = if debug then with_overlord_dir else Isabelle_System.with_tmp_dir
   164     val with_dir = if debug then with_overlord_dir else Isabelle_System.with_tmp_dir
   165     fun evaluate f = with_dir "Code_Test" (driver ctxt f) |> parse_result compiler
   165     fun evaluate f = with_dir "Code_Test" (driver ctxt f) |> parse_result compiler
   166     fun evaluator program _ vs_ty deps =
   166     fun evaluator program _ vs_ty deps =
   167       Exn.interruptible_capture evaluate
   167       Exn.interruptible_capture evaluate
   168         (Code_Target.computation_text ctxt target program deps true vs_ty)
   168         (Code_Target.compilation_text ctxt target program deps true vs_ty)
   169     fun postproc f = map (apsnd (Option.map (map f)))
   169     fun postproc f = map (apsnd (Option.map (map f)))
   170   in Exn.release (Code_Thingol.dynamic_value ctxt (Exn.map_res o postproc) evaluator t) end
   170   in Exn.release (Code_Thingol.dynamic_value ctxt (Exn.map_res o postproc) evaluator t) end
   171 
   171 
   172 
   172 
   173 (* term preprocessing *)
   173 (* term preprocessing *)