Fix flaggery for RULES (cf Trac #2497)
authorsimonpj@microsoft.com <unknown>
Tue, 26 Aug 2008 12:21:21 +0000 (12:21 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 26 Aug 2008 12:21:21 +0000 (12:21 +0000)
commit24b1e13657c3e06e7c97eeab9a6c4f2a0cdd9193
tree4ef829ad3364d1c739e40786d50c34539a9dece2
parent8b4b45b96466be65f4e23c46c20c2199b6ae6c29
Fix flaggery for RULES (cf Trac #2497)

This patch executes the plan described in the discussion in Trac #2497.
Specficially:

    * Inside a RULE, switch on the forall-as-keyword in the lexer,
      unconditionally. (Actually this is done by an earlier patch.)

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

    * Inside a RULE, switch on -XScopedTypeVariables unconditionally.

    * Change -frewrite-rules to -fenable-rewrite-rules; deprecate the former.
      Internally the DynFlag is now Opt_EnableRewriteRules.

There's a test in typecheck/should_compile/T2497.hs
compiler/deSugar/DsExpr.lhs
compiler/deSugar/DsListComp.lhs
compiler/ghc.cabal
compiler/main/DynFlags.hs
compiler/rename/RnPat.lhs
compiler/rename/RnSource.lhs
compiler/simplCore/SimplUtils.lhs
compiler/typecheck/TcDeriv.lhs
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml