equal
deleted
inserted
replaced
263 |
263 |
264 local structure P = OuterParse and K = OuterSyntax.Keyword in |
264 local structure P = OuterParse and K = OuterSyntax.Keyword in |
265 |
265 |
266 val primrec_decl = |
266 val primrec_decl = |
267 Scan.optional (P.$$$ "(" |-- P.name --| P.$$$ ")") "" -- |
267 Scan.optional (P.$$$ "(" |-- P.name --| P.$$$ ")") "" -- |
268 Scan.repeat1 (P.opt_thm_name ":" -- P.term); |
268 Scan.repeat1 (P.opt_thm_name ":" -- P.term --| P.marg_comment); |
269 |
269 |
270 val primrecP = |
270 val primrecP = |
271 OuterSyntax.command "primrec" "define primitive recursive functions on datatypes" K.thy_decl |
271 OuterSyntax.command "primrec" "define primitive recursive functions on datatypes" K.thy_decl |
272 (primrec_decl >> (fn (alt_name, eqns) => |
272 (primrec_decl >> (fn (alt_name, eqns) => |
273 Toplevel.theory (#1 o add_primrec alt_name (map P.triple_swap eqns)))); |
273 Toplevel.theory (#1 o add_primrec alt_name (map P.triple_swap eqns)))); |