equal
deleted
inserted
replaced
216 in |
216 in |
217 SizeData.map (fold (Symtab.update_new o apsnd (rpair size_thms)) |
217 SizeData.map (fold (Symtab.update_new o apsnd (rpair size_thms)) |
218 (new_type_names ~~ size_names)) thy'' |
218 (new_type_names ~~ size_names)) thy'' |
219 end; |
219 end; |
220 |
220 |
221 fun add_size_thms (new_type_names as name :: _) thy = |
221 fun add_size_thms config (new_type_names as name :: _) thy = |
222 let |
222 let |
223 val info as {descr, alt_names, ...} = DatatypePackage.the_datatype thy name; |
223 val info as {descr, alt_names, ...} = DatatypePackage.the_datatype thy name; |
224 val prefix = Long_Name.map_base_name (K (space_implode "_" |
224 val prefix = Long_Name.map_base_name (K (space_implode "_" |
225 (the_default (map Long_Name.base_name new_type_names) alt_names))) name; |
225 (the_default (map Long_Name.base_name new_type_names) alt_names))) name; |
226 val no_size = exists (fn (_, (_, _, constrs)) => exists (fn (_, cargs) => exists (fn dt => |
226 val no_size = exists (fn (_, (_, _, constrs)) => exists (fn (_, cargs) => exists (fn dt => |