src/Pure/Isar/isar_cmd.ML
changeset 5895 457b42674b57
parent 5880 feec44106a8e
child 5913 c543568ccaca
     1.1 --- a/src/Pure/Isar/isar_cmd.ML	Mon Nov 16 11:32:54 1998 +0100
     1.2 +++ b/src/Pure/Isar/isar_cmd.ML	Mon Nov 16 11:33:14 1998 +0100
     1.3 @@ -26,6 +26,7 @@
     1.4    val print_binds: Toplevel.transition -> Toplevel.transition
     1.5    val print_lthms: Toplevel.transition -> Toplevel.transition
     1.6    val print_thms: xstring * Args.src list -> Toplevel.transition -> Toplevel.transition
     1.7 +  val print_thm: xstring * Args.src list -> Toplevel.transition -> Toplevel.transition
     1.8    val print_prop: string -> Toplevel.transition -> Toplevel.transition
     1.9    val print_term: string -> Toplevel.transition -> Toplevel.transition
    1.10    val print_type: string -> Toplevel.transition -> Toplevel.transition
    1.11 @@ -102,18 +103,22 @@
    1.12    #2 (Attribute.applys ((Proof.context_of st, ths),
    1.13      map (Attrib.local_attribute (Proof.theory_of st)) srcs));
    1.14  
    1.15 -fun print_thms (name, srcs) = Toplevel.keep (fn state =>
    1.16 +fun gen_print_thms global_get local_get (name, srcs) = Toplevel.keep (fn state =>
    1.17    let
    1.18      val prt_tthm = Attribute.pretty_tthm;
    1.19      fun prt_tthms [th] = prt_tthm th
    1.20        | prt_tthms ths = Pretty.block (Pretty.fbreaks (map prt_tthm ths));
    1.21  
    1.22      val ths = map (apfst (Thm.transfer (Toplevel.theory_of state)))
    1.23 -      (Toplevel.node_cases PureThy.get_tthms (ProofContext.get_tthms o Proof.context_of)
    1.24 +      (Toplevel.node_cases global_get (local_get o Proof.context_of)
    1.25          state name);
    1.26      val ths' = Toplevel.node_cases global_attribs local_attribs state ths srcs;
    1.27    in Pretty.writeln (prt_tthms ths') end);
    1.28  
    1.29 +val print_thms = gen_print_thms PureThy.get_tthms ProofContext.get_tthms;
    1.30 +val print_thm =
    1.31 +  gen_print_thms (Library.single oo PureThy.get_tthm) (Library.single oo ProofContext.get_tthm);
    1.32 +
    1.33  
    1.34  (* print types, terms and props *)
    1.35