unison icon indicating copy to clipboard operation
unison copied to clipboard

`edit` a constructor for a decl with no name is a round-trip error

Open aryairani opened this issue 3 years ago • 3 comments

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 avatar Feb 09 '22 20:02 aryairani

@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.

ceedubs avatar Feb 11 '22 14:02 ceedubs

Is this actually a round-trip bug? Shouldn’t deleting a unique type fail if there are dependencies on that type?

sellout avatar Jul 08 '24 23:07 sellout

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.

ceedubs avatar Jul 09 '24 13:07 ceedubs