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
In a type like
() -> (Ref^, Ref^)
we need to map the two caps to different existentially bound variables. One could do it with
two binders, like this:
() -> (ex1: Exists) -> (ex2: Exists) -> (Ref^{ex1}, Ref^{ex2})
But that's impractical since we need to guess the number of binders needed for inferred types
where the `cap` occurrences are inferred late. We therefore keep a single binder but use annotated
types for the actual references, like this:
() -> (ex: Exists) -> (Ref^{ex @Existential}, Ref^{ex @Existential})
Each occurrence of @Existential is a fresh annotation. Therefore, the two
capabilities in the previous example count as different.
We need to keep the distinction in one-to-one mappings between Fresh.Cap and
existentials.
TODO: Extend hidden sets and separation checking to existentials. Right now,
subtyping identifies existentials on the same level as mutually subsuming
references. This is incorrect, we need to be more precise here.
0 commit comments