Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modules
[ghc-hetmet.git] / compiler / rename / RnTypes.lhs
index 2cc232c..242e8ec 100644 (file)
@@ -4,6 +4,13 @@
 \section[RnSource]{Main pass of renamer}
 
 \begin{code}
+{-# OPTIONS_GHC -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+-- for details
+
 module RnTypes ( 
        -- Type related stuff
        rnHsType, rnLHsType, rnLHsTypes, rnContext,
@@ -124,7 +131,7 @@ rnHsType doc (HsTyVar tyvar)
 
 rnHsType doc ty@(HsOpTy ty1 (L loc op) ty2)
   = setSrcSpan loc $ 
-    do { ty_ops_ok <- doptM Opt_ScopedTypeVariables    -- Badly named option
+    do { ty_ops_ok <- doptM Opt_TypeOperators
        ; checkErr ty_ops_ok (opTyErr op ty)
        ; op' <- lookupOccRn op
        ; let l_op' = L loc op'
@@ -572,9 +579,9 @@ rnPat (VarPat name)
     returnM (VarPat vname, emptyFVs)
 
 rnPat (SigPatIn pat ty)
-  = doptM Opt_GlasgowExts `thenM` \ glaExts ->
+  = doptM Opt_PatternSignatures `thenM` \ patsigs ->
     
-    if glaExts
+    if patsigs
     then rnLPat pat            `thenM` \ (pat', fvs1) ->
          rnHsTypeFVs doc ty    `thenM` \ (ty',  fvs2) ->
          returnM (SigPatIn pat' ty', fvs1 `plusFV` fvs2)
@@ -808,14 +815,14 @@ forAllWarn doc ty (L loc tyvar)
 
 opTyErr op ty 
   = hang (ptext SLIT("Illegal operator") <+> quotes (ppr op) <+> ptext SLIT("in type") <+> quotes (ppr ty))
-        2 (parens (ptext SLIT("Use -fscoped-type-variables to allow operators in types")))
+        2 (parens (ptext SLIT("Use -XTypeOperators to allow operators in types")))
 
 bogusCharError c
   = ptext SLIT("character literal out of range: '\\") <> char c  <> char '\''
 
 patSigErr ty
   =  (ptext SLIT("Illegal signature in pattern:") <+> ppr ty)
-       $$ nest 4 (ptext SLIT("Use -fglasgow-exts to permit it"))
+       $$ nest 4 (ptext SLIT("Use -XPatternSigs to permit it"))
 
 dupFieldErr str dup
   = hsep [ptext SLIT("duplicate field name"),