src/HOL/Tools/Nitpick/nitpick.ML
changeset 58928 23d0ffd48006
parent 58892 20aa19ecf2cc
child 59184 830bb7ddb3ab
equal deleted inserted replaced
58927:cf47382db395 58928:23d0ffd48006
   218                            subst def_assm_ts nondef_assm_ts orig_t =
   218                            subst def_assm_ts nondef_assm_ts orig_t =
   219   let
   219   let
   220     val timer = Timer.startRealTimer ()
   220     val timer = Timer.startRealTimer ()
   221     val thy = Proof.theory_of state
   221     val thy = Proof.theory_of state
   222     val ctxt = Proof.context_of state
   222     val ctxt = Proof.context_of state
       
   223     val keywords = Thy_Header.get_keywords thy
   223 (* FIXME: reintroduce code before new release:
   224 (* FIXME: reintroduce code before new release:
   224 
   225 
   225     val nitpick_thy = Thy_Info.get_theory "Nitpick"
   226     val nitpick_thy = Thy_Info.get_theory "Nitpick"
   226     val _ = Theory.subthy (nitpick_thy, thy) orelse
   227     val _ = Theory.subthy (nitpick_thy, thy) orelse
   227             error "You must import the theory \"Nitpick\" to use Nitpick"
   228             error "You must import the theory \"Nitpick\" to use Nitpick"
   363       List.app (print_g o string_for_nut ctxt) (nondef_us @ def_us @ need_us)
   364       List.app (print_g o string_for_nut ctxt) (nondef_us @ def_us @ need_us)
   364 *)
   365 *)
   365 
   366 
   366     val unique_scope = forall (curry (op =) 1 o length o snd) cards_assigns
   367     val unique_scope = forall (curry (op =) 1 o length o snd) cards_assigns
   367     fun monotonicity_message Ts extra =
   368     fun monotonicity_message Ts extra =
   368       let val pretties = map (pretty_maybe_quote o pretty_for_type ctxt) Ts in
   369       let val pretties = map (pretty_maybe_quote keywords o pretty_for_type ctxt) Ts in
   369         Pretty.blk (0,
   370         Pretty.blk (0,
   370           pstrs ("The type" ^ plural_s_for_list pretties ^ " ") @
   371           pstrs ("The type" ^ plural_s_for_list pretties ^ " ") @
   371           pretty_serial_commas "and" pretties @
   372           pretty_serial_commas "and" pretties @
   372           pstrs (" " ^
   373           pstrs (" " ^
   373                  (if none_true monos then
   374                  (if none_true monos then