src/Pure/Thy/sessions.scala
changeset 67216 99815211970c
parent 67215 03d0c958d65a
child 67219 81e9804b2014
equal deleted inserted replaced
67215:03d0c958d65a 67216:99815211970c
   454       if (!is_pure(name) && !entry.parent.isDefined) error("Missing parent session")
   454       if (!is_pure(name) && !entry.parent.isDefined) error("Missing parent session")
   455 
   455 
   456       val session_options = options ++ entry.options
   456       val session_options = options ++ entry.options
   457 
   457 
   458       val theories =
   458       val theories =
   459         entry.theories.map({ case (opts, thys) => (session_options ++ opts, thys.map(_._1)) })
   459         entry.theories.map({ case (opts, thys) =>
       
   460           (session_options ++ opts,
       
   461             thys.map({ case ((thy, pos), _) =>
       
   462               if (thy == Sessions.root_name)
       
   463                 error("Bad theory name " + quote(thy) + Position.here(pos))
       
   464               else (thy, pos) })) })
   460 
   465 
   461       val global_theories =
   466       val global_theories =
   462         for { (_, thys) <- entry.theories; ((thy, pos), global) <- thys if global }
   467         for { (_, thys) <- entry.theories; ((thy, pos), global) <- thys if global }
   463         yield {
   468         yield {
   464           val thy_name = Path.explode(thy).expand.base_name
   469           val thy_name = Path.explode(thy).expand.base_name