method section scanners: added [[declaration]] syntax, ignore sid-effects of thms;
authorwenzelm
Fri, 27 Jul 2007 21:55:20 +0200
changeset 24010 2ef318813e1a
parent 24009 85bb54571031
child 24011 8f2703c02241
method section scanners: added [[declaration]] syntax, ignore sid-effects of thms;
src/Pure/Isar/method.ML
--- a/src/Pure/Isar/method.ML	Fri Jul 27 21:55:19 2007 +0200
+++ b/src/Pure/Isar/method.ML	Fri Jul 27 21:55:20 2007 +0200
@@ -465,13 +465,11 @@
 
 local
 
-fun sect ss = Scan.first (map Scan.lift ss);
-fun thms ss = Scan.repeat (Scan.unless (sect ss) Attrib.multi_thm) >> flat;
-
+fun thms ss = Scan.repeat (Scan.unless (Scan.lift (Scan.first ss)) Attrib.multi_thm) >> flat;
 fun app (f, att) (context, ths) = foldl_map att (Context.map_proof f context, ths);
 
-fun section ss = (sect ss -- thms ss) :-- (fn (m, ths) => Scan.depend (fn context =>
-  Scan.succeed (app m (context, ths)))) >> #2;
+fun section ss = Scan.depend (fn context => (Scan.first ss -- Scan.pass context (thms ss)) :--
+  (fn (m, ths) => Scan.succeed (app m (context, ths))) >> #2);
 
 fun sectioned args ss = args -- Scan.repeat (section ss);