#3046: Generalized newtype deriving with associated types
-----------------------------+----------------------------------------------
Reporter:  LouisWasserman    |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.1            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 When I have a


 {{{
     class Foo a where
         type Bar a
         foobar :: a -> Bar a
 }}}

 an
 {{{
 instance Foo Fooey ...
 }}}

 and

 {{{
 newtype Fooey2 = F2 (Fooey) deriving (Foo)
 }}}

 I expect the automatically generated deriving to include


 {{{
 type Bar Fooey2 = Bar Fooey
 }}}

 but this is not the case: I cannot get an associated type from a newtype
 to resolve to anything.  My guess is that the combination of
 -XTypeFamilies and -XGeneralizedNewtypeDeriving is rare enough that this
 may simply not have been thought of yet, but it's something I'd like to
 see fixed.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3046>
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