We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 a short-hand to the language append fields to a record. For example, given
val emps = [ {comm=0.0,deptno=20,empno=7369,ename="SMITH",hiredate="1980-12-16", job="CLERK",mgr=7902,sal=800.0}, ... ] : {comm:real, deptno:int, empno:int, ename:string, hiredate:string, job:string, mgr:int, sal:real} list;
suppose we wish to add a new column remuneration = comm + sal. Currently we would define a 'view' function
remuneration = comm + sal
fun emps2 () = from e in emps yield {e.comm, e.deptno, e.empno, e.ename, e.hiredate, e.job, e.mgr, e.sal, remuneration = e.sal + e.comm};
but syntactic sugar such as the following would be helpful:
fun emps2 () = from e in emps yield {e.*, remuneration = e.sal + e.comm};
The text was updated successfully, but these errors were encountered:
In order to derive a type for {e.*, remuneration = e.sal + e.com} we will need to add row polymorphism to our type system.
{e.*, remuneration = e.sal + e.com}
Sorry, something went wrong.
No branches or pull requests
Add a short-hand to the language append fields to a record. For example, given
suppose we wish to add a new column
remuneration = comm + sal
. Currently we would define a 'view' functionbut syntactic sugar such as the following would be helpful:
The text was updated successfully, but these errors were encountered: