equal
deleted
inserted
replaced
1833 val algebra = Sign.classes_of thy; |
1833 val algebra = Sign.classes_of thy; |
1834 val has_inst = can (Sorts.mg_domain algebra ext_tyco) @{sort random}; |
1834 val has_inst = can (Sorts.mg_domain algebra ext_tyco) @{sort random}; |
1835 in |
1835 in |
1836 if has_inst then thy |
1836 if has_inst then thy |
1837 else |
1837 else |
1838 (case Random_Generators.perhaps_constrain thy (map (rpair @{sort random}) Ts) vs of |
1838 (case Quickcheck_Common.perhaps_constrain thy (map (rpair @{sort random}) Ts) vs of |
1839 SOME constrain => |
1839 SOME constrain => |
1840 instantiate_random_record ext_tyco (map constrain vs) extN |
1840 instantiate_random_record ext_tyco (map constrain vs) extN |
1841 ((map o map_atyps) (fn TFree v => TFree (constrain v)) Ts) thy |
1841 ((map o map_atyps) (fn TFree v => TFree (constrain v)) Ts) thy |
1842 | NONE => thy) |
1842 | NONE => thy) |
1843 end; |
1843 end; |