equal
deleted
inserted
replaced
565 val raw_parent_comps = (List.concat (map (parent_components thy) parents')); |
565 val raw_parent_comps = (List.concat (map (parent_components thy) parents')); |
566 fun check_type (n,T) = |
566 fun check_type (n,T) = |
567 (case distinct (snd_eq) (filter (curry fst_eq (n,T)) raw_parent_comps) of |
567 (case distinct (snd_eq) (filter (curry fst_eq (n,T)) raw_parent_comps) of |
568 [] => [] |
568 [] => [] |
569 | [_] => [] |
569 | [_] => [] |
570 | rs => ["Different types for component " ^ n ^": " ^ commas |
570 | rs => ["Different types for component " ^ n ^": " ^ |
571 (map (Pretty.string_of o Display.pretty_ctyp o ctyp_of thy o snd) rs)]) |
571 commas (map (Syntax.string_of_typ ctxt o snd) rs)]) |
572 |
572 |
573 val err_dup_types = List.concat (map check_type (duplicates fst_eq raw_parent_comps)) |
573 val err_dup_types = List.concat (map check_type (duplicates fst_eq raw_parent_comps)) |
574 |
574 |
575 val parent_comps = distinct (fst_eq) raw_parent_comps; |
575 val parent_comps = distinct (fst_eq) raw_parent_comps; |
576 val all_comps = parent_comps @ comps'; |
576 val all_comps = parent_comps @ comps'; |