src/HOL/Tools/function_package/size.ML
changeset 31668 a616e56a5ec8
parent 30364 577edc39b501
child 31723 f5cafe803b55
equal deleted inserted replaced
31667:cc969090c204 31668:a616e56a5ec8
   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 =>