src/Tools/Code/code_preproc.ML
changeset 32091 30e2ffbba718
parent 32072 d4bff63bcbf1
child 32131 7913823f14e3
equal deleted inserted replaced
32090:39acf19e9f3a 32091:30e2ffbba718
   208   |> (map o apfst) (Code.string_of_const thy)
   208   |> (map o apfst) (Code.string_of_const thy)
   209   |> sort (string_ord o pairself fst)
   209   |> sort (string_ord o pairself fst)
   210   |> map (fn (s, thms) =>
   210   |> map (fn (s, thms) =>
   211        (Pretty.block o Pretty.fbreaks) (
   211        (Pretty.block o Pretty.fbreaks) (
   212          Pretty.str s
   212          Pretty.str s
   213          :: map (Display.pretty_thm o fst) thms
   213          :: map (Display.pretty_thm_global thy o fst) thms
   214        ))
   214        ))
   215   |> Pretty.chunks;
   215   |> Pretty.chunks;
   216 
   216 
   217 
   217 
   218 (** the Waisenhaus algorithm **)
   218 (** the Waisenhaus algorithm **)
   521       let
   521       let
   522         val thm3 = postprocess_conv thy (Thm.rhs_of thm2);
   522         val thm3 = postprocess_conv thy (Thm.rhs_of thm2);
   523       in
   523       in
   524         Thm.transitive thm1 (Thm.transitive thm2 thm3) handle THM _ =>
   524         Thm.transitive thm1 (Thm.transitive thm2 thm3) handle THM _ =>
   525           error ("could not construct evaluation proof:\n"
   525           error ("could not construct evaluation proof:\n"
   526           ^ (cat_lines o map Display.string_of_thm) [thm1, thm2, thm3])
   526           ^ (cat_lines o map (Display.string_of_thm_global thy)) [thm1, thm2, thm3])
   527       end;
   527       end;
   528   in gen_eval thy I conclude_evaluation end;
   528   in gen_eval thy I conclude_evaluation end;
   529 
   529 
   530 fun eval thy prep_sort postproc evaluator = gen_eval thy (Thm.cterm_of thy)
   530 fun eval thy prep_sort postproc evaluator = gen_eval thy (Thm.cterm_of thy)
   531   (K o postproc (postprocess_term thy)) prep_sort (simple_evaluator evaluator);
   531   (K o postproc (postprocess_term thy)) prep_sort (simple_evaluator evaluator);