#2668: Standalone deriving doesn't do newtype deriving properly
---------------------------------+------------------------------------------
    Reporter:  ryani             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Component:  Compiler        
     Version:  6.11              |    Severity:  normal          
    Keywords:                    |    Testcase:                  
Architecture:  Unknown/Multiple  |          Os:  Unknown/Multiple
---------------------------------+------------------------------------------
 I'd expect the following two declarations to have identical behavior:
 {{{
 newtype S1 x y a = S1 (M S x y a) deriving IxMonad

 newtype S2 x y a = S2 (M S x y a)
 deriving instance IxMonad S2
 }}}

 Results:
 {{{
 $ ghc-6.11.20081005 -c deriving.hs

 deriving.hs:15:0:
     Can't make a derived instance of `IxMonad S2'
       (even with cunning newtype deriving:
        the representation type has wrong kind)
     In the stand-alone deriving instance for `IxMonad S2'
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2668>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to