fix: bug at declare_config_elab
This commit is contained in:
parent
e69e469a37
commit
bb2df569bc
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
2
tests/lean/run/declareConfigElabIssue.lean
Normal file
2
tests/lean/run/declareConfigElabIssue.lean
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
example : True := by
|
||||
simp (config := (fun (c : Lean.Meta.Simp.Config) => { c with arith := true }) {})
|
||||
Loading…
Add table
Reference in a new issue