к
Size: a a a
R
class C a whereThe intended semantics is
x :: a -> a
x = y
default x :: a -> a
x = id
y :: a -> a
y = x
x is explicitly specified in an instance, then y is implicitly defined in terms of x
- if y is explicitly specified, then x is implicitly defined in terms of y
- if nothing is explicitly specified, then x is implicitly defined as id and y is implicitly defined in terms of x
GHC rejects the above code with "Conflicting definitions of x".default one for x and use DerivingVia to recover the functionality. Bad option, because the default definition is going to be extremely useful and imposing on the user to use DerivingVia for such a basic thing is a no gox and y and provide a function that allows to explicitly construct the dropped one in terms of the other one. Doing that right now and being annoyedAA
MK
MK
AA
AA
AA
MP
MP
MK
MK
MK
MP
MP
MK
G