tuned;
authorwenzelm
Tue, 03 Jan 2023 16:14:17 +0100
changeset 76885 c2932487360d
parent 76884 a004c5322ea4
child 76886 f405fcc3db33
tuned;
src/Pure/PIDE/resources.scala
--- a/src/Pure/PIDE/resources.scala	Tue Jan 03 16:05:07 2023 +0100
+++ b/src/Pure/PIDE/resources.scala	Tue Jan 03 16:14:17 2023 +0100
@@ -127,15 +127,13 @@
       yield (dir + Path.explode(file)).expand
   }
 
-  def pure_files(syntax: Outer_Syntax): List[Path] = {
-    val pure_dir = Path.explode("~~/src/Pure")
-    for {
-      (name, theory) <- Thy_Header.ml_roots
-      path = (pure_dir + Path.explode(name)).expand
-      node_name = Document.Node.Name(path.implode, theory = theory)
-      file <- loaded_files(syntax, node_name, load_commands(syntax, node_name)())
-    } yield file
-  }
+  def pure_files(syntax: Outer_Syntax): List[Path] =
+    (for {
+      (name, theory) <- Thy_Header.ml_roots.iterator
+      node = append_path("~~/src/Pure", Path.explode(name))
+      node_name = Document.Node.Name(node, theory = theory)
+      file <- loaded_files(syntax, node_name, load_commands(syntax, node_name)()).iterator
+    } yield file).toList
 
   def global_theory(theory: String): Boolean =
     sessions_structure.global_theories.isDefinedAt(theory)