Continuing the discussion from Deriving via: When do Representations Match?:
ok but what if i wanted Product Int instead of Sum Int?
also Int doesn’t have a Semigroup instance how does GHC know to use Sum in the first place?
Continuing the discussion from Deriving via: When do Representations Match?:
ok but what if i wanted Product Int instead of Sum Int?
also Int doesn’t have a Semigroup instance how does GHC know to use Sum in the first place?
Danidiaz seems to have updated their post in the meanwhile to correct themselves; GHC won’t know to use Sum
in this case.