src/HOL/Tools/inductive_codegen.ML
changeset 33049 c38f02fdf35d
parent 33038 8f9594c31de4
child 33050 fe166e8b9f07
equal deleted inserted replaced
33040:cffdb7b28498 33049:c38f02fdf35d
   480 fun prep_intrs intrs = map (rename_term o #prop o rep_thm o Drule.standard) intrs;
   480 fun prep_intrs intrs = map (rename_term o #prop o rep_thm o Drule.standard) intrs;
   481 
   481 
   482 fun constrain cs [] = []
   482 fun constrain cs [] = []
   483   | constrain cs ((s, xs) :: ys) = (s, case AList.lookup (op =) cs (s : string) of
   483   | constrain cs ((s, xs) :: ys) = (s, case AList.lookup (op =) cs (s : string) of
   484       NONE => xs
   484       NONE => xs
   485     | SOME xs' => inter (op =) (xs, xs')) :: constrain cs ys;
   485     | SOME xs' => inter (op =) xs' xs) :: constrain cs ys;
   486 
   486 
   487 fun mk_extra_defs thy defs gr dep names module ts =
   487 fun mk_extra_defs thy defs gr dep names module ts =
   488   Library.foldl (fn (gr, name) =>
   488   Library.foldl (fn (gr, name) =>
   489     if name mem names then gr
   489     if name mem names then gr
   490     else (case get_clauses thy name of
   490     else (case get_clauses thy name of