279 (case Datatype.info_of_case thy s of |
279 (case Datatype.info_of_case thy s of |
280 SOME {index, descr, ...} => |
280 SOME {index, descr, ...} => |
281 if is_some (get_assoc_code thy (s, T)) then NONE else |
281 if is_some (get_assoc_code thy (s, T)) then NONE else |
282 SOME (pretty_case thy defs dep module brack |
282 SOME (pretty_case thy defs dep module brack |
283 (#3 (the (AList.lookup op = descr index))) c ts gr ) |
283 (#3 (the (AList.lookup op = descr index))) c ts gr ) |
284 | NONE => case (Datatype.info_of_constr thy s, strip_type T) of |
284 | NONE => case (Datatype.info_of_constr thy (s, T), strip_type T) of |
285 (SOME {index, descr, ...}, (_, U as Type (tyname, _))) => |
285 (SOME {index, descr, ...}, (_, U as Type (tyname, _))) => |
286 if is_some (get_assoc_code thy (s, T)) then NONE else |
286 if is_some (get_assoc_code thy (s, T)) then NONE else |
287 let |
287 let |
288 val SOME (tyname', _, constrs) = AList.lookup op = descr index; |
288 val SOME (tyname', _, constrs) = AList.lookup op = descr index; |
289 val SOME args = AList.lookup op = constrs s |
289 val SOME args = AList.lookup op = constrs s |