minimalistic support for remote URLs: no master dir here;
authorwenzelm
Tue, 20 Mar 2012 18:01:34 +0100
changeset 47051 b32e6de4a39b
parent 47050 7be54568efa1
child 47057 12423b36fcc4
minimalistic support for remote URLs: no master dir here;
src/Pure/PIDE/document.ML
--- a/src/Pure/PIDE/document.ML	Tue Mar 20 13:53:09 2012 +0100
+++ b/src/Pure/PIDE/document.ML	Tue Mar 20 18:01:34 2012 +0100
@@ -445,7 +445,11 @@
 fun init_theory deps node =
   let
     (* FIXME provide files via Scala layer, not master_dir *)
-    val (master_dir, header) = Exn.release (get_header node);
+    val (dir, header) = Exn.release (get_header node);
+    val master_dir =
+      (case Url.explode dir of
+        Url.File path => path
+      | _ => Path.current);
     val parents =
       #imports header |> map (fn import =>
         (case Thy_Info.lookup_theory import of  (* FIXME more robust!? *)
@@ -453,7 +457,7 @@
         | NONE =>
             get_theory (Position.file_only import)
               (snd (Future.join (the (AList.lookup (op =) deps import))))));
-  in Thy_Load.begin_theory (Path.explode master_dir) header parents end;
+  in Thy_Load.begin_theory master_dir header parents end;
 
 in