fix: bug at declare_config_elab

This commit is contained in:
Leonardo de Moura 2022-04-18 14:56:22 -07:00
parent e69e469a37
commit bb2df569bc
2 changed files with 6 additions and 2 deletions

View file

@ -16,9 +16,11 @@ macro "declare_config_elab" elabName:ident type:ident : command =>
if optConfig.isNone then
return { : $type }
else
withoutModifyingState <| withLCtx {} {} <| withSaveInfoContext <| Term.withSynthesize do
let c ← withoutModifyingState <| withLCtx {} {} <| withSaveInfoContext <| Term.withSynthesize do
let c ← Term.elabTermEnsuringType optConfig[0][3] (Lean.mkConst ``$type)
eval (← instantiateMVars c)
Term.synthesizeSyntheticMVarsNoPostponing
instantiateMVars c
eval c
)
end Lean.Elab.Tactic

View file

@ -0,0 +1,2 @@
example : True := by
simp (config := (fun (c : Lean.Meta.Simp.Config) => { c with arith := true }) {})