src/HOL/Tools/recfun_codegen.ML
changeset 24907 bfb2e82b61fe
parent 24624 b8383b1bbae3
child 25389 3e58c7cb5a73
equal deleted inserted replaced
24906:557a9cd9370c 24907:bfb2e82b61fe
    65 fun get_equations thy defs (s, T) =
    65 fun get_equations thy defs (s, T) =
    66   (case Symtab.lookup (RecCodegenData.get thy) s of
    66   (case Symtab.lookup (RecCodegenData.get thy) s of
    67      NONE => ([], "")
    67      NONE => ([], "")
    68    | SOME thms => 
    68    | SOME thms => 
    69        let val thms' = del_redundant thy []
    69        let val thms' = del_redundant thy []
    70          (filter (fn (thm, _) => is_instance thy T
    70          (filter (fn (thm, _) => is_instance T
    71            (snd (const_of (prop_of thm)))) thms)
    71            (snd (const_of (prop_of thm)))) thms)
    72        in if null thms' then ([], "")
    72        in if null thms' then ([], "")
    73          else (preprocess thy (map fst thms'),
    73          else (preprocess thy (map fst thms'),
    74            case snd (snd (split_last thms')) of
    74            case snd (snd (split_last thms')) of
    75                NONE => (case get_defn thy defs s T of
    75                NONE => (case get_defn thy defs s T of