#10859: Generated Eq instance associates && wrongly -------------------------------------+------------------------------------- Reporter: nomeata | Owner: simonpj Type: bug | Status: patch Priority: lowest | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: deriving, | newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10858 | Differential Rev(s): Phab:D5104 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Krzysztof Gogolewski <krz.gogolewski@…>): In [changeset:"2d953a60489ba30433e5f2fe27c50aa9da75f802/ghc" 2d953a6/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2d953a60489ba30433e5f2fe27c50aa9da75f802" Fix #10859 by using foldr1 while deriving Eq instances Summary: Previously, we were using foldl1 instead, which led to the derived code to be wrongly associated. Test Plan: ./validate Reviewers: RyanGlScott, nomeata, simonpj, bgamari Reviewed By: RyanGlScott, nomeata Subscribers: rwbarton, carter GHC Trac Issues: #10859 Differential Revision: https://phabricator.haskell.org/D5104 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10859#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler