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
We've been keeping each `module type of` expression's expansion around, even in
the nominally unexpanded version of the type. This was needed in case the
expression was invalidated so that we had the expansion on hand as a fallback.
However, it led to exponential blowup in the case of deeply nested `module type
of`s.
Happily, we can do without the expansion if we do a little more work when
substituting: We already track in the `subst` which module paths have been
invalidated. When we need to invalidate a module path, we can stash the
expression for the module's type in that `subst`. This is effectively the same
data that we were keeping in the "unexpanded" expansion. And then when we need
to expand an invalidated `module type of`, we can use the stashed expression.
0 commit comments