-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add type mechanism for single value list expressions #70
Comments
…on that returns a single (optional) Value. Applied it to a small set of cases.
In 94a8d2a I have added a Some things to consider:
|
Looks pretty good! One thing, code like this is becoming a bit weird to look at (pasted from a test) : def("d", last(len(last(ref("c"))))) We might want to introduce |
But len would also become a single value expression, right? But for other cases, another option would be to introduce shorthand overloads for expressions instead, e.g.: ValueExpression offset(ValueExpression)
SingleValueExpression offset(SingleValueExpression) For full support of compiler. In any case, this is looking good 😄 |
…f Def to SingleValueExpression, along with all dependencies.
#283 is merged, so issue closed (no autoclose it seems because it was merged through another branch/PR first...) |
…lueExpression. Discovered when preparing for #285.
…lueExpression. Discovered when preparing for #285.
Examples: In
Def
andNod
thesize
expression needs to evaluate to a list with a single value. Parsing will fail otherwise.RepN
needs a list with a single value for itsn
argument.Is there a way to enforce this using the type system?
The text was updated successfully, but these errors were encountered: