[GHC] #8383: "tagToEnum# (0# ==# 1#) :: Bool" causes CASEFAIL in ghci

GHC ghc-devs at haskell.org
Mon Sep 30 02:07:10 CEST 2013


#8383: "tagToEnum# (0# ==# 1#) :: Bool" causes CASEFAIL in ghci
---------------------------------+----------------------------------
        Reporter:  rwbarton      |            Owner:
            Type:  bug           |           Status:  new
        Priority:  normal        |        Milestone:
       Component:  GHCi          |          Version:  7.7
      Resolution:                |         Keywords:
Operating System:  Linux         |     Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |       Difficulty:  Unknown
       Test Case:                |       Blocked By:
        Blocking:                |  Related Tickets:
---------------------------------+----------------------------------

Comment (by rwbarton):

 It seems that the issue is in the bytecode generator for `tagToEnum#`,
 which has been wrong since at least ghc 6.8.2 and probably since it was
 added in 2001. However, an application of `tagToEnum#` to a constant
 apparently gets constant-folded away before the interpreter sees it, which
 is probably why nobody ever noticed before `tagToEnum#` became used in
 derived Eq instances.

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



More information about the ghc-tickets mailing list