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`.
367
+
It stores of the `numAssignments` from that original `MetavarContext`.
368
+
If the `numAssignments` in the `MetavarContext` has increased, we invalidate this cache.
369
+
And when we revert the metavariable context in `checkpointDefEq`, if the `numAssignments`
370
+
in the original `MetavarContext` is smaller than in the cache, we revert the cache to its original.
371
+
-/
372
+
structureDefEqTransCachewhere
373
+
cache : DefEqCache := {}
374
+
numAssignments : Nat := 0
375
+
deriving Inhabited
376
+
365
377
/--
366
378
Cache datastructures for type inference, type class resolution, whnf, and definitional equality.
367
379
-/
@@ -370,7 +382,7 @@ structure Cache where
370
382
funInfo : FunInfoCache := {}
371
383
synthInstance : SynthInstanceCache := {}
372
384
whnf : WhnfCache := {}
373
-
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`.
385
+
defEqTrans : DefEqTransCache := {}-- transient cache for terms containing mvars or using nonstandard configuration options, it is valid as long as the count matches `MetavarContext.numAssignments`.
374
386
defEqPerm : DefEqCache := {} -- permanent cache for terms not containing mvars and using standard configuration options
375
387
deriving Inhabited
376
388
@@ -629,9 +641,9 @@ def resetCache : MetaM Unit :=
0 commit comments