-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
area - type checkerRelated to the type checkerRelated to the type checkerkind - featureNew feature or requestNew feature or requesttriage - acceptedThis will be worked on as soon as possibleThis will be worked on as soon as possibletriage - investigatingExtra attention is neededExtra attention is needed
Description
Right now, there is no way to explicitly mark anything as polymorphic. There really should be.
I was thinking it could look like this (I made up the syntax for function types. see #226):
first : newvar(a){ (a, a) => a } = fn(x, y) => x;
this should also work.
first := newvar(a){ fn(x : a, y : a) => x };
and some sugar to make it nicer:
first := fn<:a:>(x : a, y : a) => x;
Functionally, newvar expressions would function as a scoped declaration, and evaluate to what's between the braces.
Actually, they wouldn't quite be expressions, because they can appear in type terms. They are more like 'meta expressions', which would be evaluated during ct_eval, I suppose.
Metadata
Metadata
Assignees
Labels
area - type checkerRelated to the type checkerRelated to the type checkerkind - featureNew feature or requestNew feature or requesttriage - acceptedThis will be worked on as soon as possibleThis will be worked on as soon as possibletriage - investigatingExtra attention is neededExtra attention is needed