src/HOL/Tools/primrec_package.ML
changeset 31296 ba296a58d813
parent 31262 dcbe1f9fe2cd
equal deleted inserted replaced
31295:956592c2c701 31296:ba296a58d813
   266 fun gen_primrec set_group prep_spec raw_fixes raw_spec lthy =
   266 fun gen_primrec set_group prep_spec raw_fixes raw_spec lthy =
   267   let
   267   let
   268     val (fixes, spec) = fst (prep_spec raw_fixes raw_spec lthy);
   268     val (fixes, spec) = fst (prep_spec raw_fixes raw_spec lthy);
   269     fun attr_bindings prefix = map (fn ((b, attrs), _) =>
   269     fun attr_bindings prefix = map (fn ((b, attrs), _) =>
   270       (Binding.qualify false prefix b, Code.add_default_eqn_attrib :: attrs)) spec;
   270       (Binding.qualify false prefix b, Code.add_default_eqn_attrib :: attrs)) spec;
   271     fun simp_attr_binding prefix = (Binding.qualify false prefix (Binding.name "simps"),
   271     fun simp_attr_binding prefix = (Binding.qualify true prefix (Binding.name "simps"),
   272       map (Attrib.internal o K)
   272       map (Attrib.internal o K)
   273         [Simplifier.simp_add, Nitpick_Const_Simp_Thms.add, Quickcheck_RecFun_Simp_Thms.add]);
   273         [Simplifier.simp_add, Nitpick_Const_Simp_Thms.add, Quickcheck_RecFun_Simp_Thms.add]);
   274   in
   274   in
   275     lthy
   275     lthy
   276     |> set_group ? LocalTheory.set_group (serial_string ())
   276     |> set_group ? LocalTheory.set_group (serial_string ())