equal
deleted
inserted
replaced
585 handle TYPE (msg, _, _) => err msg; |
585 handle TYPE (msg, _, _) => err msg; |
586 in |
586 in |
587 (case duplicates (op =) vs of |
587 (case duplicates (op =) vs of |
588 [] => [] |
588 [] => [] |
589 | dups => err ("Duplicate variables on lhs: " ^ commas_quote dups)); |
589 | dups => err ("Duplicate variables on lhs: " ^ commas_quote dups)); |
590 (case subtract (op =) vs (map (#1 o #1) (typ_tvars rhs')) of |
590 (case subtract (op =) vs (map #1 (Term.add_tfreesT rhs' [])) of |
591 [] => [] |
591 [] => [] |
592 | extras => err ("Extra variables on rhs: " ^ commas_quote extras)); |
592 | extras => err ("Extra variables on rhs: " ^ commas_quote extras)); |
593 types |> new_decl naming (a, Abbreviation (vs, rhs', syntactic (#2 types) rhs')) |
593 types |> new_decl naming (a, Abbreviation (vs, rhs', syntactic (#2 types) rhs')) |
594 end); |
594 end); |
595 |
595 |