You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A `DefEqTransCache` is a `DefEqCache` that is only valid in the original `MetavarContext`.
381
+
It stores of the `numAssignments` from that original `MetavarContext`.
382
+
If the `numAssignments` in the `MetavarContext` has increased, we invalidate this cache.
383
+
And when we revert the metavariable context in `checkpointDefEq`, if the `numAssignments`
384
+
in the original `MetavarContext` is smaller than in the cache, we revert the cache to its original.
385
+
-/
386
+
structureDefEqTransCachewhere
387
+
cache : DefEqCache := {}
388
+
numAssignments : Nat := 0
389
+
deriving Inhabited
390
+
379
391
/--
380
392
Cache datastructures for type inference, type class resolution, whnf, and definitional equality.
381
393
-/
@@ -384,7 +396,7 @@ structure Cache where
384
396
funInfo : FunInfoCache := {}
385
397
synthInstance : SynthInstanceCache := {}
386
398
whnf : WhnfCache := {}
387
-
defEqTrans : DefEqCache × Nat := ({}, 0)-- transient cache for terms containing mvars or using nonstandard configuration options, it is valid as long as the count matches `MetavarContext.numAssignments`.
399
+
defEqTrans : DefEqTransCache := {}-- transient cache for terms containing mvars or using nonstandard configuration options, it is valid as long as the count matches `MetavarContext.numAssignments`.
388
400
defEqPerm : DefEqCache := {} -- permanent cache for terms not containing mvars and using standard configuration options
389
401
deriving Inhabited
390
402
@@ -646,9 +658,9 @@ def resetCache : MetaM Unit :=
0 commit comments