429 insert (op =) (c, (map (styp_of NONE) o Sign.const_typargs thy) c_ty) | _ => I) ts []; |
429 insert (op =) (c, (map (styp_of NONE) o Sign.const_typargs thy) c_ty) | _ => I) ts []; |
430 val (vardeps, (eqntab, insts)) = empty_vardeps_data |
430 val (vardeps, (eqntab, insts)) = empty_vardeps_data |
431 |> fold (ensure_fun thy arities eqngr) cs |
431 |> fold (ensure_fun thy arities eqngr) cs |
432 |> fold (ensure_rhs thy arities eqngr) cs_rhss; |
432 |> fold (ensure_rhs thy arities eqngr) cs_rhss; |
433 val arities' = fold (add_arity thy vardeps) insts arities; |
433 val arities' = fold (add_arity thy vardeps) insts arities; |
434 val algebra = Sorts.subalgebra (Syntax.init_pretty_global thy) (is_proper_class thy) |
434 val algebra = Sorts.subalgebra (Context.pretty_global thy) (is_proper_class thy) |
435 (AList.lookup (op =) arities') (Sign.classes_of thy); |
435 (AList.lookup (op =) arities') (Sign.classes_of thy); |
436 val (rhss, eqngr') = Symtab.fold (add_cert thy vardeps) eqntab ([], eqngr); |
436 val (rhss, eqngr') = Symtab.fold (add_cert thy vardeps) eqntab ([], eqngr); |
437 fun deps_of (c, rhs) = c :: maps (dicts_of thy algebra) |
437 fun deps_of (c, rhs) = c :: maps (dicts_of thy algebra) |
438 (rhs ~~ sortargs eqngr' c); |
438 (rhs ~~ sortargs eqngr' c); |
439 val eqngr'' = fold (fn (c, rhs) => fold |
439 val eqngr'' = fold (fn (c, rhs) => fold |