dannypsnl/violet
2
8
Fork
You've already forked violet
0

redesign record surface syntax #47

Merged
dannypsnl merged 1 commit from record into main 2026年06月12日 05:59:31 +02:00

A record lives in { }; one field rule everywhere: name => value, and fields are separated by |.

  • construct: { fst => a | snd => b }, pun { x | y }, empty {}
  • update: { base \with fst => a }
  • field params: f x => body is sugar for f => \x -> body
  • pattern: { fst => a | snd => b }, with punning
  • declaration and p.fst projection unchanged

close #43

A record lives in `{ }`; one field rule everywhere: `name => value`, and fields are separated by `|`. - construct: `{ fst => a | snd => b }`, pun `{ x | y }`, empty `{}` - update: `{ base \with fst => a }` - field params: `f x => body` is sugar for `f => \x -> body` - pattern: `{ fst => a | snd => b }`, with punning - declaration and `p.fst` projection unchanged close #43
A record lives in `{ }`; one field rule everywhere: `name => value`, and fields are separated by `|`.
- construct: `{ fst => a | snd => b }`, pun `{ x | y }`, empty `{}`
- update: `{ base \with fst => a }`
- field params: `f x => body` is sugar for `f => \x -> body`
- pattern: `{ fst => a | snd => b }`, with punning
- declaration and `p.fst` projection unchanged
close #43 
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dannypsnl/violet!47
Reference in a new issue
dannypsnl/violet
No description provided.
Delete branch "record"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?