chore: update compiler version

main
Henrik Böving 2022-01-15 15:35:52 +01:00
parent 1edf4bbdab
commit 735bfa35a7
3 changed files with 7 additions and 12 deletions

View File

@ -11,9 +11,8 @@ namespace DocGen4
open Lean Std Name
def getNLevels (name : Name) (levels: Nat) : Name :=
let components := name.components'
(components.drop (components.length - levels)).reverse.foldl (· ++ ·) Name.anonymous
where
components := name.components'
inductive Hierarchy where
| node (name : Name) (isFile : Bool) (children : RBNode Name (λ _ => Hierarchy)) : Hierarchy
@ -54,8 +53,6 @@ partial def insert! (h : Hierarchy) (n : Name) : Hierarchy := Id.run $ do
let hn := h.getName
let mut cs := h.getChildren
assert! getNumParts hn ≤ getNumParts n
if getNumParts hn + 1 == getNumParts n then
match cs.find Name.cmp n with
| none =>

View File

@ -38,14 +38,12 @@ def moduleNameToLink (n : Name) : HtmlM String := do
(←getRoot) ++ (parts.intersperse "/").foldl (· ++ ·) "" ++ ".html"
def moduleNameToFile (basePath : FilePath) (n : Name) : FilePath :=
let parts := n.components.map Name.toString
FilePath.withExtension (basePath / parts.foldl (· / ·) (FilePath.mk ".")) "html"
where
parts := n.components.map Name.toString
def moduleNameToDirectory (basePath : FilePath) (n : Name) : FilePath :=
let parts := n.components.dropLast.map Name.toString
basePath / parts.foldl (· / ·) (FilePath.mk ".")
where
parts := n.components.dropLast.map Name.toString
section Static
def styleCss : String := include_str "./static/style.css"

View File

@ -1 +1 @@
leanprover/lean4:nightly-2022-01-04
leanprover/lean4:nightly-2022-01-15