73613
|
1 |
(* Title: Pure/ML/ml_antiquotations2.ML
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Miscellaneous ML antiquotations: part 2.
|
|
5 |
*)
|
|
6 |
|
|
7 |
structure ML_Antiquotations2: sig end =
|
|
8 |
struct
|
|
9 |
|
|
10 |
val _ = Theory.setup
|
|
11 |
(ML_Antiquotation.inline_embedded \<^binding>\<open>method\<close>
|
|
12 |
(Args.context -- Scan.lift Args.embedded_position >> (fn (ctxt, (name, pos)) =>
|
|
13 |
ML_Syntax.print_string (Method.check_name ctxt (name, pos)))) #>
|
|
14 |
|
|
15 |
ML_Antiquotation.inline_embedded \<^binding>\<open>locale\<close>
|
|
16 |
(Args.context -- Scan.lift Args.embedded_position >> (fn (ctxt, (name, pos)) =>
|
|
17 |
Locale.check (Proof_Context.theory_of ctxt) (name, pos)
|
|
18 |
|> ML_Syntax.print_string)));
|
|
19 |
|
|
20 |
end;
|