equal
deleted
inserted
replaced
217 |
217 |
218 val constdef = Scan.option constdecl -- (P.opt_thm_name ":" -- P.prop); |
218 val constdef = Scan.option constdecl -- (P.opt_thm_name ":" -- P.prop); |
219 |
219 |
220 val definitionP = |
220 val definitionP = |
221 OuterSyntax.command "definition" "constant definition" K.thy_decl |
221 OuterSyntax.command "definition" "constant definition" K.thy_decl |
222 (P.opt_locale_target -- (constdef >> single) |
222 (P.opt_locale_target -- constdef |
223 >> (fn (loc, args) => Toplevel.local_theory loc (#2 o Specification.definition args))); |
223 >> (fn (loc, args) => Toplevel.local_theory loc (#2 o Specification.definition args))); |
224 |
224 |
225 val abbreviationP = |
225 val abbreviationP = |
226 OuterSyntax.command "abbreviation" "constant abbreviation" K.thy_decl |
226 OuterSyntax.command "abbreviation" "constant abbreviation" K.thy_decl |
227 (P.opt_locale_target -- opt_mode -- (Scan.option constdecl -- P.prop >> single) |
227 (P.opt_locale_target -- opt_mode -- (Scan.option constdecl -- P.prop) |
228 >> (fn ((loc, mode), args) => |
228 >> (fn ((loc, mode), args) => |
229 Toplevel.local_theory loc (Specification.abbreviation mode args))); |
229 Toplevel.local_theory loc (Specification.abbreviation mode args))); |
230 |
230 |
231 val notationP = |
231 val notationP = |
232 OuterSyntax.command "notation" "variable/constant syntax" K.thy_decl |
232 OuterSyntax.command "notation" "variable/constant syntax" K.thy_decl |