equal
deleted
inserted
replaced
110 |
110 |
111 val matches = |
111 val matches = |
112 fold (fn c => (case eval_entry c of NONE => I | SOME rank => cons (rank, c))) constants [] |
112 fold (fn c => (case eval_entry c of NONE => I | SOME rank => cons (rank, c))) constants [] |
113 |> sort (prod_ord (rev_order o int_ord) (string_ord o pairself fst)) |
113 |> sort (prod_ord (rev_order o int_ord) (string_ord o pairself fst)) |
114 |> map (apsnd fst o snd); |
114 |> map (apsnd fst o snd); |
|
115 |
|
116 val position_markup = Position.markup (Position.thread_data ()) Markup.position; |
115 in |
117 in |
116 Pretty.block |
118 Pretty.block |
117 (Pretty.fbreaks (Pretty.keyword1 "find_consts" :: map pretty_criterion raw_criteria)) :: |
119 (Pretty.fbreaks |
|
120 (Pretty.mark position_markup (Pretty.keyword1 "find_consts") :: |
|
121 map pretty_criterion raw_criteria)) :: |
118 Pretty.str "" :: |
122 Pretty.str "" :: |
119 (if null matches then [Pretty.str "found nothing"] |
123 (if null matches then [Pretty.str "found nothing"] |
120 else |
124 else |
121 Pretty.str ("found " ^ string_of_int (length matches) ^ " constant(s):") :: |
125 Pretty.str ("found " ^ string_of_int (length matches) ^ " constant(s):") :: |
122 grouped 10 Par_List.map (Pretty.item o single o pretty_const ctxt) matches) |
126 grouped 10 Par_List.map (Pretty.item o single o pretty_const ctxt) matches) |