src/ZF/Tools/primrec_package.ML
changeset 36960 01594f816e3a
parent 36954 ef698bd61057
child 38514 bd9c4e8281ec
equal deleted inserted replaced
36959:f5417836dbea 36960:01594f816e3a
   192     args) thy;
   192     args) thy;
   193 
   193 
   194 
   194 
   195 (* outer syntax *)
   195 (* outer syntax *)
   196 
   196 
   197 structure P = OuterParse and K = OuterKeyword;
       
   198 
       
   199 val _ =
   197 val _ =
   200   OuterSyntax.command "primrec" "define primitive recursive functions on datatypes" K.thy_decl
   198   Outer_Syntax.command "primrec" "define primitive recursive functions on datatypes"
   201     (Scan.repeat1 (Parse_Spec.opt_thm_name ":" -- P.prop)
   199     Keyword.thy_decl
   202       >> (Toplevel.theory o (#1 oo (add_primrec o map P.triple_swap))));
   200     (Scan.repeat1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)
       
   201       >> (Toplevel.theory o (#1 oo (add_primrec o map Parse.triple_swap))));
   203 
   202 
   204 end;
   203 end;
   205 
   204