src/Pure/Build/sessions.scala
changeset 82948 e2e43992f339
parent 82318 d0838fb98fc3
child 82970 9164cace10ca
equal deleted inserted replaced
82947:79d14c862560 82948:e2e43992f339
   100     session_pos: Position.T = Position.none,
   100     session_pos: Position.T = Position.none,
   101     proper_session_theories: List[Document.Node.Name] = Nil,
   101     proper_session_theories: List[Document.Node.Name] = Nil,
   102     document_theories: List[Document.Node.Name] = Nil,
   102     document_theories: List[Document.Node.Name] = Nil,
   103     loaded_theories: Graph[String, Outer_Syntax] = Graph.string,  // cumulative imports
   103     loaded_theories: Graph[String, Outer_Syntax] = Graph.string,  // cumulative imports
   104     used_theories: List[(Document.Node.Name, Options)] = Nil,  // new imports
   104     used_theories: List[(Document.Node.Name, Options)] = Nil,  // new imports
   105     theory_load_commands: Map[String, List[Command_Span.Span]] = Map.empty,
   105     theory_load_commands: Map[String, List[(Command_Span.Span, Symbol.Offset)]] = Map.empty,
   106     known_theories: Map[String, Document.Node.Entry] = Map.empty,
   106     known_theories: Map[String, Document.Node.Entry] = Map.empty,
   107     known_loaded_files: Map[String, List[Path]] = Map.empty,
   107     known_loaded_files: Map[String, List[Path]] = Map.empty,
   108     overall_syntax: Outer_Syntax = Outer_Syntax.empty,
   108     overall_syntax: Outer_Syntax = Outer_Syntax.empty,
   109     imported_sources: List[(Path, SHA1.Digest)] = Nil,
   109     imported_sources: List[(Path, SHA1.Digest)] = Nil,
   110     session_sources: List[(Path, SHA1.Digest)] = Nil,
   110     session_sources: List[(Path, SHA1.Digest)] = Nil,
   299               val (load_commands, load_commands_errors) =
   299               val (load_commands, load_commands_errors) =
   300                 try { if (inlined_files) (dependencies.load_commands, Nil) else (Nil, Nil) }
   300                 try { if (inlined_files) (dependencies.load_commands, Nil) else (Nil, Nil) }
   301                 catch { case ERROR(msg) => (Nil, List(msg)) }
   301                 catch { case ERROR(msg) => (Nil, List(msg)) }
   302 
   302 
   303               val theory_load_commands =
   303               val theory_load_commands =
   304                 (for ((name, span) <- load_commands.iterator) yield name.theory -> span).toMap
   304                 (for ((name, cmd) <- load_commands.iterator) yield name.theory -> cmd).toMap
   305 
   305 
   306               val loaded_files: List[(String, List[Path])] =
   306               val loaded_files: List[(String, List[Path])] =
   307                 for ((name, spans) <- load_commands) yield {
   307                 for ((name, cmds) <- load_commands) yield {
   308                   val (theory, files) = dependencies.loaded_files(name, spans)
   308                   val (theory, files) = dependencies.loaded_files(name, cmds.map(_._1))
   309                   theory -> files.map(file => Path.explode(file.node))
   309                   theory -> files.map(file => Path.explode(file.node))
   310                 }
   310                 }
   311 
   311 
   312               val document_files =
   312               val document_files =
   313                 for ((path1, path2) <- info.document_files)
   313                 for ((path1, path2) <- info.document_files)