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

Allow punning in record updates #3125

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Oct 24, 2024

Now it is allowed to use field puns in record updates. E.g.

type R :=
  mkR@{
    a : Nat;
    b : Nat;
    c : Nat;
  };

example : R :=
  let
    z :=
      mkR@{
        a := 0;
        b := 0;
        c := 0;
      };
    a := 6;
  in z@R{a} -- the field `a` is updated to 6

@janmasrovira janmasrovira added enhancement New feature or request syntax labels Oct 24, 2024
@janmasrovira janmasrovira self-assigned this Oct 24, 2024
@janmasrovira janmasrovira linked an issue Oct 24, 2024 that may be closed by this pull request
@janmasrovira janmasrovira force-pushed the 2967-allow-punning-when-records-are-copied-and-edited-in-place branch from 8c7ffae to be3ba19 Compare October 30, 2024 12:54
@paulcadman paulcadman modified the milestones: 0.6.8, 0.6.9 Nov 11, 2024
@janmasrovira janmasrovira force-pushed the 2967-allow-punning-when-records-are-copied-and-edited-in-place branch 2 times, most recently from 693e4e3 to dc928b6 Compare November 28, 2024 18:37
@janmasrovira janmasrovira marked this pull request as ready for review November 28, 2024 21:32
@janmasrovira janmasrovira force-pushed the 2967-allow-punning-when-records-are-copied-and-edited-in-place branch from dc928b6 to 110b7d6 Compare November 29, 2024 10:50
@janmasrovira janmasrovira merged commit f343096 into main Nov 29, 2024
4 checks passed
@janmasrovira janmasrovira deleted the 2967-allow-punning-when-records-are-copied-and-edited-in-place branch November 29, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow punning in record updates
3 participants