unison
unison copied to clipboard
`edit` a constructor for a decl with no name is a round-trip error
Something like:
```unison
unique type Days = Mon | Tue | Wed | Thu | Fri
```
```ucm
.> add
.> delete.type Days
.> edit Days.Mon
.> load
```
with scratch.u
unique type #ujdhd1f2ne
= Days.Mon
| Days.Tues
| Days.Wed
| Days.Thurs
| Days.Fri
@aryairani what do you think that the behavior should be in this case? The behavior that you've shown seems fairly reasonable to me. But I guess that it's problematic that a unique type declaration would try to give its own hash.
Is this actually a round-trip bug? Shouldn’t deleting a unique type fail if there are dependencies on that type?
Shouldn’t deleting a unique type fail if there are dependencies on that type?
Yes. But there are currently some issues such as #5044 that can lead to this situation. And there were even more in the past.