tuned;
authorwenzelm
Wed, 25 Jul 2012 19:49:40 +0200
changeset 49518f26b6b364c2c
parent 49517 fd03877ad5bc
child 49519 21dfd6c04482
tuned;
src/Pure/System/isabelle_system.scala
     1.1 --- a/src/Pure/System/isabelle_system.scala	Wed Jul 25 18:05:07 2012 +0200
     1.2 +++ b/src/Pure/System/isabelle_system.scala	Wed Jul 25 19:49:40 2012 +0200
     1.3 @@ -292,18 +292,17 @@
     1.4  
     1.5    /* find logics */
     1.6  
     1.7 +  def find_logics_dirs(): List[Path] =
     1.8 +  {
     1.9 +    val ml_ident = Path.explode("$ML_IDENTIFIER").expand
    1.10 +    Path.split(getenv_strict("ISABELLE_PATH")).map(_ + ml_ident)
    1.11 +  }
    1.12 +
    1.13    def find_logics(): List[String] =
    1.14 -  {
    1.15 -    val ml_ident = getenv_strict("ML_IDENTIFIER")
    1.16 -    val logics = new mutable.ListBuffer[String]
    1.17 -    for (dir <- Path.split(getenv_strict("ISABELLE_PATH"))) {
    1.18 -      val files = (dir + Path.explode(ml_ident)).file.listFiles()
    1.19 -      if (files != null) {
    1.20 -        for (file <- files if file.isFile) logics += file.getName
    1.21 -      }
    1.22 -    }
    1.23 -    logics.toList.sorted
    1.24 -  }
    1.25 +    (for {
    1.26 +      dir <- find_logics_dirs()
    1.27 +      files = dir.file.listFiles() if files != null
    1.28 +      file <- files.toList if file.isFile } yield file.getName).sorted
    1.29  
    1.30  
    1.31    /* fonts */