add_cases: omit unnamed;
authorwenzelm
Wed, 08 Mar 2000 23:49:30 +0100
changeset 8384 13bc74731ae6
parent 8383 2dd4823c744f
child 8385 514df4f1df10
add_cases: omit unnamed;
src/Pure/Isar/proof_context.ML
--- a/src/Pure/Isar/proof_context.ML	Wed Mar 08 23:48:34 2000 +0100
+++ b/src/Pure/Isar/proof_context.ML	Wed Mar 08 23:49:30 2000 +0100
@@ -833,8 +833,12 @@
     None => raise CONTEXT ("Unknown case: " ^ quote name, ctxt)
   | Some c => c);
 
+
+fun add_case (tab, ("", _)) = tab
+  | add_case (tab, name_c) = Symtab.update (name_c, tab);
+
 fun add_cases xs = map_context (fn (thy, data, asms, binds, thms, cases, defs) =>
-  (thy, data, asms, binds, thms, foldl (Symtab.update o swap) (cases, xs), defs));
+  (thy, data, asms, binds, thms, foldl add_case (cases, xs), defs));