src/HOL/Tools/Datatype/datatype_codegen.ML
changeset 32896 99cd75a18b78
parent 31784 bd3486c57ba3
child 32902 fbccf4522e14
equal deleted inserted replaced
32895:6f3cdb4a9e11 32896:99cd75a18b78
   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