src/Pure/General/path.scala
changeset 73715 bf51c23f3f99
parent 73712 3eba8d4b624b
child 73897 0ddb5de0506e
equal deleted inserted replaced
73714:e7deaadc5eab 73715:bf51c23f3f99
   261     def eval(elem: Path.Elem): List[Path.Elem] =
   261     def eval(elem: Path.Elem): List[Path.Elem] =
   262       elem match {
   262       elem match {
   263         case Path.Variable(s) =>
   263         case Path.Variable(s) =>
   264           val path = Path.explode(Isabelle_System.getenv_strict(s, env))
   264           val path = Path.explode(Isabelle_System.getenv_strict(s, env))
   265           if (path.elems.exists(_.isInstanceOf[Path.Variable]))
   265           if (path.elems.exists(_.isInstanceOf[Path.Variable]))
   266             error("Illegal path variable nesting: " + Properties.Eq(s -> path.toString))
   266             error("Illegal path variable nesting: " + Properties.Eq(s, path.toString))
   267           else path.elems
   267           else path.elems
   268         case x => List(x)
   268         case x => List(x)
   269       }
   269       }
   270 
   270 
   271     new Path(Path.norm_elems(elems.flatMap(eval)))
   271     new Path(Path.norm_elems(elems.flatMap(eval)))