[GHC] #4235: deriving Enum fails for data instances

GHC cvs-ghc at haskell.org
Fri Oct 8 07:25:11 EDT 2010


#4235: deriving Enum fails for data instances
---------------------------------------------+------------------------------
  Reporter:  nestra                          |          Owner:                                         
      Type:  bug                             |         Status:  closed                                 
  Priority:  normal                          |      Milestone:  7.0.1                                  
 Component:  Compiler (Type checker)         |        Version:  6.12.3                                 
Resolution:  fixed                           |       Keywords:  instance deriving, type families, GADTs
  Testcase:  indexed-types/should_run/T4235  |      Blockedby:                                         
Difficulty:                                  |             Os:  Linux                                  
  Blocking:                                  |   Architecture:  x86_64 (amd64)                         
   Failure:  Compile-time performance bug    |  
---------------------------------------------+------------------------------

Comment(by simonpj):

 Turned out there was a second bug relating to enumerations that have a
 phantom type variable, that made the regresssion test fail with -O.  Fixed
 by
 {{{
 Wed Oct  6 08:52:23 PDT 2010  simonpj at microsoft.com
   * Fix test T4235 with -O

   The tag2Enum rule wasn't doing the right thing for
   enumerations with a phantom type parameter, like
      data T a = A | B

     M ./compiler/prelude/PrelRules.lhs -14 +10
 }}}

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


More information about the Glasgow-haskell-bugs mailing list