src/HOL/Tools/Nitpick/nitpick.ML
changeset 45666 d83797ef0d2d
parent 44395 d39aedffba08
child 46086 096697aec8a7
equal deleted inserted replaced
45665:129db1416717 45666:d83797ef0d2d
   237     val state_ref = Unsynchronized.ref state
   237     val state_ref = Unsynchronized.ref state
   238     val pprint =
   238     val pprint =
   239       if mode = Auto_Try then
   239       if mode = Auto_Try then
   240         Unsynchronized.change state_ref o Proof.goal_message o K
   240         Unsynchronized.change state_ref o Proof.goal_message o K
   241         o Pretty.chunks o cons (Pretty.str "") o single
   241         o Pretty.chunks o cons (Pretty.str "") o single
   242         o Pretty.mark Markup.hilite
   242         o Pretty.mark Isabelle_Markup.hilite
   243       else
   243       else
   244         (fn s => (Output.urgent_message s; if debug then tracing s else ()))
   244         (fn s => (Output.urgent_message s; if debug then tracing s else ()))
   245         o Pretty.string_of
   245         o Pretty.string_of
   246     fun pprint_n f = () |> mode = Normal ? pprint o f
   246     fun pprint_n f = () |> mode = Normal ? pprint o f
   247     fun pprint_v f = () |> verbose ? pprint o f
   247     fun pprint_v f = () |> verbose ? pprint o f
   457       exists is_struct_induct_step (Proof_Context.cases_of ctxt)
   457       exists is_struct_induct_step (Proof_Context.cases_of ctxt)
   458     val _ = if standard andalso likely_in_struct_induct_step then
   458     val _ = if standard andalso likely_in_struct_induct_step then
   459               pprint_n (fn () => Pretty.blk (0,
   459               pprint_n (fn () => Pretty.blk (0,
   460                   pstrs "Hint: To check that the induction hypothesis is \
   460                   pstrs "Hint: To check that the induction hypothesis is \
   461                         \general enough, try this command: " @
   461                         \general enough, try this command: " @
   462                   [Pretty.mark Markup.sendback (Pretty.blk (0,
   462                   [Pretty.mark Isabelle_Markup.sendback (Pretty.blk (0,
   463                        pstrs ("nitpick [non_std, show_all]")))] @ pstrs "."))
   463                        pstrs ("nitpick [non_std, show_all]")))] @ pstrs "."))
   464             else
   464             else
   465               ()
   465               ()
   466 (*
   466 (*
   467     val _ = print_g "Monotonic types:"
   467     val _ = print_g "Monotonic types:"