#5520: Spurious warning with new associated types and MultiParamTypeClasses
---------------------------------+------------------------------------------
    Reporter:  batterseapower    |       Owner:                                 
  
        Type:  bug               |      Status:  new                            
  
    Priority:  normal            |   Component:  Compiler                       
  
     Version:  7.3               |    Keywords:                                 
  
    Testcase:                    |   Blockedby:                                 
  
          Os:  Unknown/Multiple  |    Blocking:                                 
  
Architecture:  Unknown/Multiple  |     Failure:  Incorrect warning at 
compile-time
---------------------------------+------------------------------------------
 Consider this program:

 {{{
 {-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-}
 module Overlap where

 class Foo a b where
   type Typ a

 instance Foo Int Int where
   type Typ Int = Bool

 instance Foo Int Bool where
 }}}

 We get a warning:

 {{{
 Overlap.hs:10:1:
     Warning: No explicit AT declaration for `Typ'
     In the instance declaration for `Foo Int Bool'
 }}}

 But inserting such an AT declaration would be an error!

 {{{
 Overlap.hs:8:8:
     Conflicting family instance declarations:
       type Typ Int -- Defined at Overlap.hs:8:8
       type Typ Int -- Defined at Overlap.hs:11:8
 }}}

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