src/HOL/Tools/Nitpick/nitpick.ML
changeset 53380 08f3491c50bf
parent 53378 07990ba8c0ea
child 53802 44bc6ff8f350
equal deleted inserted replaced
53379:74920496ab71 53380:08f3491c50bf
   454         ()
   454         ()
   455     (* This detection code is an ugly hack. Fortunately, it is used only to
   455     (* This detection code is an ugly hack. Fortunately, it is used only to
   456        provide a hint to the user. *)
   456        provide a hint to the user. *)
   457     fun is_struct_induct_step (name, (Rule_Cases.Case {fixes, assumes, ...}, _)) =
   457     fun is_struct_induct_step (name, (Rule_Cases.Case {fixes, assumes, ...}, _)) =
   458       not (null fixes) andalso
   458       not (null fixes) andalso
   459       exists (String.isSuffix ".hyps" o fst) assumes andalso
   459       exists (String.isSuffix ".hyps" o Name_Space.full_name Name_Space.default_naming o fst) assumes andalso
   460       exists (exists (curry (op =) name o shortest_name o fst)
   460       exists (exists (curry (op =) name o shortest_name o fst)
   461               o datatype_constrs hol_ctxt) deep_dataTs
   461               o datatype_constrs hol_ctxt) deep_dataTs
   462     val likely_in_struct_induct_step =
   462     val likely_in_struct_induct_step =
   463       exists is_struct_induct_step (Proof_Context.dest_cases ctxt)
   463       exists is_struct_induct_step (Proof_Context.dest_cases ctxt)
   464     val _ = if standard andalso likely_in_struct_induct_step then
   464     val _ = if standard andalso likely_in_struct_induct_step then