The top-down analyzer is an optional preprocessor to the delaborator that aims to determine the minimal annotations necessary to ensure that the delaborated expression can be re-elaborated correctly. Currently, the top-down analyzer is neither sound nor complete: there may be edge-cases in which the expression can still not be re-elaborated correctly, and it may also add many annotations that are not strictly necessary.
Equations
- Lean.getPPAnalyze o = Lean.KVMap.get o Lean.pp.analyze.name Lean.pp.analyze.defValue
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.getPPAnalyzeTrustId o = Lean.KVMap.get o Lean.pp.analyze.trustId.name Lean.pp.analyze.trustId.defValue
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.getPPAnalyzeOmitMax o = Lean.KVMap.get o Lean.pp.analyze.omitMax.name Lean.pp.analyze.omitMax.defValue
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.getPPAnalysisSkip o = Lean.KVMap.get o `pp.analysis.skip false
Instances For
Equations
- Lean.getPPAnalysisHole o = Lean.KVMap.get o `pp.analysis.hole false
Instances For
Equations
- Lean.getPPAnalysisNamedArg o = Lean.KVMap.get o `pp.analysis.namedArg false
Instances For
Equations
- Lean.getPPAnalysisLetVarType o = Lean.KVMap.get o `pp.analysis.letVarType false
Instances For
Equations
- Lean.getPPAnalysisNeedsType o = Lean.KVMap.get o `pp.analysis.needsType false
Instances For
Equations
- Lean.getPPAnalysisBlockImplicit o = Lean.KVMap.get o `pp.analysis.blockImplicit false
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.returnsPi motive = Lean.Meta.lambdaTelescope motive fun x b => pure (Lean.Expr.isForall b)
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.isNonConstFun (Lean.Expr.lam binderName binderType b binderInfo) = Lean.PrettyPrinter.Delaborator.isNonConstFun b
- Lean.PrettyPrinter.Delaborator.isNonConstFun motive = pure (Lean.Expr.hasLooseBVars motive)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.isFOLike motive = let f := Lean.Expr.getAppFn motive; pure (Lean.Expr.isFVar f || Lean.Expr.isConst f)
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.isIdLike arg = match arg with | Lean.Expr.lam binderName binderType (Lean.Expr.bvar deBruijnIndex) binderInfo => true | x => false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.isDefEqAssigning
(t : Lean.Expr)
(s : Lean.Expr)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.isHigherOrder type = Lean.Meta.forallTelescopeReducing type fun xs b => pure (decide (Array.size xs > 0) && Lean.Expr.isSort b)
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.isFunLike e = do let __do_lift ← Lean.Meta.inferType e Lean.Meta.forallTelescopeReducing __do_lift fun xs x => pure (decide (Array.size xs > 0))
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.isSubstLike e = (Lean.Expr.isAppOfArity e `Eq.ndrec 6 || Lean.Expr.isAppOfArity e `Eq.rec 6)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.nameNotRoundtrippable.containsNum (Lean.Name.str p str) = Lean.PrettyPrinter.Delaborator.TopDownAnalyze.nameNotRoundtrippable.containsNum p
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.nameNotRoundtrippable.containsNum (Lean.Name.num pre i) = true
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.nameNotRoundtrippable.containsNum Lean.Name.anonymous = false
Instances For
Equations
- Lean.PrettyPrinter.Delaborator.TopDownAnalyze.mvarName mvar = do let __do_lift ← Lean.MVarId.getDecl (Lean.Expr.mvarId! mvar) pure __do_lift.userName
Instances For
Instances For
- knowsType : Bool
- knowsLevel : Bool
- inBottomUp : Bool
- parentIsApp : Bool
- subExpr : Lean.SubExpr
Instances For
Equations
- One or more equations did not get rendered due to their size.
- annotations : Lean.PrettyPrinter.Delaborator.OptionsPerPos
Instances For
@[inline, reducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.inspectOutParams
(arg : Lean.Expr)
(mvar : Lean.Expr)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.withKnowing
{α : Type}
(knowsType : Bool)
(knowsLevel : Bool)
(x : Lean.PrettyPrinter.Delaborator.TopDownAnalyze.AnalyzeM α)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.annotateBoolAt
(n : Lake.Name)
(pos : Lean.SubExpr.Pos)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline, reducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.analyze
(parentIsApp : optParam Bool false)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.analyzeAppStagedCore.applyFunBinderHeuristic.core
(args : Array Lean.Expr)
(mvars : Array Lean.Expr)
(bInfos : Array Lean.BinderInfo)
(argIdx : Nat)
(mvarType : Lean.Expr)
:
def
Lean.PrettyPrinter.Delaborator.TopDownAnalyze.analyzeAppStagedCore.annotateNamedArg
(n : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.