less redundant exploration of full name space;
authorwenzelm
Mon, 06 Jun 2016 10:34:56 +0200
changeset 63232 7238ed9a27ab
parent 63231 54197a7c1bbd
child 63233 e53830948c4f
less redundant exploration of full name space;
src/Pure/General/name_space.ML
--- a/src/Pure/General/name_space.ML	Mon Jun 06 08:36:03 2016 +0200
+++ b/src/Pure/General/name_space.ML	Mon Jun 06 10:34:56 2016 +0200
@@ -267,12 +267,16 @@
         | ord => ord);
       val Name_Space {kind, internals, ...} = space;
       val ext = extern_shortest (Context.proof_of context) space;
+      val full = Name.clean xname = "";
     in
       Change_Table.fold
         (fn (xname', (name :: _, _)) =>
-            if completed xname' andalso not (is_concealed space name) then
-              cons (xname' = ext name, (xname', (kind, name)))
-            else I
+              if completed xname' andalso not (is_concealed space name) then
+                let val xname'' = ext name in
+                  if xname' <> xname'' andalso full then I
+                  else cons (xname' = xname'', (xname', (kind, name)))
+                end
+              else I
           | _ => I) internals []
       |> sort_distinct result_ord
       |> map #2