2022-01-06 13:28:41 +00:00
|
|
|
import DocGen4.Output.Template
|
|
|
|
import DocGen4.Output.Structure
|
2022-05-19 22:36:43 +00:00
|
|
|
import DocGen4.Process
|
2022-01-06 13:28:41 +00:00
|
|
|
|
|
|
|
namespace DocGen4
|
|
|
|
namespace Output
|
|
|
|
|
|
|
|
open scoped DocGen4.Jsx
|
2022-01-06 13:51:46 +00:00
|
|
|
open Lean
|
|
|
|
|
2022-02-04 21:48:08 +00:00
|
|
|
def classInstanceToHtml (name : Name) : HtmlM Html := do
|
2022-05-19 19:40:22 +00:00
|
|
|
pure <li>{←declNameToHtmlLink name}</li>
|
2022-01-06 13:51:46 +00:00
|
|
|
|
2022-02-06 19:14:36 +00:00
|
|
|
def classInstancesToHtml (instances : Array Name) : HtmlM Html := do
|
|
|
|
let instancesHtml ← instances.mapM classInstanceToHtml
|
2022-02-12 14:09:13 +00:00
|
|
|
pure
|
|
|
|
<details «class»="instances">
|
2022-01-06 13:51:46 +00:00
|
|
|
<summary>Instances</summary>
|
|
|
|
<ul>
|
|
|
|
[instancesHtml]
|
|
|
|
</ul>
|
|
|
|
</details>
|
2022-01-06 13:28:41 +00:00
|
|
|
|
2022-05-19 22:36:43 +00:00
|
|
|
def classToHtml (i : Process.ClassInfo) : HtmlM (Array Html) := do
|
2022-02-19 19:14:58 +00:00
|
|
|
pure $ (←structureToHtml i.toStructureInfo)
|
2022-01-06 13:28:41 +00:00
|
|
|
|
|
|
|
end Output
|
|
|
|
end DocGen4
|