Skip to content
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

Alternative notation for tuples and records, using bars instead of commas #46

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mikeshulman
Copy link
Owner

This is a proposal. I'm not 100% set on it yet, but in doing some more substantive coding with records I wasn't entirely happy with the current notation when it spans over multiple lines, and I think I like this better. This change allows you to write

def Magma : Type ≔ sig (
| t : Type
| op : t → t → t
)

and

def nat.magma : Magma ≔ (
| t ≔ ℕ
| op ≔ plus
)

the bars paralleling the notation for data, codata, match, and comatch. Commas are still also allowed; I prefer them for short inline tuples like (0,0).

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

Successfully merging this pull request may close these issues.

1 participant