Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Add tuple support #17

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Add tuple support #17

wants to merge 1 commit into from

Conversation

stylewarning
Copy link
Owner

This is a PR to add tuple support to Coalton. Refer to #15. Here are the TODOs:

  • Add type syntax for tuples (parsing and unparsing). Proposal: (* t1 t2 ... tn)
  • 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant