src/ZF/Tools/primrec_package.ML
changeset 46961 5c6955f487e5
parent 44241 7943b69f0188
child 47815 43f677b3ae91
equal deleted inserted replaced
46960:f19e5837ad69 46961:5c6955f487e5
   194 
   194 
   195 
   195 
   196 (* outer syntax *)
   196 (* outer syntax *)
   197 
   197 
   198 val _ =
   198 val _ =
   199   Outer_Syntax.command "primrec" "define primitive recursive functions on datatypes"
   199   Outer_Syntax.command @{command_spec "primrec"} "define primitive recursive functions on datatypes"
   200     Keyword.thy_decl
       
   201     (Scan.repeat1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)
   200     (Scan.repeat1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)
   202       >> (Toplevel.theory o (#1 oo (add_primrec o map Parse.triple_swap))));
   201       >> (Toplevel.theory o (#1 oo (add_primrec o map Parse.triple_swap))));
   203 
   202 
   204 end;
   203 end;
   205 
   204