src/Pure/simplifier.ML
changeset 26425 6561665c5cb1
parent 24509 23ee6b7788c2
child 26435 bdce320cd426
equal deleted inserted replaced
26424:a6cad32a27b0 26425:6561665c5cb1
   108 val _ = Context.add_setup GlobalSimpset.init;
   108 val _ = Context.add_setup GlobalSimpset.init;
   109 fun print_simpset thy = print_ss (! (GlobalSimpset.get thy));
   109 fun print_simpset thy = print_ss (! (GlobalSimpset.get thy));
   110 val get_simpset = ! o GlobalSimpset.get;
   110 val get_simpset = ! o GlobalSimpset.get;
   111 
   111 
   112 fun change_simpset_of thy f = CRITICAL (fn () => change (GlobalSimpset.get thy) f);
   112 fun change_simpset_of thy f = CRITICAL (fn () => change (GlobalSimpset.get thy) f);
   113 fun change_simpset f = CRITICAL (fn () => change_simpset_of (ML_Context.the_context ()) f);
   113 fun change_simpset f = CRITICAL (fn () => change_simpset_of (ML_Context.the_global_context ()) f);
   114 
   114 
   115 fun simpset_of thy = MetaSimplifier.context (ProofContext.init thy) (get_simpset thy);
   115 fun simpset_of thy = MetaSimplifier.context (ProofContext.init thy) (get_simpset thy);
   116 val simpset = simpset_of o ML_Context.the_context;
   116 val simpset = simpset_of o ML_Context.the_global_context;
   117 
   117 
   118 
   118 
   119 fun SIMPSET tacf st = tacf (simpset_of (Thm.theory_of_thm st)) st;
   119 fun SIMPSET tacf st = tacf (simpset_of (Thm.theory_of_thm st)) st;
   120 fun SIMPSET' tacf i st = tacf (simpset_of (Thm.theory_of_thm st)) i st;
   120 fun SIMPSET' tacf i st = tacf (simpset_of (Thm.theory_of_thm st)) i st;
   121 
   121