perf: cache inferConstType
This commit is contained in:
parent
50b6561f8f
commit
322fc79d84
1 changed files with 2 additions and 1 deletions
|
|
@ -179,7 +179,8 @@ private def inferFVarType (fvarId : FVarId) : MetaM Expr := do
|
|||
|
||||
def inferTypeImp (e : Expr) : MetaM Expr :=
|
||||
let rec infer : Expr → MetaM Expr
|
||||
| Expr.const c lvls _ => inferConstType c lvls
|
||||
| Expr.const c [] _ => inferConstType c []
|
||||
| Expr.const c us _ => checkInferTypeCache e (inferConstType c us)
|
||||
| e@(Expr.proj n i s _) => checkInferTypeCache e (inferProjType n i s)
|
||||
| e@(Expr.app f _ _) => checkInferTypeCache e (inferAppType f.getAppFn e.getAppArgs)
|
||||
| Expr.mvar mvarId _ => inferMVarType mvarId
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue