Skip to content

DeriveGeneric: look up datacon fixities using getDataConFixityFun

Ryan Scott requested to merge wip/T20994 into master

Previously, DeriveGeneric would look up the fixity of a data constructor using getFixityEnv, but this is subtly incorrect for data constructors defined in external modules. This sort of situation can happen with StandaloneDeriving, as noticed in #20994 (closed). In fact, the same bug has occurred in the past in #9830 (closed), and while that bug was fixed for deriving Read and deriving Show, the fix was never extended to DeriveGeneric due to an oversight. This patch corrects that oversight.

Fixes #20994 (closed).

Merge request reports