src/HOL/Tools/record.ML
changeset 41928 05abcee548a1
parent 41926 b09a67a3dc1e
child 42086 74bf78db0d87
equal deleted inserted replaced
41927:8759e9d043f9 41928:05abcee548a1
  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;