chore: remove workarounds

This commit is contained in:
Leonardo de Moura 2020-10-15 15:34:36 -07:00
parent 4ac1ab4c4b
commit 3cfff9df14
4 changed files with 4 additions and 5 deletions

View file

@ -226,7 +226,7 @@ fun stx => do
let elemsNew := #[]
let modified := false
for elem in stx[1].getArgs do
match (← Lean.expandMacro? elem) with -- TODO: remove workaround
match (← expandMacro? elem) with
| some elemNew => elemsNew := elemsNew.push elemNew; modified := true
| none => elemsNew := elemsNew.push elem
if modified then

View file

@ -131,8 +131,7 @@ else if declKind == `Lean.Parser.Command.«example» then
else
throwError "unexpected kind of definition"
@[init] private def regTraceClasses_1 : IO Unit := do -- TODO: remove _1
registerTraceClass `Elab.definition
initialize registerTraceClass `Elab.definition
end Command
end Lean.Elab

View file

@ -1458,7 +1458,7 @@ partial def doSeqToCode : List Syntax → M CodeBlock
else
mkSeq term <$> doSeqToCode doElems
else
match (← liftMacroM $ Lean.expandMacro? doElem) with -- TODO: remove Lean.
match (← liftMacroM $ expandMacro? doElem) with
| some doElem => doSeqToCode (doElem::doElems)
| none => throwError! "unexpected do-element\n{doElem}"

View file

@ -163,7 +163,7 @@ partial def toParserDescrAux : Syntax → ToParserDescrM Syntax
let d₂ ← withoutLeftRec $ toParserDescrAux stx[2]
`(ParserDescr.orelse $d₁ $d₂)
else
let stxNew? ← liftM (liftMacroM (Lean.expandMacro? stx) : TermElabM _) -- TODO: Remove `Lean.` from `Lean.expandMacro?`
let stxNew? ← liftM (liftMacroM (expandMacro? stx) : TermElabM _)
match stxNew? with
| some stxNew => toParserDescrAux stxNew
| none => throwErrorAt! stx "unexpected syntax kind of category `syntax`: {kind}"