src/Pure/Isar/isar_syn.ML
changeset 21705 0f3ad56548bc
parent 21601 6588b947d631
child 21714 d64cb19c79e2
equal deleted inserted replaced
21704:f4fe6e5a3ee6 21705:0f3ad56548bc
   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