equal
deleted
inserted
replaced
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], [], [])); |