src/Pure/axclass.ML
changeset 52788 da1fdbfebd39
parent 52230 1105b3b5aa77
child 53171 a5e54d4d9081
equal deleted inserted replaced
52787:c143ad7811fc 52788:da1fdbfebd39
   318 
   318 
   319 fun cert_classrel thy raw_rel =
   319 fun cert_classrel thy raw_rel =
   320   let
   320   let
   321     val string_of_sort = Syntax.string_of_sort_global thy;
   321     val string_of_sort = Syntax.string_of_sort_global thy;
   322     val (c1, c2) = pairself (Sign.certify_class thy) raw_rel;
   322     val (c1, c2) = pairself (Sign.certify_class thy) raw_rel;
   323     val _ = Sign.primitive_classrel (c1, c2) (Theory.copy thy);
   323     val _ = Sign.primitive_classrel (c1, c2) thy;
   324     val _ =
   324     val _ =
   325       (case subtract (op =) (all_params_of thy [c1]) (all_params_of thy [c2]) of
   325       (case subtract (op =) (all_params_of thy [c1]) (all_params_of thy [c2]) of
   326         [] => ()
   326         [] => ()
   327       | xs => raise TYPE ("Class " ^ string_of_sort [c1] ^ " lacks parameter(s) " ^
   327       | xs => raise TYPE ("Class " ^ string_of_sort [c1] ^ " lacks parameter(s) " ^
   328           commas_quote xs ^ " of " ^ string_of_sort [c2], [], []));
   328           commas_quote xs ^ " of " ^ string_of_sort [c2], [], []));