src/Pure/Thy/presentation.scala
changeset 74711 eb89b3a37826
parent 74710 2057c02d7795
child 74712 bcca7e3bcd0d
equal deleted inserted replaced
74710:2057c02d7795 74711:eb89b3a37826
   427       Library.separate(HTML.break ::: HTML.nl,
   427       Library.separate(HTML.break ::: HTML.nl,
   428         (deps_link :: readme_links ::: document_links).
   428         (deps_link :: readme_links ::: document_links).
   429           map(link => HTML.text("View ") ::: List(link))).flatten
   429           map(link => HTML.text("View ") ::: List(link))).flatten
   430     }
   430     }
   431 
   431 
   432     val theory_exports0: Set[String] = html_context.cached_theories
   432     val cached_theories: Set[String] = html_context.cached_theories
       
   433     val all_used_theories = hierarchy.flatMap(a => deps(a).used_theories.map(_._1))
       
   434     val present_theories = all_used_theories.filterNot(name => cached_theories.contains(name.theory))
       
   435 
   433     val theory_exports: Map[String, Export_Theory.Theory] =
   436     val theory_exports: Map[String, Export_Theory.Theory] =
   434       (for ((_, entry) <- base.known_theories.iterator) yield {
   437       (for (node <- all_used_theories.iterator) yield {
   435         val thy_name = entry.name.theory
   438         val thy_name = node.theory
   436         val theory =
   439         val theory =
   437           if (thy_name == Thy_Header.PURE) Export_Theory.no_theory
   440           if (thy_name == Thy_Header.PURE) Export_Theory.no_theory
   438           else {
   441           else {
   439             html_context.cache_theory(thy_name,
   442             html_context.cache_theory(thy_name,
   440               {
   443               {
   560 
   563 
   561           Theory(name, command, files_html, html)
   564           Theory(name, command, files_html, html)
   562         }
   565         }
   563       }
   566       }
   564 
   567 
   565       val present_theories =
       
   566         for ((name, _) <- base.used_theories if !theory_exports0.contains(name.theory))
       
   567           yield name
       
   568 
       
   569       (for (thy <- Par_List.map(read_theory, present_theories).flatten) yield {
   568       (for (thy <- Par_List.map(read_theory, present_theories).flatten) yield {
   570         val thy_session = base.theory_qualifier(thy.name)
   569         val thy_session = base.theory_qualifier(thy.name)
   571         val thy_dir = make_session_dir(thy_session)
   570         val thy_dir = make_session_dir(thy_session)
   572         val files =
   571         val files =
   573           for { (src_path, file_html) <- thy.files_html }
   572           for { (src_path, file_html) <- thy.files_html }