equal
deleted
inserted
replaced
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 *) |