src/HOL/HOL.thy
changeset 46190 a42c5f23109f
parent 46161 4ed94d92ae19
child 46497 89ccf66aa73d
--- a/src/HOL/HOL.thy	Wed Jan 11 18:02:59 2012 +0100
+++ b/src/HOL/HOL.thy	Wed Jan 11 21:04:22 2012 +0100
@@ -1906,19 +1906,20 @@
 subsubsection {* Evaluation and normalization by evaluation *}
 
 ML {*
-fun gen_eval_method conv ctxt = SIMPLE_METHOD'
-  (CONVERSION (Conv.params_conv ~1 (K (Conv.concl_conv ~1 (conv ctxt))) ctxt)
-    THEN' rtac TrueI)
+fun eval_tac ctxt =
+  let val conv = Code_Runtime.dynamic_holds_conv (Proof_Context.theory_of ctxt)
+  in CONVERSION (Conv.params_conv ~1 (K (Conv.concl_conv ~1 conv)) ctxt) THEN' rtac TrueI end
 *}
 
-method_setup eval = {*
-  Scan.succeed (gen_eval_method (Code_Runtime.dynamic_holds_conv o Proof_Context.theory_of))
-*} "solve goal by evaluation"
+method_setup eval = {* Scan.succeed (SIMPLE_METHOD' o eval_tac) *}
+  "solve goal by evaluation"
 
 method_setup normalization = {*
-  Scan.succeed (fn ctxt => SIMPLE_METHOD'
-    (CHANGED_PROP o (CONVERSION (Nbe.dynamic_conv (Proof_Context.theory_of ctxt))
-      THEN' (fn k => TRY (rtac TrueI k)))))
+  Scan.succeed (fn ctxt =>
+    SIMPLE_METHOD'
+      (CHANGED_PROP o
+        (CONVERSION (Nbe.dynamic_conv (Proof_Context.theory_of ctxt))
+          THEN_ALL_NEW (TRY o rtac TrueI))))
 *} "solve goal by normalization"