feat: add Meta.ppExpr
This commit is contained in:
parent
c3d91e4228
commit
f28def6c5e
1 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import Lean.Class
|
|||
import Lean.ReducibilityAttrs
|
||||
import Lean.Util.Trace
|
||||
import Lean.Util.RecDepth
|
||||
import Lean.Util.PPExt
|
||||
import Lean.Compiler.InlineAttrs
|
||||
import Lean.Meta.Exception
|
||||
import Lean.Meta.TransparencyMode
|
||||
|
|
@ -958,6 +959,16 @@ def dependsOn (e : Expr) (fvarId : FVarId) : m Bool := liftMetaM do
|
|||
mctx ← getMCtx;
|
||||
pure $ mctx.exprDependsOn e fvarId
|
||||
|
||||
def ppExprImp (e : Expr) : MetaM Format := do
|
||||
env ← getEnv;
|
||||
mctx ← getMCtx;
|
||||
lctx ← getLCtx;
|
||||
opts ← getOptions;
|
||||
pure $ Lean.ppExpr env mctx lctx opts e
|
||||
|
||||
def ppExpr (e : Expr) : m Format :=
|
||||
liftMetaM $ ppExprImp e
|
||||
|
||||
end Methods
|
||||
end Meta
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue