clarified: allow to qualify theories from ROOT;
authorwenzelm
Tue, 04 Apr 2017 19:51:56 +0200
changeset 65373 905ed0102c69
parent 65372 b722ee40c26c
child 65374 a5b38d8d3c1e
clarified: allow to qualify theories from ROOT;
src/Pure/PIDE/resources.scala
src/Pure/Thy/sessions.scala
--- a/src/Pure/PIDE/resources.scala	Tue Apr 04 19:40:47 2017 +0200
+++ b/src/Pure/PIDE/resources.scala	Tue Apr 04 19:51:56 2017 +0200
@@ -68,8 +68,7 @@
     else Nil
 
   def qualify(name: String): String =
-    if (Long_Name.is_qualified(name)) error("Bad qualified theory name " + quote(name))
-    else if (session_base.global_theories.contains(name)) name
+    if (session_base.global_theories.contains(name) || Long_Name.is_qualified(name)) name
     else Long_Name.qualify(session_name, name)
 
   def init_name(raw_path: Path): Document.Node.Name =
--- a/src/Pure/Thy/sessions.scala	Tue Apr 04 19:40:47 2017 +0200
+++ b/src/Pure/Thy/sessions.scala	Tue Apr 04 19:51:56 2017 +0200
@@ -185,7 +185,12 @@
 
     def global_theories: List[String] =
       for { (global, _, paths) <- theories if global; path <- paths }
-      yield path.base.implode
+      yield {
+        val name = path.base.implode
+        if (Long_Name.is_qualified(name))
+          error("Bad qualified name for global theory " + quote(name))
+        else name
+      }
   }
 
   object Tree