Skip to content

Commit 494cc23

Browse files
Clean unused variables
1 parent 7392ec2 commit 494cc23

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

REPL/Extract/Declaration.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Inspired by <https://github.com/frenzymath/jixia>
1111
/-- See `Lean.Parser.Command.declModifiers` and `Lean.Elab.elabModifiers` -/
1212
def getModifiers (stx : Syntax) (ctx: ContextInfo): DeclModifiers :=
1313
match stx with
14-
| .node _ ``Command.declModifiers args =>
14+
| .node _ ``Command.declModifiers _ =>
1515
{ docString := stx[0].getOptional?.map (fun stx =>
1616
{ content := stx.prettyPrint.pretty, range := stx.toRange ctx }),
1717
visibility := (stx[2].getOptional?.map (·.prettyPrint.pretty.trim)).getD "regular",
@@ -52,7 +52,7 @@ def toBinderViews (stx : Syntax) : Array BinderView :=
5252
-- `(` binderIdent+ binderType (binderDefault <|> binderTactic)? `)`
5353
let ids := getBinderIds stx[1]
5454
let type := stx[2]
55-
let optModifier := stx[3]
55+
-- let optModifier := stx[3]
5656
ids.map fun id => { id := (expandBinderIdent id), type := (expandBinderType id type), binderInfo := "default" }
5757
else if k == ``Lean.Parser.Term.implicitBinder then
5858
-- `{` binderIdent+ binderType `}`
@@ -148,15 +148,14 @@ partial def extractDeclarationInfo (cmdInfo : CommandInfo) (infoTree : InfoTree)
148148
| [] => name
149149
| a :: _ => a
150150

151-
let binderViews := binders.getArgs.flatMap toBinderViews
152151
let binders : Option DeclBinders := match binders.getArgs with
153152
| #[] => none
154153
| _ => some { pp := binders.prettyPrint.pretty,
155154
groups := binders.getArgs.map (·.prettyPrint.pretty),
156155
map := binders.getArgs.flatMap toBinderViews,
157156
range := binders.toRange ctx }
158157

159-
let a := prevState.env.constants.find! decl[1].getId
158+
-- let a := prevState.env.constants.find! decl[1].getId
160159
-- a.getUsedConstantsAsSet
161160

162161
let extractConstants (stx : Syntax) : Array Name := -- TODO: improve this

0 commit comments

Comments
 (0)