tuned signature;
authorwenzelm
Fri Sep 07 14:07:34 2018 +0200 (9 months ago)
changeset 6892359d2eab3f8b9
parent 68922 1751765b636d
child 68924 feed46aa1969
tuned signature;
src/Pure/Thy/thy_resources.scala
     1.1 --- a/src/Pure/Thy/thy_resources.scala	Fri Sep 07 13:58:43 2018 +0200
     1.2 +++ b/src/Pure/Thy/thy_resources.scala	Fri Sep 07 14:07:34 2018 +0200
     1.3 @@ -90,6 +90,9 @@
     1.4      val tmp_dir: JFile = Isabelle_System.tmp_dir("server_session")
     1.5      val tmp_dir_name: String = File.path(tmp_dir).implode
     1.6  
     1.7 +    def master_directory(master_dir: String): String =
     1.8 +      proper_string(master_dir) getOrElse tmp_dir_name
     1.9 +
    1.10      override def toString: String = session_name
    1.11  
    1.12      override def stop(): Process_Result =
    1.13 @@ -189,9 +192,9 @@
    1.14      {
    1.15        val dep_theories =
    1.16        {
    1.17 -        val master = proper_string(master_dir) getOrElse tmp_dir_name
    1.18          val import_names =
    1.19 -          theories.map(thy => resources.import_name(qualifier, master, thy) -> Position.none)
    1.20 +          theories.map(thy =>
    1.21 +            resources.import_name(qualifier, master_directory(master_dir), thy) -> Position.none)
    1.22          resources.dependencies(import_names, progress = progress).check_errors.theories
    1.23        }
    1.24        val dep_theories_set = dep_theories.toSet
    1.25 @@ -303,8 +306,9 @@
    1.26        master_dir: String = "",
    1.27        all: Boolean = false): (List[Document.Node.Name], List[Document.Node.Name]) =
    1.28      {
    1.29 -      val master = proper_string(master_dir) getOrElse tmp_dir_name
    1.30 -      val nodes = if (all) None else Some(theories.map(resources.import_name(qualifier, master, _)))
    1.31 +      val nodes =
    1.32 +        if (all) None
    1.33 +        else Some(theories.map(resources.import_name(qualifier, master_directory(master_dir), _)))
    1.34        resources.purge_theories(session, nodes)
    1.35      }
    1.36    }