src/Pure/Isar/isar_cmd.ML
changeset 7615 c650147f56f1
parent 7503 e8be98558eb8
child 7729 81e001f143a4
equal deleted inserted replaced
7614:88392b7bc549 7615:c650147f56f1
    36   val print_theory: Toplevel.transition -> Toplevel.transition
    36   val print_theory: Toplevel.transition -> Toplevel.transition
    37   val print_syntax: Toplevel.transition -> Toplevel.transition
    37   val print_syntax: Toplevel.transition -> Toplevel.transition
    38   val print_theorems: Toplevel.transition -> Toplevel.transition
    38   val print_theorems: Toplevel.transition -> Toplevel.transition
    39   val print_attributes: Toplevel.transition -> Toplevel.transition
    39   val print_attributes: Toplevel.transition -> Toplevel.transition
    40   val print_methods: Toplevel.transition -> Toplevel.transition
    40   val print_methods: Toplevel.transition -> Toplevel.transition
       
    41   val print_thms_containing: xstring list -> Toplevel.transition -> Toplevel.transition
    41   val print_binds: Toplevel.transition -> Toplevel.transition
    42   val print_binds: Toplevel.transition -> Toplevel.transition
    42   val print_lthms: Toplevel.transition -> Toplevel.transition
    43   val print_lthms: Toplevel.transition -> Toplevel.transition
    43   val print_thms: (string * Args.src list) list -> Toplevel.transition -> Toplevel.transition
    44   val print_thms: (string * Args.src list) list -> Toplevel.transition -> Toplevel.transition
    44   val print_prop: string -> Toplevel.transition -> Toplevel.transition
    45   val print_prop: string -> Toplevel.transition -> Toplevel.transition
    45   val print_term: string -> Toplevel.transition -> Toplevel.transition
    46   val print_term: string -> Toplevel.transition -> Toplevel.transition
    94 
    95 
    95 fun use name = Toplevel.keep (fn state =>
    96 fun use name = Toplevel.keep (fn state =>
    96   Context.setmp (try Toplevel.theory_of state) ThyInfo.use name);
    97   Context.setmp (try Toplevel.theory_of state) ThyInfo.use name);
    97 
    98 
    98 (*passes changes of theory context*)
    99 (*passes changes of theory context*)
    99 val use_mltext_theory = Toplevel.theory o IsarThy.use_mltext_theory;
   100 val use_mltext_theory = Toplevel.theory' o IsarThy.use_mltext_theory;
   100 
   101 
   101 (*ignore result theory context*)
   102 (*ignore result theory context*)
   102 fun use_mltext txt = Toplevel.keep (fn state =>
   103 fun use_mltext txt = Toplevel.keep' (fn verb => fn state =>
   103   (IsarThy.use_mltext txt (try Toplevel.theory_of state); ()));
   104   (IsarThy.use_mltext txt verb (try Toplevel.theory_of state)));
   104 
   105 
   105 (*Note: commit is dynamically bound*)
   106 (*Note: commit is dynamically bound*)
   106 val use_commit = use_mltext "commit();";
   107 val use_commit = use_mltext "commit();";
   107 
   108 
   108 
   109 
   134 val print_theory = Toplevel.keep (PureThy.print_theory o Toplevel.theory_of);
   135 val print_theory = Toplevel.keep (PureThy.print_theory o Toplevel.theory_of);
   135 val print_syntax = Toplevel.keep (Display.print_syntax o Toplevel.theory_of);
   136 val print_syntax = Toplevel.keep (Display.print_syntax o Toplevel.theory_of);
   136 val print_theorems = Toplevel.keep (PureThy.print_theorems o Toplevel.theory_of);
   137 val print_theorems = Toplevel.keep (PureThy.print_theorems o Toplevel.theory_of);
   137 val print_attributes = Toplevel.keep (Attrib.print_attributes o Toplevel.theory_of);
   138 val print_attributes = Toplevel.keep (Attrib.print_attributes o Toplevel.theory_of);
   138 val print_methods = Toplevel.keep (Method.print_methods o Toplevel.theory_of);
   139 val print_methods = Toplevel.keep (Method.print_methods o Toplevel.theory_of);
       
   140 
       
   141 fun print_thms_containing cs = Toplevel.keep (fn state =>
       
   142   ThmDatabase.print_thms_containing (Toplevel.theory_of state) cs);
   139 
   143 
   140 
   144 
   141 (* print proof context contents *)
   145 (* print proof context contents *)
   142 
   146 
   143 val print_binds = Toplevel.keep (ProofContext.print_binds o Proof.context_of o Toplevel.proof_of);
   147 val print_binds = Toplevel.keep (ProofContext.print_binds o Proof.context_of o Toplevel.proof_of);