[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 17:18:28 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.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:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:16 RyanGlScott]:
 > The fact that using `dataToTag#` directly produces incorrect results is
 perhaps not terribly surprising...

 Except that we have special code to make sure that always happens
 regardless. The STG Simon pasted looks right from that standpoint: it
 always applies `dataToTag#` under a case on its argument. So my bet is
 that Simon is right: something is going wrong in code generation or the
 RTS.

 Side note: it looks like I was wrong about tagging large types. I believe
 there was some talk of that, but it doesn't look like it's happened as
 yet.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15696#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list