unison icon indicating copy to clipboard operation
unison copied to clipboard

Improve behavior when updating files containing unique types

Open bgerm opened this issue 3 years ago • 0 comments

When resaving the code with unique types in a new ucm instance I get an unexpected result when I call set on the record type.

Either Account.active.set should behave as if it’s the one you’re about to add, or the unique type Account should just become the same one you’ve already added, when everything matches. (I think this is how we were planning to address it.) -- Arya Irani

Code:

unique type Account = {
  active: Boolean
}

activate account =
  Account.active.set true account

> activate (Account false)

Result:

  The 1st argument to `activate`

            has type:  Account
      but I expected:  Account#2j43viac7s

      1 | unique type Account = {
      .
      8 | > activate (Account false)

bgerm avatar Jul 16 '22 19:07 bgerm