src/HOL/Tools/recdef_package.ML
changeset 12448 473cb9f9e237
parent 12371 80ca9058db95
child 12694 9950c1ce9d24
equal deleted inserted replaced
12447:e752c9aecdec 12448:473cb9f9e237
   240     val eq_atts = map (map (prep_att thy)) raw_eq_atts;
   240     val eq_atts = map (map (prep_att thy)) raw_eq_atts;
   241 
   241 
   242     val (cs, ss, congs, wfs) = prep_hints thy hints;
   242     val (cs, ss, congs, wfs) = prep_hints thy hints;
   243     val (thy, {rules = rules_idx, induct, tcs}) = tfl_fn strict thy cs ss congs wfs name R eqs;
   243     val (thy, {rules = rules_idx, induct, tcs}) = tfl_fn strict thy cs ss congs wfs name R eqs;
   244     val rules = map (map #1) (Library.partition_eq Library.eq_snd rules_idx);
   244     val rules = map (map #1) (Library.partition_eq Library.eq_snd rules_idx);
   245     val simp_att = if null tcs then [Simplifier.simp_add_global] else [];
   245     val simp_att = if null tcs then
       
   246       [Simplifier.simp_add_global, RecfunCodegen.add] else [];
   246 
   247 
   247     val case_numbers = map Library.string_of_int (1 upto Thm.nprems_of induct);
   248     val case_numbers = map Library.string_of_int (1 upto Thm.nprems_of induct);
   248     val (thy, (simps' :: rules', [induct'])) =
   249     val (thy, (simps' :: rules', [induct'])) =
   249       thy
   250       thy
   250       |> Theory.add_path bname
   251       |> Theory.add_path bname