Open Alizter opened 2 years ago
Being able to define the constructor as canonical covers a very remote use case, which I don't think deserves a shortcut in the syntax. In particular most of the times, it is not what you want, since it corresponds to eta expansion for records, which is another feature.
The issue here is that the constructor case gets discarded entirely:
Do we not want to allow for constructors of records to become canonical at all? Could you elaborate why this is something we might not want?
You should see a CS instance as a good value for a record instance. The value Build_A _
is not what you want. You want Build_A 0
or Build_A 46
... The fact that the system errors if you just pass Build_A
is a feature. If you really want a "default CS instance" (this is what it is called in the code), then you have to name it.
IMO this behavior saves mistakes. Why did you declare Build_A
as canonical in the first place? Is it really what you wanted?
The following record constructor for some reason cannot be declared as
Canonical
even though an auxiliary definition can.Version
master