[GHC] #1588: unrequested generalized newtype deriving?

GHC trac at galois.com
Sat Aug 4 17:17:51 EDT 2007


#1588: unrequested generalized newtype deriving?
-----------------------+----------------------------------------------------
  Reporter:  SamB      |          Owner:         
      Type:  bug       |         Status:  new    
  Priority:  normal    |      Milestone:         
 Component:  Compiler  |        Version:  6.6    
  Severity:  normal    |       Keywords:         
Difficulty:  Unknown   |             Os:  Unknown
  Testcase:            |   Architecture:  Unknown
-----------------------+----------------------------------------------------
Consider the two type definitions:

 {{{
 newtype MaybeT  m a = MaybeT  { runMaybeT  :: m (Maybe a) } deriving Eq
 data    MaybeT' m a = MaybeT' { runMaybeT' :: m (Maybe a) } deriving Eq
 }}}

 Why is it that the former compiles, with no flags of any kind, but the
 latter does not? It seems like generalized newtype deriving is happening
 when unrequested and undesired...

 (I'm trying to figure out how Derive should derive Eq, and compiler bugs
 don't help much ;-)

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


More information about the Glasgow-haskell-bugs mailing list