[GHC] #15696: Derived Ord instance for enumerations with more than 8 elements seems to be incorrect
GHC
ghc-devs at haskell.org
Tue Oct 2 09:05:17 UTC 2018
#15696: Derived Ord instance for enumerations with more than 8 elements seems to be
incorrect
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone: 8.6.1
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
That's terrible!
The following all produce the same (wrong) restul
{{{
S.fromList (map f [ () | _ <- [1..10] ]) -- T2,T2
S.fromList [f (), f ()] -- T2,T2
S.fromList [f (), f (), f()] -- T2,T2
}}}
However this works fine
{{{
f () `S.insert` (f () `S.insert` S.empty)
}}}
The comparison operations generated by `deriving` look ok to me.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15696#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list