#2497: Weird scoping for tyvars in rules
----------------------+-----------------------------------------------------
 Reporter:  rl        |          Owner:         
     Type:  bug       |         Status:  new    
 Priority:  normal    |      Milestone:         
Component:  Compiler  |        Version:  6.8.3  
 Severity:  normal    |     Resolution:         
 Keywords:            |     Difficulty:  Unknown
 Testcase:            |   Architecture:  Unknown
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Comment (by simonpj):

 After talking to Simon, and Ian, and taking on board Roman's comments, I
 now propose:

  * Do '''not''' add `-XRewriteRules`.  A RULE is in a pragma, and so is
 silently ignored by other compilers anyway.  Other pragmas like SPECIALISE
 do not have a language extension flag.  They will generate errors if they
 are plain wrong (e.g. variables out of scope).  But adding a language flag
 would be inconsistent.

  * Inside a RULE, switch on the `forall`-as-keyword in the lexer,
 unconditionally.  Simon M will do this, and send a patch to Simon PJ for
 validation.

  * Merge the `-XScopedTypeVariables` and `-XPatternSignatures` flags.
 Distinguishing them isn't senseless, but it's jolly confusing.

  * Inside a RULE, switch on `-XScopedTypeVariables` unconditionally.

  * Change `-frewrite-rules` to `-fuse-rewrite-rules`; deprecate the
 former.

 Any dissenters?

 Simon

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