-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Allow existential types introduced in a constructor pattern to be bound without tuple type constraints patterns #11491
Comments
When I needed a locally abstract type like this, I found myself naturally reaching out for the |
Not really an answer to this issue, but it may help to consider the history of this fairly-recent feature, that prominently features syntax discussions. (Basically: this syntax is a bit annoying on users but also very predictable and simple to implement, so it managed to gather consensus when more convenient and complex proposals did not.)
Some examples of syntaxes that have been considered in the process: let f = function type b. D ((x:b), f) -> f x
function D (type a) (x, f) -> f x (* using definition order for existential variables *)
let f (type b) (D ((x: b), f)) = ...
fun (C : type a b. a * (a -> b list) -> t. (x, f)) -> ...
fun (C (type a b) ((x : a), (f : a -> b list))) -> ...
function 'a. C ((x : 'a), f) -> ...
function <'a> Dyn (w,(x:'a)) -> ...
function Dyn (type a) (w, x : a ty * a) -> ...
function Dyn (type a) ((w : a ty), (x : a)) -> Generally:
|
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
I am moving this feature wish to a discussion, since this is not really planned (and as far as I remember possibly much harder to implement that it looks). |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Currently, if we have this:
We will get an error:
This is the only correct way:
It would be nice if we could do this both ways.
The text was updated successfully, but these errors were encountered: