src/Pure/Isar/isar_syn.ML
changeset 36174 feb6f24de47e
parent 36172 fc407d02af4a
child 36176 3fe7e97ccca8
equal deleted inserted replaced
36173:99212848c933 36174:feb6f24de47e
   111   OuterSyntax.local_theory "type_abbrev" "type abbreviation (input only)" K.thy_decl
   111   OuterSyntax.local_theory "type_abbrev" "type abbreviation (input only)" K.thy_decl
   112     (P.type_args -- P.binding -- P.opt_mixfix -- (P.$$$ "=" |-- P.!!! P.typ)
   112     (P.type_args -- P.binding -- P.opt_mixfix -- (P.$$$ "=" |-- P.!!! P.typ)
   113       >> (fn (((args, a), mx), rhs) => Typedecl.abbrev_cmd (a, args, mx) rhs #> snd));
   113       >> (fn (((args, a), mx), rhs) => Typedecl.abbrev_cmd (a, args, mx) rhs #> snd));
   114 
   114 
   115 val _ =
   115 val _ =
   116   OuterSyntax.command "types" "declare type abbreviations" K.thy_decl
   116   OuterSyntax.local_theory "types" "declare type abbreviations" K.thy_decl
   117     (Scan.repeat1
   117     (Scan.repeat1
   118       (P.type_args -- P.binding -- (P.$$$ "=" |-- P.!!! (P.typ -- P.opt_mixfix')))
   118       (P.type_args -- P.binding -- (P.$$$ "=" |-- P.!!! (P.typ -- P.opt_mixfix')))
   119       >> (Toplevel.theory o Sign.add_tyabbrs o map (fn ((args, a), (T, mx)) => (a, args, T, mx))));
   119       >> (IsarCmd.add_tyabbrs o map (fn ((args, a), (T, mx)) => (a, args, T, mx))));
   120 
   120 
   121 val _ =
   121 val _ =
   122   OuterSyntax.command "nonterminals" "declare types treated as grammar nonterminal symbols"
   122   OuterSyntax.command "nonterminals" "declare types treated as grammar nonterminal symbols"
   123     K.thy_decl (Scan.repeat1 P.binding >> (Toplevel.theory o Sign.add_nonterminals));
   123     K.thy_decl (Scan.repeat1 P.binding >> (Toplevel.theory o Sign.add_nonterminals));
   124 
   124