#2497: Weird scoping for tyvars in rules
------------------------+---------------------------------------------------
    Reporter:  rl       |       Owner:          
        Type:  bug      |      Status:  new     
    Priority:  normal   |   Component:  Compiler
     Version:  6.8.3    |    Severity:  normal  
    Keywords:           |    Testcase:          
Architecture:  Unknown  |          Os:  Unknown 
------------------------+---------------------------------------------------
 This rule:

 {{{
 {-# RULES "id" forall (x :: a). id x = x #-}
 }}}

 compiles fine with no `LANGUAGE` options but fails if I add `Rank2Types`:

 {{{
 Not in scope: type variable `a'
 }}}

 It compiles fine again if I additionally include `ScopedTypeVariables`.
 This looks wrong to me.

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