26 val static_value_exn: 'a cookie -> { ctxt: Proof.context, target: string option, |
26 val static_value_exn: 'a cookie -> { ctxt: Proof.context, target: string option, |
27 lift_postproc: (term -> term) -> 'a -> 'a, consts: string list } |
27 lift_postproc: (term -> term) -> 'a -> 'a, consts: string list } |
28 -> Proof.context -> term -> 'a Exn.result |
28 -> Proof.context -> term -> 'a Exn.result |
29 val dynamic_holds_conv: Proof.context -> conv |
29 val dynamic_holds_conv: Proof.context -> conv |
30 val static_holds_conv: { ctxt: Proof.context, consts: string list } -> Proof.context -> conv |
30 val static_holds_conv: { ctxt: Proof.context, consts: string list } -> Proof.context -> conv |
|
31 val static_value': (Proof.context -> term -> 'a) cookie |
|
32 -> { ctxt: Proof.context, lift_postproc: (term -> term) -> 'a -> 'a, |
|
33 consts: (string * typ) list, T: typ } |
|
34 -> Proof.context -> term -> 'a option (*EXPERIMENTAL!*) |
|
35 val static_value_strict': (Proof.context -> term -> 'a) cookie |
|
36 -> { ctxt: Proof.context, lift_postproc: (term -> term) -> 'a -> 'a, |
|
37 consts: (string * typ) list, T: typ } |
|
38 -> Proof.context -> term -> 'a (*EXPERIMENTAL!*) |
31 val static_value_exn': (Proof.context -> term -> 'a) cookie |
39 val static_value_exn': (Proof.context -> term -> 'a) cookie |
32 -> { ctxt: Proof.context, lift_postproc: (term -> term) -> 'a -> 'a, |
40 -> { ctxt: Proof.context, lift_postproc: (term -> term) -> 'a -> 'a, |
33 consts: (string * typ) list, T: typ } |
41 consts: (string * typ) list, T: typ } |
34 -> Proof.context -> term -> 'a Exn.result (*EXPERIMENTAL!*) |
42 -> Proof.context -> term -> 'a Exn.result (*EXPERIMENTAL!*) |
35 val code_reflect: (string * string list option) list -> string list -> string |
43 val code_reflect: (string * string list option) list -> string list -> string |
308 lift_postproc = Exn.map_result o lift_postproc, consts = cs_code } |
316 lift_postproc = Exn.map_result o lift_postproc, consts = cs_code } |
309 (compile_evaluator cookie ctxt cs_code cTs T); |
317 (compile_evaluator cookie ctxt cs_code cTs T); |
310 in fn ctxt' => |
318 in fn ctxt' => |
311 evaluator ctxt' o reject_vars ctxt' o Syntax.check_term ctxt' o Type.constraint T |
319 evaluator ctxt' o reject_vars ctxt' o Syntax.check_term ctxt' o Type.constraint T |
312 end; |
320 end; |
|
321 |
|
322 fun static_value_strict' cookie = Exn.release ooo static_value_exn' cookie; |
|
323 |
|
324 fun static_value' cookie = partiality_as_none ooo static_value_exn' cookie; |
313 |
325 |
314 |
326 |
315 (** code antiquotation **) |
327 (** code antiquotation **) |
316 |
328 |
317 local |
329 local |