src/HOL/Tools/datatype_codegen.ML
changeset 31156 90fed3d4430f
parent 31151 1c64b0827ee8
child 31240 251a34663242
equal deleted inserted replaced
31155:92d8ff6af82c 31156:90fed3d4430f
   411 
   411 
   412 fun mk_constr_consts thy vs dtco cos =
   412 fun mk_constr_consts thy vs dtco cos =
   413   let
   413   let
   414     val cs = map (fn (c, tys) => (c, tys ---> Type (dtco, map TFree vs))) cos;
   414     val cs = map (fn (c, tys) => (c, tys ---> Type (dtco, map TFree vs))) cos;
   415     val cs' = map (fn c_ty as (_, ty) => (AxClass.unoverload_const thy c_ty, ty)) cs;
   415     val cs' = map (fn c_ty as (_, ty) => (AxClass.unoverload_const thy c_ty, ty)) cs;
   416   in if is_some (try (Code_Unit.constrset_of_consts thy) cs')
   416   in if is_some (try (Code.constrset_of_consts thy) cs')
   417     then SOME cs
   417     then SOME cs
   418     else NONE
   418     else NONE
   419   end;
   419   end;
   420 
   420 
   421 fun add_all_code dtcos thy =
   421 fun add_all_code dtcos thy =