#3169: Type families occurs check
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:  chak            
        Type:  bug               |       Status:  closed          
    Priority:  normal            |    Milestone:  6.12.1          
   Component:  Compiler          |      Version:  6.10.2          
    Severity:  normal            |   Resolution:  worksforme      
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by chak):

  * status:  new => closed
  * resolution:  => worksforme

Comment:

 I disagree.  GHC is perfectly right.  You forgot to match the ''data
 constructor'' `MP` in the second argument of `lookup`.
 {{{
 instance (Key a, Key b) => Key (a,b) where
   type Map (a,b) = MP a b
   lookup (a,b) (MP m)
      = case lookup a m of
           Just m2 -> lookup b m2
 }}}
 works fine for me in the HEAD.

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