src/HOL/Tools/record.ML
changeset 48272 db75b4005d9a
parent 47842 bfc08ce7b7b9
child 49833 1d80798e8d8a
equal deleted inserted replaced
48271:b28defd0b5a5 48272:db75b4005d9a
  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 =>