This is a PR to add tuple support to Coalton. Refer to #15. Here are the TODOs:
[x] Add type syntax for tuples (parsing and unparsing). Proposal: (* t1 t2 ... tn)
[x] Allow tuples to be type checked and unified.
[ ] Decide how tuple values are compiled into Lisp. Proposal: simple-vector
[ ] Add syntax for tuple construction. Proposal: not sure
[ ] Add depth-1 pattern matching.
I'm not sure about this one, but...
[ ] Add syntax for tuple projection. (Note that this can't be a generic function taking a generic integer argument. The syntax would have to be special, like (@ <integer> <expr>) e.g. (@ 15 v) which verifies that the value v is a 15-or-fewer tuple.) This might be hard to type check.
This is a PR to add tuple support to Coalton. Refer to #15. Here are the TODOs:
(* t1 t2 ... tn)
simple-vector
I'm not sure about this one, but...
(@ <integer> <expr>)
e.g.(@ 15 v)
which verifies that the valuev
is a 15-or-fewer tuple.) This might be hard to type check.