src/Tools/Code/code_preproc.ML
changeset 32131 7913823f14e3
parent 32123 8bac9ee4b28d
parent 32091 30e2ffbba718
child 32345 4da4fa060bb6
equal deleted inserted replaced
32130:2a0645733185 32131:7913823f14e3
   212   |> (map o apfst) (Code.string_of_const thy)
   212   |> (map o apfst) (Code.string_of_const thy)
   213   |> sort (string_ord o pairself fst)
   213   |> sort (string_ord o pairself fst)
   214   |> map (fn (s, thms) =>
   214   |> map (fn (s, thms) =>
   215        (Pretty.block o Pretty.fbreaks) (
   215        (Pretty.block o Pretty.fbreaks) (
   216          Pretty.str s
   216          Pretty.str s
   217          :: map (Display.pretty_thm o fst) thms
   217          :: map (Display.pretty_thm_global thy o fst) thms
   218        ))
   218        ))
   219   |> Pretty.chunks;
   219   |> Pretty.chunks;
   220 
   220 
   221 
   221 
   222 (** the Waisenhaus algorithm **)
   222 (** the Waisenhaus algorithm **)
   527       let
   527       let
   528         val thm3 = postprocess_conv thy (Thm.rhs_of thm2);
   528         val thm3 = postprocess_conv thy (Thm.rhs_of thm2);
   529       in
   529       in
   530         Thm.transitive thm1 (Thm.transitive thm2 thm3) handle THM _ =>
   530         Thm.transitive thm1 (Thm.transitive thm2 thm3) handle THM _ =>
   531           error ("could not construct evaluation proof:\n"
   531           error ("could not construct evaluation proof:\n"
   532           ^ (cat_lines o map Display.string_of_thm) [thm1, thm2, thm3])
   532           ^ (cat_lines o map (Display.string_of_thm_global thy)) [thm1, thm2, thm3])
   533       end;
   533       end;
   534   in gen_eval thy I conclude_evaluation end;
   534   in gen_eval thy I conclude_evaluation end;
   535 
   535 
   536 fun eval thy postproc evaluator = gen_eval thy (Thm.cterm_of thy)
   536 fun eval thy postproc evaluator = gen_eval thy (Thm.cterm_of thy)
   537   (K o postproc (postprocess_term thy)) (simple_evaluator evaluator);
   537   (K o postproc (postprocess_term thy)) (simple_evaluator evaluator);