summaryrefslogtreecommitdiff
path: root/compiler/rename/RnPat.lhs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-08-26 12:21:21 +0000
committersimonpj@microsoft.com <unknown>2008-08-26 12:21:21 +0000
commit24b1e13657c3e06e7c97eeab9a6c4f2a0cdd9193 (patch)
tree4ef829ad3364d1c739e40786d50c34539a9dece2 /compiler/rename/RnPat.lhs
parent8b4b45b96466be65f4e23c46c20c2199b6ae6c29 (diff)
downloadhaskell-24b1e13657c3e06e7c97eeab9a6c4f2a0cdd9193.tar.gz
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
Diffstat (limited to 'compiler/rename/RnPat.lhs')
-rw-r--r--compiler/rename/RnPat.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rename/RnPat.lhs b/compiler/rename/RnPat.lhs
index 584c2870cd..18f3dd5d85 100644
--- a/compiler/rename/RnPat.lhs
+++ b/compiler/rename/RnPat.lhs
@@ -212,7 +212,7 @@ rnLPatAndThen var@(NM varf) (L loc p) cont =
-- (e.g. in the pattern (x, x -> y) x needs to be bound in the rhs of the tuple)
SigPatIn pat ty -> do
- patsigs <- doptM Opt_PatternSignatures
+ patsigs <- doptM Opt_ScopedTypeVariables
if patsigs
then rnLPatAndThen var pat
(\ pat' -> do { (ty', fvs1) <- rnHsTypeFVs tvdoc ty
@@ -580,7 +580,7 @@ checkTupSize tup_size
patSigErr :: Outputable a => a -> SDoc
patSigErr ty
= (ptext (sLit "Illegal signature in pattern:") <+> ppr ty)
- $$ nest 4 (ptext (sLit "Use -XPatternSignatures to permit it"))
+ $$ nest 4 (ptext (sLit "Use -XScopedTypeVariables to permit it"))
dupFieldErr :: String -> RdrName -> SDoc
dupFieldErr str dup