#5481: Associated type defaults + MultiParamTypeClasses error
----------------------------------------+-----------------------------------
  Reporter:  illissius                  |          Owner:                  
      Type:  bug                        |         Status:  closed          
  Priority:  normal                     |      Milestone:                  
 Component:  Compiler                   |        Version:  7.3             
Resolution:  fixed                      |       Keywords:                  
  Testcase:                             |      Blockedby:                  
Difficulty:                             |             Os:  Unknown/Multiple
  Blocking:                             |   Architecture:  Unknown/Multiple
   Failure:  GHC rejects valid program  |  
----------------------------------------+-----------------------------------

Comment(by simonpj):

 No, it should work ''neither way''!  In any type instance, whether
 associated or not, the variables mentioned on the RHS must be a subset of
 those on the LHS.  So the above code should fail with
 {{{
 T5481.hs:6:5:
     The RHS of an associated type declaration mentions type variable `b'
       All such variables must be bound on the LHS

 T5481.hs:8:5:
     The RHS of an associated type declaration mentions type variable `a'
       All such variables must be bound on the LHS
 }}}
 Simon

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