nicer_shortest: use NameSpace.extern_flags with disabled "features" instead of internal NameSpace.get_accesses;
authorwenzelm
Tue, 03 Mar 2009 14:54:12 +0100
changeset 30216 0300b7420b07
parent 30215 47cce3d47e62
child 30217 894eb2034f02
nicer_shortest: use NameSpace.extern_flags with disabled "features" instead of internal NameSpace.get_accesses;
src/Pure/Tools/find_theorems.ML
--- a/src/Pure/Tools/find_theorems.ML	Tue Mar 03 14:53:29 2009 +0100
+++ b/src/Pure/Tools/find_theorems.ML	Tue Mar 03 14:54:12 2009 +0100
@@ -306,14 +306,11 @@
 
 fun nicer_shortest ctxt =
   let
-    val ns = ProofContext.theory_of ctxt
-             |> PureThy.facts_of
-             |> Facts.space_of;
+    (* FIXME global name space!? *)
+    val space = Facts.space_of (PureThy.facts_of (ProofContext.theory_of ctxt));
 
-    val len_sort = sort (int_ord o (pairself size));
-    fun shorten s = (case len_sort (NameSpace.get_accesses ns s) of
-                       [] => s
-                     | s'::_ => s');
+    val shorten =
+      NameSpace.extern_flags {long_names = false, short_names = false, unique_names = false} space;
 
     fun nicer (Facts.Named ((x, _), i)) (Facts.Named ((y, _), j)) =
           nicer_name (shorten x, i) (shorten y, j)