chore: generalize withDeclId

This commit is contained in:
Leonardo de Moura 2020-07-10 14:07:55 -07:00
parent e26ec036ba
commit c8636f2bf7

View file

@ -636,7 +636,7 @@ else
let optUnivDeclStx := declId.getArg 1;
(id, optUnivDeclStx)
@[inline] def withDeclId (declId : Syntax) (f : Name → CommandElabM Unit) : CommandElabM Unit := do
def withDeclId {α} (declId : Syntax) (f : Name → CommandElabM α) : CommandElabM α := do
-- ident >> optional (".{" >> sepBy1 ident ", " >> "}")
let (id, optUnivDeclStx) := expandDeclId declId;
savedLevelNames ← getLevelNames;