src/Pure/Thy/sessions.scala
changeset 66719 d37efafd55b5
parent 66718 514c4907ff0b
child 66720 b07192253605
equal deleted inserted replaced
66718:514c4907ff0b 66719:d37efafd55b5
   203                     (resources.import_name(info.theory_qualifier, info.dir.implode, thy), pos) })
   203                     (resources.import_name(info.theory_qualifier, info.dir.implode, thy), pos) })
   204                 })
   204                 })
   205               resources.thy_info.dependencies(root_theories)
   205               resources.thy_info.dependencies(root_theories)
   206             }
   206             }
   207 
   207 
   208             val syntax = thy_deps.syntax
   208             val session_syntax = thy_deps.overall_syntax
   209 
   209 
   210             val theory_files = thy_deps.names.map(_.path)
   210             val theory_files = thy_deps.names.map(_.path)
   211             val loaded_files =
   211             val loaded_files =
   212               if (inlined_files) {
   212               if (inlined_files) {
   213                 if (Sessions.is_pure(info.name)) {
   213                 if (Sessions.is_pure(info.name)) {
   214                   (Thy_Header.PURE -> resources.pure_files(syntax, info.dir)) ::
   214                   (Thy_Header.PURE -> resources.pure_files(session_syntax, info.dir)) ::
   215                     thy_deps.loaded_files.filterNot(p => p._1 == Thy_Header.PURE)
   215                     thy_deps.loaded_files.filterNot(p => p._1 == Thy_Header.PURE)
   216                 }
   216                 }
   217                 else thy_deps.loaded_files
   217                 else thy_deps.loaded_files
   218               }
   218               }
   219               else Nil
   219               else Nil
   224                 info.document_files.map(file => info.dir + file._1 + file._2)).map(_.expand)
   224                 info.document_files.map(file => info.dir + file._1 + file._2)).map(_.expand)
   225 
   225 
   226             if (list_files)
   226             if (list_files)
   227               progress.echo(cat_lines(all_files.map(_.implode).sorted.map("  " + _)))
   227               progress.echo(cat_lines(all_files.map(_.implode).sorted.map("  " + _)))
   228 
   228 
   229             if (check_keywords.nonEmpty)
   229             if (check_keywords.nonEmpty) {
   230               Check_Keywords.check_keywords(progress, syntax.keywords, check_keywords, theory_files)
   230               Check_Keywords.check_keywords(
       
   231                 progress, session_syntax.keywords, check_keywords, theory_files)
       
   232             }
   231 
   233 
   232             val session_graph: Graph_Display.Graph =
   234             val session_graph: Graph_Display.Graph =
   233             {
   235             {
   234               def session_node(name: String): Graph_Display.Node =
   236               def session_node(name: String): Graph_Display.Node =
   235                 Graph_Display.Node("[" + name + "]", "session." + name)
   237                 Graph_Display.Node("[" + name + "]", "session." + name)
   276               Base(
   278               Base(
   277                 pos = info.pos,
   279                 pos = info.pos,
   278                 global_theories = global_theories,
   280                 global_theories = global_theories,
   279                 loaded_theories = thy_deps.loaded_theories,
   281                 loaded_theories = thy_deps.loaded_theories,
   280                 known = known,
   282                 known = known,
   281                 syntax = syntax,
   283                 syntax = session_syntax,
   282                 sources = sources,
   284                 sources = sources,
   283                 session_graph = session_graph,
   285                 session_graph = session_graph,
   284                 errors = thy_deps.errors ::: sources_errors,
   286                 errors = thy_deps.errors ::: sources_errors,
   285                 imports = Some(imports_base))
   287                 imports = Some(imports_base))
   286 
   288