to be clear, I am talking specifically about rustc right now

chalk has a slightly different approach, though it still involves a concept of normalizing

we call this "eager normalization" because, in rustc, we have to do it whenever we bring types "into scope" -- this context of "into scope" is not very clear, I realize, I'm not sure the best way to describe it.

so e.g. in an extreme case if you have <?X as Iterator>::Item, we can't normalize it yet -- we don't know what impl it will be

the way we handle that today is that we create an inference variable to represent the result (?R) and then we add a pending obligation that says Normalize(<?X as Iterator>::Item -> ?R), essentially, to use a chalk-like notation

but we never try to return data out of them

You say "equal" a higher-ranked region, but isn't it like nesting scopes?

to circle back to this...

the idea of unvierses then is pretty simple, basically you have a counter that tracks the scopes you are in, and when you "enter" a for<'a> scope, you increment this counter -- that's called a new universe

anyway I kind of feel like I'm re-covering stuff that I actually tried to write up in the rustc-guide, I'm trying to decide whihc points I want to emphasize...

...but if this is useful, I can kind of keep going :)

right, so in the new model, as you are going about, you sometimes enter a new scope -- this corresponds to kind of "entering" a forall. you are kind of tracking the innermost universe at this point in time

normally, the subtyping check just generates constraints that feed into region inference later

I guess I can explain that a bit too

currently when we do operations on types we divide into two phases: the first check compares the "skelton" of the type and generates "region constraints", and then the second phase processes those constraints (region inference)

I think though that we could restore the older behavior if needed by modifying coherence

That said, there are reasons to prefer the newer behavior

ok, I think I'm going to leave this dissertation here for the moment. I'd encourage people to check out the rustc-guide chapter -- I think it's a more organized presentation than the one I gave here. In any case, I didn't get to the tricky bits I had hope to talk about, but maybe I'll do some investigation and we can discuss next time.