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

Simplify the syntax of row types #179

Closed
yannham opened this issue Oct 26, 2020 · 0 comments · Fixed by #182
Closed

Simplify the syntax of row types #179

yannham opened this issue Oct 26, 2020 · 0 comments · Fixed by #182
Assignees

Comments

@yannham
Copy link
Member

yannham commented Oct 26, 2020

Is your feature request related to a problem? Please describe.
The syntax of record and enum types is verbose. A few examples:

{ {| a: Num |} }
forall r. { {| a: Num, b: Str | r} }
< (| tag1 |) >
forall r. < (| tag1, tag2 | r) >

Describe the solution you'd like
Get rid of the unnecessary inner delimiters {| |} and (| |). Only use the pipe to separate fields from the polymorphic tail. This is for example the syntax of records in PureScript, although they use :: for typing, as in Haskell.

The examples would become:

{a: Num}
forall r. {a: Num, b: Str | r}
<tag1>
forall r. <tag1, tag2 | r>
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 a pull request may close this issue.

1 participant