chore: remove unused variables
parent
ed4cee2eae
commit
04387711de
|
@ -44,7 +44,7 @@ partial def xmlGetHeadingId (el : Xml.Element) : String :=
|
|||
elementToPlainText el |> replaceCharSeq unicodeToDrop "-"
|
||||
where
|
||||
elementToPlainText el := match el with
|
||||
| (Element.Element name attrs contents) =>
|
||||
| (Element.Element _ _ contents) =>
|
||||
"".intercalate (contents.toList.map contentToPlainText)
|
||||
contentToPlainText c := match c with
|
||||
| Content.Element el => elementToPlainText el
|
||||
|
@ -138,7 +138,6 @@ def addHeadingAttributes (el : Element) (modifyElement : Element → HtmlM Eleme
|
|||
def extendAnchor (el : Element) : HtmlM Element := do
|
||||
match el with
|
||||
| Element.Element name attrs contents =>
|
||||
let root ← getRoot
|
||||
let newAttrs ← match (attrs.find? "href").map extendLink with
|
||||
| some href => href.map (attrs.insert "href")
|
||||
| none => pure attrs
|
||||
|
|
|
@ -14,10 +14,10 @@ open Lean Meta Widget
|
|||
|
||||
partial def stripArgs (e : Expr) : Expr :=
|
||||
match e.consumeMData with
|
||||
| Expr.lam name type body data =>
|
||||
| Expr.lam name _ body _ =>
|
||||
let name := name.eraseMacroScopes
|
||||
stripArgs (Expr.instantiate1 body (mkFVar ⟨name⟩))
|
||||
| Expr.forallE name type body data =>
|
||||
| Expr.forallE name _ body _ =>
|
||||
let name := name.eraseMacroScopes
|
||||
stripArgs (Expr.instantiate1 body (mkFVar ⟨name⟩))
|
||||
| _ => e
|
||||
|
@ -28,7 +28,6 @@ def processEq (eq : Name) : MetaM CodeWithInfos := do
|
|||
prettyPrintTerm final
|
||||
|
||||
def valueToEq (v : DefinitionVal) : MetaM Expr := withLCtx {} {} do
|
||||
let env ← getEnv
|
||||
withOptions (tactic.hygienic.set . false) do
|
||||
lambdaTelescope v.value fun xs body => do
|
||||
let us := v.levelParams.map mkLevelParam
|
||||
|
|
|
@ -20,7 +20,6 @@ def getConstructorType (ctor : Name) : MetaM Expr := do
|
|||
|
||||
def InductiveInfo.ofInductiveVal (v : InductiveVal) : MetaM InductiveInfo := do
|
||||
let info ← Info.ofConstantVal v.toConstantVal
|
||||
let env ← getEnv
|
||||
let ctors ← v.ctors.mapM (λ name => do NameInfo.ofTypedName name (←getConstructorType name))
|
||||
pure <| InductiveInfo.mk info ctors v.isUnsafe
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ def dropArgs (type : Expr) (n : Nat) : (Expr × List (Name × Expr)) :=
|
|||
let body := body.instantiate1 <| mkFVar ⟨name⟩
|
||||
let next := dropArgs body x
|
||||
{ next with snd := (name, type) :: next.snd}
|
||||
| e, x + 1 => panic! s!"No forallE left"
|
||||
| _e, _x + 1 => panic! s!"No forallE left"
|
||||
|
||||
def getFieldTypes (struct : Name) (ctor : ConstructorVal) (parents : Nat) : MetaM (Array NameInfo) := do
|
||||
let type := ctor.type
|
||||
let (fieldFunction, params) := dropArgs type (ctor.numParams + parents)
|
||||
let (fieldFunction, _) := dropArgs type (ctor.numParams + parents)
|
||||
let (_, fields) := dropArgs fieldFunction (ctor.numFields - parents)
|
||||
let mut fieldInfos := #[]
|
||||
for (name, type) in fields do
|
||||
|
|
|
@ -33,7 +33,7 @@ def runSingleCmd (p : Parsed) : IO UInt32 := do
|
|||
pure 0
|
||||
| Except.error rc => pure rc
|
||||
|
||||
def runIndexCmd (p : Parsed) : IO UInt32 := do
|
||||
def runIndexCmd (_p : Parsed) : IO UInt32 := do
|
||||
let hierarchy ← Hierarchy.fromDirectory basePath
|
||||
let baseConfig := getSimpleBaseContext hierarchy
|
||||
htmlOutputIndex baseConfig
|
||||
|
|
Loading…
Reference in New Issue