Restore old GHC generics behavior vis-à-vis Fixity
authorRyanGlScott <ryan.gl.scott@gmail.com>
Wed, 6 Jan 2016 11:05:05 +0000 (12:05 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 6 Jan 2016 11:05:12 +0000 (12:05 +0100)
commit852b603029a047609a54453b1f9cd65035a43afe
tree6cb96f24dcf4a2f1ac747525ac618afa86689abb
parent4dc4b8445710d92d23505b875a8d666217bc932d
Restore old GHC generics behavior vis-à-vis Fixity

Phab:D493 accidentally changed the way GHC generics looks up `Fixity`
information when deriving `Generic` or `Generic1`. Before, a `Fixity` of
`Infix` would be given only if a data constructor was declared infix,
but now, `Infix` is given to any data constructor that has a fixity
declaration (not to be confused with being declared infix!). This commit
reverts back to the original behavior for consistency's sake.

Fixes #11358.

Test Plan: ./validate

Reviewers: kosmikus, dreixel, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1740

GHC Trac Issues: #11358
compiler/typecheck/TcGenGenerics.hs
testsuite/tests/generics/T11358.hs [new file with mode: 0644]
testsuite/tests/generics/T11358.stdout [new file with mode: 0644]
testsuite/tests/generics/all.T