[GHC] #786: bugs around tagToEnum#

GHC trac at galois.com
Sun Jun 4 12:21:38 EDT 2006


#786: bugs around tagToEnum#
------------------------------------------+---------------------------------
    Reporter:  Bulat.Ziganshin at gmail.com  |        Owner:         
        Type:  bug                        |       Status:  new    
    Priority:  normal                     |    Milestone:         
   Component:  Compiler                   |      Version:  6.4.2  
    Severity:  normal                     |     Keywords:         
          Os:  Unknown                    |   Difficulty:  Unknown
Architecture:  Unknown                    |  
------------------------------------------+---------------------------------
i've enclosed 3 modules which reports various problems. all they use
 tagToEnum# and these bugs may be is because of the following, stated in
 CgExpr.lhs:

           -- If you're reading this code in the attempt to figure
           -- out why the compiler panic'ed here, it is probably because
           -- you used tagToEnum# in a non-monomorphic setting, e.g.,
           --         intToTg :: Enum a => Int -> a ; intToTg (I# x#) =
 tagToEnum# x#
           -- That won't work.
         tycon = tyConAppTyCon res_ty

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/786>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list