Closed Lysxia closed 6 years ago
This was in commit ac3651d.
A minimal example of the symmetry bug is [here] (https://gist.github.com/Lysxia/f082a3af9472511b5dcec045f945348b), and seems to already be fixed in 8.4.
The other bugs somehow go away by removing the x
from the Coercible
constraints (commit d8e5d0c) (but putting the x
back should reproduce the error).
(A really brief note about the issue, to be expanded later.)
For some reason these two lines are different (they shouldn't have to be)
https://github.com/Lysxia/generic-data/blob/ac3651d3a35f3a8e652f474c482251e6cc3fe622/src/Generic/Data/Internal/Surgery.hs#L365
https://github.com/Lysxia/generic-data/blob/ac3651d3a35f3a8e652f474c482251e6cc3fe622/src/Generic/Data/Internal/Surgery.hs#L410
And the compiler doesn't like when I try to put them in a type synonym (
RmvConstr
,InsConstr
orConstrSurgery
).Even in the current state some tests fail to type check on GHC 8.0 and I cannot explain why:
https://github.com/Lysxia/generic-data/blob/ac3651d3a35f3a8e652f474c482251e6cc3fe622/test/surgery.hs#L63-L72
These are coercible: a manually written specialization of
coerce
at those types type checks.