equal
deleted
inserted
replaced
173 (*associate with each constructor the datatype name and rewrites*) |
173 (*associate with each constructor the datatype name and rewrites*) |
174 val con_pairs = map (fn c => (#1 (dest_Const c), con_info)) constructors |
174 val con_pairs = map (fn c => (#1 (dest_Const c), con_info)) constructors |
175 |
175 |
176 in |
176 in |
177 thy |> Theory.add_path (Sign.base_name big_rec_name) |
177 thy |> Theory.add_path (Sign.base_name big_rec_name) |
178 |> PureThy.add_thmss [(("simps", simps), [Simplifier.simp_add_global])] |
178 |> (#1 o PureThy.add_thmss [(("simps", simps), [Simplifier.simp_add_global])]) |
179 |> DatatypesData.put |
179 |> DatatypesData.put |
180 (Symtab.update |
180 (Symtab.update |
181 ((big_rec_name, dt_info), DatatypesData.get thy)) |
181 ((big_rec_name, dt_info), DatatypesData.get thy)) |
182 |> ConstructorsData.put |
182 |> ConstructorsData.put |
183 (foldr Symtab.update (con_pairs, ConstructorsData.get thy)) |
183 (foldr Symtab.update (con_pairs, ConstructorsData.get thy)) |