[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 15:04: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 RyanGlScott):

 Apologies, I meant to mention in comment:6 what `wumbo` actually is: it's
 a stripped down version of `insert` intended to highlight that it appears
 to behave differently between GHC 8.4.3 and 8.6.1. The semantics of
 `wumbo` differs from that of `insert`, but here is the important bit:

 {{{
 $ /opt/ghc/8.4.3/bin/ghc -O2 -fforce-recomp Bug.hs && ./Bug
 [1 of 1] Compiling Main             ( Bug.hs, Bug.o )
 Linking Bug ...
 Bin T2 Tip Tip

 $ /opt/ghc/8.6.1/bin/ghc -O2 -fforce-recomp Bug.hs && ./Bug
 [1 of 1] Compiling Main             ( Bug.hs, Bug.o )
 Linking Bug ...
 Bin T2 Tip (Bin T2 Tip Tip)
 }}}

 GHC 8.4.3's answer is definitely the correct one, since the only way you'd
 get 8.6.1's answer is by hitting the `GT` case of `wumbo` (which shouldn't
 happen if you're comparing `T2` to `T2`).

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


More information about the ghc-tickets mailing list