-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminology question #474
Comments
I normally refer to them as existential types. They are basically the same thing as refinement types, but I think the syntax is a bit different than a typical presentation of refinement types, as they are stated as "there exists these type variables such that..." rather than as a refinement. Note that
are the same, which corresponds to |
This should be |
OK decision made, I will keep calling them existential types. Sail programs would be infinitely more |
The |
I'm not 100% sure I fully understand what that means. The function space constructor is contravariant in the first argument, so how does the semantics work? |
Now that we are talking about the relationship of Are there clear syntactic restrictions? |
There currently aren't any clear syntactic restrictions, other than that If we had function subtyping, then |
Interesting! Does that mean |
If you need to quantify over both an input type and an output type you still need it, |
Sail offers types of the form
{'tv1 'tv2 ... 'tvn, constraints. t}
. In the refinement type literature those have been given many names (e.g. constrained type, predicate subtype, subtype, subset, refined sorts and refinement predicate). I have been calling them existential types, but that may be misleading as there is no clear duality with Sail'sforall
. What's the preferred term in the Sail community? Patrick Rondon, in his PhD work which introduced liquid types, calls them "refinement types", but liquid types don't encompass all of refinement types. I think we should standardise, especially as there is now a lot of work in this direction, including Liquid Haskell, and Liquid Rust.I'm asking because having an agreed upon term is a first step towards better explaining how they work in Sail. We could even have a corresponding entry in https://alasdair.github.io/ (that I would be happy to write).
The text was updated successfully, but these errors were encountered: