equal
deleted
inserted
replaced
1720 end; |
1720 end; |
1721 |
1721 |
1722 fun ensure_sort_record (sort, mk_eq) ext_tyco vs extN Ts thy = |
1722 fun ensure_sort_record (sort, mk_eq) ext_tyco vs extN Ts thy = |
1723 let |
1723 let |
1724 val algebra = Sign.classes_of thy; |
1724 val algebra = Sign.classes_of thy; |
1725 val has_inst = can (Sorts.mg_domain algebra ext_tyco) sort; |
1725 val has_inst = Sorts.has_instance algebra ext_tyco sort; |
1726 in |
1726 in |
1727 if has_inst then thy |
1727 if has_inst then thy |
1728 else |
1728 else |
1729 (case Quickcheck_Common.perhaps_constrain thy (map (rpair sort) Ts) vs of |
1729 (case Quickcheck_Common.perhaps_constrain thy (map (rpair sort) Ts) vs of |
1730 SOME constrain => |
1730 SOME constrain => |