
#15696: Derived Ord instance for enumerations with more than 8 elements seems to be
incorrect
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: osa1
Type: bug | Status: patch
Priority: highest | Milestone: 8.6.2
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: #14677, #15155 | Differential Rev(s): Phab:D5196,
Wiki Page: | Phab:D5201
-------------------------------------+-------------------------------------
Comment (by simonpj):
I took a look
1. We should give `dataToTag#` a strictness signatures in
`primops.txt.pp`. After all, it's strict. If we do that then,
{{{
case x of y { DEFAULT -> daataToTag# y }
}}}
will correctly optimise to `dataToTag# x`.
2. We should remove the bang from `GHC.Base.getTag`. Currenlty it says
{{{
getTag !x = dataToTag# x
}}}
But now the bang is unnecessary, and has to be optimised away by (1).
3. That's also the source of the extra stuff like
{{{
case a#_a4k2 :: Int# of a#_X4Mq [Dmd=