doc: Output/Definition

main
Henrik Böving 2022-05-19 21:07:44 +02:00
parent bdd4a5f612
commit e0bf4ad28c
1 changed files with 7 additions and 1 deletions

View File

@ -7,12 +7,18 @@ namespace Output
open scoped DocGen4.Jsx
open Lean Widget
/- This is basically an arbitrary number that seems to work okay. -/
/-- This is basically an arbitrary number that seems to work okay. -/
def equationLimit : Nat := 200
def equationToHtml (c : CodeWithInfos) : HtmlM Html := do
pure <li class="equation">[←infoFormatToHtml c]</li>
/--
Attempt to render all `simp` equations for this definition. At a size
defined in `equationLimit` we stop trying since they:
- are too ugly to read most of the time
- take too long
-/
def equationsToHtml (i : DefinitionInfo) : HtmlM (Array Html) := do
if let some eqs := i.equations then
let equationsHtml ← eqs.mapM equationToHtml