#7082: Default type family instances
---------------------------------------+------------------------------------
 Reporter:  guest                      |          Owner:                        
 
     Type:  bug                        |         Status:  new                   
 
 Priority:  normal                     |      Component:  Compiler (Type 
checker)
  Version:  7.4.1                      |       Keywords:                        
 
       Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple      
 
  Failure:  GHC rejects valid program  |       Testcase:                        
 
Blockedby:                             |       Blocking:                        
 
  Related:                             |  
---------------------------------------+------------------------------------
 The following code does not compile in GHC 7.4, unless line (2) is
 uncommented. I thought line (1) would remove need for (2). If it does not,
 probably declaration (1) should cause an error.

 {{{
 {-# LANGUAGE TypeFamilies #-}
 class R m where
   type D m a :: *
   type D m a = ()                -- (1)
   f :: m a -> D m a -> ()

 instance R Maybe where
   -- type D Maybe a = ()         -- (2)
   f = undefined

 x = f (Nothing :: Maybe Int) ()
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to