428 Library.separate(HTML.break ::: HTML.nl, |
428 Library.separate(HTML.break ::: HTML.nl, |
429 (deps_link :: readme_links ::: document_links). |
429 (deps_link :: readme_links ::: document_links). |
430 map(link => HTML.text("View ") ::: List(link))).flatten |
430 map(link => HTML.text("View ") ::: List(link))).flatten |
431 } |
431 } |
432 |
432 |
433 def read_theory(thy_name: String): Export_Theory.Theory = |
|
434 if (thy_name == Thy_Header.PURE) Export_Theory.no_theory |
|
435 else { |
|
436 html_context.cache_theory(thy_name, |
|
437 { |
|
438 val qualifier = deps(session).theory_qualifier(thy_name) |
|
439 val provider = Export.Provider.database_context(db_context, List(qualifier), thy_name) |
|
440 if (Export_Theory.read_theory_parents(provider, thy_name).isDefined) { |
|
441 Export_Theory.read_theory(provider, qualifier, thy_name) |
|
442 } |
|
443 else { |
|
444 progress.echo_warning("No theory exports for " + quote(thy_name)) |
|
445 Export_Theory.no_theory |
|
446 } |
|
447 }) |
|
448 } |
|
449 |
|
450 val theory_by_name: Map[String, Export_Theory.Theory] = |
433 val theory_by_name: Map[String, Export_Theory.Theory] = |
451 base.known_theories.map(_._2.name.theory).map(name => name -> read_theory(name)).toMap |
434 (for ((_, entry) <- base.known_theories.iterator) yield { |
|
435 val thy_name = entry.name.theory |
|
436 val theory = |
|
437 if (thy_name == Thy_Header.PURE) Export_Theory.no_theory |
|
438 else { |
|
439 html_context.cache_theory(thy_name, |
|
440 { |
|
441 val qualifier = deps(session).theory_qualifier(thy_name) |
|
442 val provider = |
|
443 Export.Provider.database_context(db_context, List(qualifier), thy_name) |
|
444 if (Export_Theory.read_theory_parents(provider, thy_name).isDefined) { |
|
445 Export_Theory.read_theory(provider, qualifier, thy_name) |
|
446 } |
|
447 else { |
|
448 progress.echo_warning("No theory exports for " + quote(thy_name)) |
|
449 Export_Theory.no_theory |
|
450 } |
|
451 }) |
|
452 } |
|
453 thy_name -> theory |
|
454 }).toMap |
452 |
455 |
453 val theories: List[XML.Body] = |
456 val theories: List[XML.Body] = |
454 { |
457 { |
455 var seen_files = List.empty[(Path, String, Document.Node.Name)] |
458 var seen_files = List.empty[(Path, String, Document.Node.Name)] |
456 |
459 |