fix: use metavariable local context
This commit is contained in:
parent
70bab68dc0
commit
7a556d8f61
2 changed files with 3 additions and 3 deletions
|
|
@ -30,9 +30,8 @@ pure mvarDecl.type
|
|||
def ppGoal (mvarId : MVarId) : MetaM Format := do
|
||||
env ← getEnv;
|
||||
mctx ← getMCtx;
|
||||
lctx ← getLCtx;
|
||||
opts ← getOptions;
|
||||
pure $ ppGoal env mctx lctx opts mvarId
|
||||
pure $ ppGoal env mctx opts mvarId
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit :=
|
||||
registerTraceClass `Meta.Tactic
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@ import Init.Lean.Util.PPExt
|
|||
|
||||
namespace Lean
|
||||
|
||||
def ppGoal (env : Environment) (mctx : MetavarContext) (lctx : LocalContext) (opts : Options) (mvarId : MVarId) : Format :=
|
||||
def ppGoal (env : Environment) (mctx : MetavarContext) (opts : Options) (mvarId : MVarId) : Format :=
|
||||
match mctx.findDecl? mvarId with
|
||||
| none => "unknown goal"
|
||||
| some mvarDecl =>
|
||||
let indent := 2; -- Use option
|
||||
let lctx := mvarDecl.lctx;
|
||||
let pp (e : Expr) : Format := ppExpr env mctx lctx opts e;
|
||||
let instMVars (e : Expr) : Expr := (mctx.instantiateMVars e).1;
|
||||
let addLine (fmt : Format) : Format := if fmt.isNil then fmt else fmt ++ Format.line;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue