src/HOL/Tools/primrec.ML
changeset 31902 862ae16a799d
parent 31786 a5ad48ae17e5
child 33037 b22e44496dc2
equal deleted inserted replaced
31901:e280491f36b8 31902:862ae16a799d
   270     val (fixes, spec) = fst (prep_spec raw_fixes raw_spec lthy);
   270     val (fixes, spec) = fst (prep_spec raw_fixes raw_spec lthy);
   271     fun attr_bindings prefix = map (fn ((b, attrs), _) =>
   271     fun attr_bindings prefix = map (fn ((b, attrs), _) =>
   272       (Binding.qualify false prefix b, Code.add_default_eqn_attrib :: attrs)) spec;
   272       (Binding.qualify false prefix b, Code.add_default_eqn_attrib :: attrs)) spec;
   273     fun simp_attr_binding prefix = (Binding.qualify true prefix (Binding.name "simps"),
   273     fun simp_attr_binding prefix = (Binding.qualify true prefix (Binding.name "simps"),
   274       map (Attrib.internal o K)
   274       map (Attrib.internal o K)
   275         [Simplifier.simp_add, Nitpick_Const_Simp_Thms.add, Quickcheck_RecFun_Simp_Thms.add]);
   275         [Simplifier.simp_add, Nitpick_Const_Simps.add, Quickcheck_RecFun_Simps.add]);
   276   in
   276   in
   277     lthy
   277     lthy
   278     |> set_group ? LocalTheory.set_group (serial_string ())
   278     |> set_group ? LocalTheory.set_group (serial_string ())
   279     |> add_primrec_simple fixes (map snd spec)
   279     |> add_primrec_simple fixes (map snd spec)
   280     |-> (fn (prefix, simps) => fold_map (LocalTheory.note Thm.generatedK)
   280     |-> (fn (prefix, simps) => fold_map (LocalTheory.note Thm.generatedK)