invoke_case: proper qualification of name binding, avoiding old no_base_names;
authorwenzelm
Tue, 10 Mar 2009 21:18:52 +0100
changeset 30419 c944e299eaf9
parent 30418 b5044aca0729
child 30420 ebbec8d8d7a9
invoke_case: proper qualification of name binding, avoiding old no_base_names;
src/Pure/Isar/proof.ML
--- a/src/Pure/Isar/proof.ML	Tue Mar 10 21:18:01 2009 +0100
+++ b/src/Pure/Isar/proof.ML	Tue Mar 10 21:18:52 2009 +0100
@@ -677,18 +677,19 @@
 
 local
 
+fun qualified_binding a =
+  Binding.qualify true (Long_Name.qualifier a) (Binding.name (Long_Name.base_name a));
+
 fun gen_invoke_case prep_att (name, xs, raw_atts) state =
   let
     val atts = map (prep_att (theory_of state)) raw_atts;
     val (asms, state') = state |> map_context_result (fn ctxt =>
       ctxt |> ProofContext.apply_case (ProofContext.get_case ctxt name xs));
-    val assumptions = asms |> map (fn (a, ts) => ((Binding.name a, atts), map (rpair []) ts));
+    val assumptions = asms |> map (fn (a, ts) => ((qualified_binding a, atts), map (rpair []) ts));
   in
     state'
-    |> map_context (ProofContext.qualified_names #> ProofContext.no_base_names)
     |> assume_i assumptions
     |> add_binds_i AutoBind.no_facts
-    |> map_context (ProofContext.restore_naming (context_of state))
     |> `the_facts |-> (fn thms => note_thmss_i [((Binding.name name, []), [(thms, [])])])
   end;