Fix scoping for RHS of associated type decls (fixes Trac #5515)
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 29 Sep 2011 15:05:16 +0000 (16:05 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 29 Sep 2011 15:05:16 +0000 (16:05 +0100)
commit817d1b047b538e408a8758a18270c51d429de670
tree8f9ccfa37ddb09b979ace6a3a10789b883348765
parentba60fc61ba5bbac8d0bbeb719fe26daa4058e1c5
Fix scoping for RHS of associated type decls (fixes Trac #5515)

We should not allow things like

class C a b where
  type F a :: *

instance C (p,q) r where
  type F (p,q) = r   -- No! fvs(rhs) should be a subset
                     --     of fvs(lhs)
compiler/hsSyn/HsDecls.lhs
compiler/rename/RnSource.lhs