equal
deleted
inserted
replaced
14 |
14 |
15 structure P = OuterParse and K = OuterKeyword; |
15 structure P = OuterParse and K = OuterKeyword; |
16 val opt_bang = Scan.optional (P.$$$ "!" >> K true) false; |
16 val opt_bang = Scan.optional (P.$$$ "!" >> K true) false; |
17 |
17 |
18 val locale_val = |
18 val locale_val = |
19 Expression.parse_expression -- |
19 SpecParse.locale_expression -- |
20 Scan.optional (P.$$$ "+" |-- P.!!! (Scan.repeat1 SpecParse.context_element)) [] || |
20 Scan.optional (P.$$$ "+" |-- P.!!! (Scan.repeat1 SpecParse.context_element)) [] || |
21 Scan.repeat1 SpecParse.context_element >> pair ([], []); |
21 Scan.repeat1 SpecParse.context_element >> pair ([], []); |
22 |
22 |
23 in |
23 in |
24 |
24 |
40 NewLocale.print_locale (Toplevel.theory_of state) show_facts name)))); |
40 NewLocale.print_locale (Toplevel.theory_of state) show_facts name)))); |
41 |
41 |
42 val _ = |
42 val _ = |
43 OuterSyntax.command "interpretation" |
43 OuterSyntax.command "interpretation" |
44 "prove interpretation of locale expression in theory" K.thy_goal |
44 "prove interpretation of locale expression in theory" K.thy_goal |
45 (P.!!! Expression.parse_expression |
45 (P.!!! SpecParse.locale_expression |
46 >> (fn expr => Toplevel.print o |
46 >> (fn expr => Toplevel.print o |
47 Toplevel.theory_to_proof (Expression.interpretation_cmd expr))); |
47 Toplevel.theory_to_proof (Expression.interpretation_cmd expr))); |
48 |
48 |
49 val _ = |
49 val _ = |
50 OuterSyntax.command "interpret" |
50 OuterSyntax.command "interpret" |
51 "prove interpretation of locale expression in proof context" |
51 "prove interpretation of locale expression in proof context" |
52 (K.tag_proof K.prf_goal) |
52 (K.tag_proof K.prf_goal) |
53 (P.!!! Expression.parse_expression |
53 (P.!!! SpecParse.locale_expression |
54 >> (fn expr => Toplevel.print o |
54 >> (fn expr => Toplevel.print o |
55 Toplevel.proof' (fn int => Expression.interpret_cmd expr int))); |
55 Toplevel.proof' (fn int => Expression.interpret_cmd expr int))); |
56 |
56 |
57 end |
57 end |
58 |
58 |