Fix diff nits

main
Siddharth Bhat 2022-04-07 00:53:06 +01:00
parent 10ed2d489d
commit 4bc149a1fb
2 changed files with 2 additions and 4 deletions

View File

@ -91,7 +91,7 @@ def htmlOutput (result : AnalyzerResult) (ws : Lake.Workspace) (leanHash: String
FS.createDirAll (basePath / "semantic") FS.createDirAll (basePath / "semantic")
let mut declList := #[] let mut declList := #[]
for (module, mod) in result.moduleInfo.toArray do for (_, mod) in result.moduleInfo.toArray do
for decl in filterMapDocInfo mod.members do for decl in filterMapDocInfo mod.members do
let name := decl.getName.toString let name := decl.getName.toString
let config := { config with depthToRoot := 2 } let config := { config with depthToRoot := 2 }

View File

@ -40,14 +40,12 @@ def templateExtends {α β : Type} (base : α → HtmlM β) (new : HtmlM α) : H
def moduleNameToLink (n : Name) : HtmlM String := do def moduleNameToLink (n : Name) : HtmlM String := do
let parts := n.components.map Name.toString let parts := n.components.map Name.toString
pure $ (<- getRoot) ++ (parts.intersperse "/").foldl (. ++ ·) "" ++ ".html" pure $ (← getRoot) ++ (parts.intersperse "/").foldl (· ++ ·) "" ++ ".html"
def moduleNameToFile (basePath : FilePath) (n : Name) : FilePath := def moduleNameToFile (basePath : FilePath) (n : Name) : FilePath :=
let parts := n.components.map Name.toString let parts := n.components.map Name.toString
FilePath.withExtension (basePath / parts.foldl (· / ·) (FilePath.mk ".")) "html" FilePath.withExtension (basePath / parts.foldl (· / ·) (FilePath.mk ".")) "html"
def moduleNameToDirectory (basePath : FilePath) (n : Name) : FilePath := def moduleNameToDirectory (basePath : FilePath) (n : Name) : FilePath :=
let parts := n.components.dropLast.map Name.toString let parts := n.components.dropLast.map Name.toString
basePath / parts.foldl (· / ·) (FilePath.mk ".") basePath / parts.foldl (· / ·) (FilePath.mk ".")