Skip to content

Commit

Permalink
chore: correct lifting constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
hargoniX committed Jul 13, 2024
1 parent 5b01e7c commit a9949bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion DocGen4/Output/Base.lean
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ This is untyped so HtmlM and BaseHtmlM can be mixed.
def templateExtends {α β} {m} [Bind m] (base : α → m β) (new : m α) : m β :=
new >>= base

def templateLiftExtends {α β} {m n} [Bind m] [MonadLift n m] (base : α → n β) (new : m α) : m β :=
def templateLiftExtends {α β} {m n} [Bind m] [MonadLiftT n m] (base : α → n β) (new : m α) : m β :=
new >>= (monadLift ∘ base)
/--
Returns the doc-gen4 link to a module name.
Expand Down
3 changes: 0 additions & 3 deletions DocGen4/Output/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ def moduleToHtml (module : Process.Module) : HtmlM Html := withTheReader SiteBas
let relevantMembers := module.members.filter Process.ModuleMember.shouldRender
let memberDocs ← relevantMembers.mapM (moduleMemberToHtml module.name)
let memberNames := filterDocInfo relevantMembers |>.map DocInfo.getName
letI : MonadLift BaseHtmlM HtmlM := {
monadLift := fun x => do return x.run (← readThe SiteBaseContext)
}
templateLiftExtends (baseHtmlGenerator module.name.toString) <| pure #[
← internalNav memberNames module.name,
Html.element "main" false #[] memberDocs
Expand Down

0 comments on commit a9949bf

Please sign in to comment.