src/Pure/Thy/sessions.scala
changeset 75749 45fc58d48e4a
parent 75748 b6d74c90b588
child 75750 2eee2fdfb6e2
equal deleted inserted replaced
75748:b6d74c90b588 75749:45fc58d48e4a
    57 
    57 
    58 
    58 
    59   /* base info and source dependencies */
    59   /* base info and source dependencies */
    60 
    60 
    61   sealed case class Base(
    61   sealed case class Base(
    62     pos: Position.T = Position.none,
    62     session_pos: Position.T = Position.none,
    63     session_directories: Map[JFile, String] = Map.empty,
    63     session_directories: Map[JFile, String] = Map.empty,
    64     global_theories: Map[String, String] = Map.empty,
    64     global_theories: Map[String, String] = Map.empty,
    65     proper_session_theories: List[Document.Node.Name] = Nil,
    65     proper_session_theories: List[Document.Node.Name] = Nil,
    66     document_theories: List[Document.Node.Name] = Nil,
    66     document_theories: List[Document.Node.Name] = Nil,
    67     loaded_theories: Graph[String, Outer_Syntax] = Graph.string,  // cumulative imports
    67     loaded_theories: Graph[String, Outer_Syntax] = Graph.string,  // cumulative imports
   114     def errors: List[String] =
   114     def errors: List[String] =
   115       (for {
   115       (for {
   116         (name, base) <- session_bases.iterator
   116         (name, base) <- session_bases.iterator
   117         if base.errors.nonEmpty
   117         if base.errors.nonEmpty
   118       } yield cat_lines(base.errors) +
   118       } yield cat_lines(base.errors) +
   119           "\nThe error(s) above occurred in session " + quote(name) + Position.here(base.pos)
   119           "\nThe error(s) above occurred in session " + quote(name) + Position.here(base.session_pos)
   120       ).toList
   120       ).toList
   121 
   121 
   122     def check_errors: Deps =
   122     def check_errors: Deps =
   123       errors match {
   123       errors match {
   124         case Nil => this
   124         case Nil => this
   322               try { info.bibtex_entries; Nil }
   322               try { info.bibtex_entries; Nil }
   323               catch { case ERROR(msg) => List(msg) }
   323               catch { case ERROR(msg) => List(msg) }
   324 
   324 
   325             val base =
   325             val base =
   326               Base(
   326               Base(
   327                 pos = info.pos,
   327                 session_pos = info.pos,
   328                 session_directories = sessions_structure.session_directories,
   328                 session_directories = sessions_structure.session_directories,
   329                 global_theories = sessions_structure.global_theories,
   329                 global_theories = sessions_structure.global_theories,
   330                 proper_session_theories = proper_session_theories,
   330                 proper_session_theories = proper_session_theories,
   331                 document_theories = document_theories,
   331                 document_theories = document_theories,
   332                 loaded_theories = dependencies.loaded_theories,
   332                 loaded_theories = dependencies.loaded_theories,