Open Profpatsch opened 2 years ago
Oh, I think I get it: The values are not even looked at by the instance:
(Semigroup (Rec lts), UnsafeRecBuild lts lts (ConstC Monoid :: Symbol -> TYPE LiftedRep -> Constraint)) => Monoid (Rec lts)
lts
here is completely opaque.
But that also means <>
is equivalent of always throwing away the left record, no? Cause there is nothing to be done with the values.
Ah no, I missed the constraint ConstC Monoid
, of course the values are looked at.
Better example:
> (rcons (#foo := "a") rnil) <> (rcons (#foo := "b") rnil)
[("foo","\"ba\"")]
I’d expect both to return the same result, since all I did was to wrap the
First
in a#foo
field …