chore: update toolchain 10-20 (#86)
parent
153982f982
commit
9aef28b16e
|
@ -35,7 +35,7 @@ def execAuxM : HtmlT LeanInk.AnalysisM UInt32 := do
|
|||
def execAux (config : LeanInk.Configuration) : HtmlT IO UInt32 := do
|
||||
execAuxM.run (←readThe SiteContext) (←readThe SiteBaseContext) |>.run config
|
||||
|
||||
@[implementedBy enableInitializersExecution]
|
||||
@[implemented_by enableInitializersExecution]
|
||||
private def enableInitializersExecutionWrapper : IO Unit := pure ()
|
||||
|
||||
def runInk (sourceFilePath : System.FilePath) : HtmlT IO Unit := do
|
||||
|
|
|
@ -88,7 +88,7 @@ def nameToLink? (s : String) : HtmlM (Option String) := do
|
|||
where
|
||||
-- check if two names have the same ending components
|
||||
sameEnd n1 n2 :=
|
||||
List.zip n1.components' n2.components'
|
||||
List.zip n1.componentsRev n2.componentsRev
|
||||
|>.all λ ⟨a, b⟩ => a == b
|
||||
|
||||
/--
|
||||
|
|
|
@ -16,7 +16,7 @@ def instancesForToHtml (typeName : Name) : HtmlM Html := do
|
|||
</details>
|
||||
|
||||
def ctorToHtml (c : Process.NameInfo) : HtmlM Html := do
|
||||
let shortName := c.name.components'.head!.toString
|
||||
let shortName := c.name.componentsRev.head!.toString
|
||||
let name := c.name.toString
|
||||
if let some doc := c.doc then
|
||||
let renderedDoc ← docStringToHtml doc
|
||||
|
|
|
@ -30,8 +30,6 @@ def argToHtml (arg : Arg) : HtmlM Html := do
|
|||
| BinderInfo.implicit => ("{", "}", true)
|
||||
| BinderInfo.strictImplicit => ("⦃", "⦄", true)
|
||||
| BinderInfo.instImplicit => ("[", "]", true)
|
||||
-- TODO: Can this ever be reached here? What does it mean?
|
||||
| BinderInfo.auxDecl => unreachable!
|
||||
let mut nodes := #[Html.text s!"{l}{arg.name.toString} : "]
|
||||
nodes := nodes.append (←infoFormatToHtml arg.type)
|
||||
nodes := nodes.push r
|
||||
|
|
|
@ -12,7 +12,7 @@ open Lean
|
|||
Render a single field consisting of its documentation, its name and its type as HTML.
|
||||
-/
|
||||
def fieldToHtml (f : Process.NameInfo) : HtmlM Html := do
|
||||
let shortName := f.name.components'.head!.toString
|
||||
let shortName := f.name.componentsRev.head!.toString
|
||||
let name := f.name.toString
|
||||
if let some doc := f.doc then
|
||||
let renderedDoc ← docStringToHtml doc
|
||||
|
@ -37,7 +37,7 @@ def structureToHtml (i : Process.StructureInfo) : HtmlM (Array Html) := do
|
|||
[←i.fieldInfo.mapM fieldToHtml]
|
||||
</ul>)
|
||||
else
|
||||
let ctorShortName := i.ctor.name.components'.head!.toString
|
||||
let ctorShortName := i.ctor.name.componentsRev.head!.toString
|
||||
(<ul class="structure_ext">
|
||||
<li id={i.ctor.name.toString} class="structure_ext_ctor">{s!"{ctorShortName} "} :: (</li>
|
||||
<ul class="structure_ext_fields">
|
||||
|
|
|
@ -78,8 +78,8 @@ def jsxText : Parser :=
|
|||
let s := takeWhile1Fn (not ∘ "[{<>}]$".contains) "expected JSX text" c s
|
||||
mkNodeToken `jsxText startPos c s }
|
||||
|
||||
@[combinatorFormatter DocGen4.Jsx.jsxText] def jsxText.formatter : Formatter := pure ()
|
||||
@[combinatorParenthesizer DocGen4.Jsx.jsxText] def jsxText.parenthesizer : Parenthesizer := pure ()
|
||||
@[combinator_formatter DocGen4.Jsx.jsxText] def jsxText.formatter : Formatter := pure ()
|
||||
@[combinator_parenthesizer DocGen4.Jsx.jsxText] def jsxText.parenthesizer : Parenthesizer := pure ()
|
||||
|
||||
syntax jsxAttrName := rawIdent <|> str
|
||||
syntax jsxAttrVal := str <|> group("{" term "}")
|
||||
|
|
|
@ -64,8 +64,9 @@ instance : ToString InlineAttributeKind where
|
|||
match kind with
|
||||
| InlineAttributeKind.inline => "inline"
|
||||
| InlineAttributeKind.noinline => "noinline"
|
||||
| InlineAttributeKind.macroInline => "macroInline"
|
||||
| InlineAttributeKind.inlineIfReduce => "inlineIfReduce"
|
||||
| InlineAttributeKind.macroInline => "macro_inline"
|
||||
| InlineAttributeKind.inlineIfReduce => "inline_if_reduce"
|
||||
| InlineAttributeKind.alwaysInline => "always_inline"
|
||||
|
||||
open Compiler in
|
||||
instance : ToString SpecializeAttributeKind where
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace DocGen4
|
|||
open Lean Name
|
||||
|
||||
def getNLevels (name : Name) (levels: Nat) : Name :=
|
||||
let components := name.components'
|
||||
let components := name.componentsRev
|
||||
(components.drop (components.length - levels)).reverse.foldl (· ++ ·) Name.anonymous
|
||||
|
||||
inductive Hierarchy where
|
||||
|
|
|
@ -5,7 +5,7 @@ package «doc-gen4»
|
|||
|
||||
lean_lib DocGen4
|
||||
|
||||
@[defaultTarget]
|
||||
@[default_target]
|
||||
lean_exe «doc-gen4» {
|
||||
root := `Main
|
||||
supportInterpreter := true
|
||||
|
|
|
@ -1 +1 @@
|
|||
leanprover/lean4:nightly-2022-10-03
|
||||
leanprover/lean4:nightly-2022-10-20
|
||||
|
|
Loading…
Reference in New Issue