[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:05:12 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 RyanGlScott):
The fact that using `dataToTag#` directly produces incorrect results is
perhaps not terribly surprising, giving that it
[http://git.haskell.org/ghc.git/blob/21efbc7599e39ec93b8b13b7d7b84811226e6f6f:/compiler/prelude/primops.txt.pp#l2966
must always be applied to an evalauted argument] (see `Note
[dataToTag#]`). The fact that the version using `getTag` breaks is more
worrisome, since `getTag` actually forces its argument (with a bang
pattern).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15696#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list