add -XNewQualifiedOperators (Haskell' qualified operator syntax)
[ghc-hetmet.git] / compiler / parser / RdrHsSyn.lhs
index 64de0f5..e875bf5 100644 (file)
@@ -63,7 +63,7 @@ import Class            ( FunDep )
 import TypeRep          ( Kind )
 import RdrName         ( RdrName, isRdrTyVar, isRdrTc, mkUnqual, rdrNameOcc, 
                          isRdrDataCon, isUnqual, getRdrName, isQual,
-                         setRdrNameSpace )
+                         setRdrNameSpace, showRdrName )
 import BasicTypes      ( maxPrecedence, Activation, InlineSpec(..), alwaysInlineSpec, neverInlineSpec )
 import Lexer           ( P, failSpanMsgP, extension, standaloneDerivingEnabled, bangPatEnabled )
 import TysWiredIn      ( unitTyCon ) 
@@ -347,8 +347,8 @@ add gp@(HsGroup {hs_defds  = ts})  l (DefD d) ds
   = addl (gp { hs_defds = L l d : ts }) ds
 add gp@(HsGroup {hs_fords  = ts}) l (ForD d) ds
   = addl (gp { hs_fords = L l d : ts }) ds
-add gp@(HsGroup {hs_depds  = ts})  l (DeprecD d) ds
-  = addl (gp { hs_depds = L l d : ts }) ds
+add gp@(HsGroup {hs_warnds  = ts})  l (WarningD d) ds
+  = addl (gp { hs_warnds = L l d : ts }) ds
 add gp@(HsGroup {hs_ruleds  = ts}) l (RuleD d) ds
   = addl (gp { hs_ruleds = L l d : ts }) ds
 
@@ -689,7 +689,7 @@ checkAPat loc e = case e of
        | bang == bang_RDR 
        -> do { bang_on <- extension bangPatEnabled
              ; if bang_on then checkLPat e >>= (return . BangPat)
-               else parseError loc "Illegal bang-pattern (use -fbang-patterns)" }
+               else parseError loc "Illegal bang-pattern (use -XBangPatterns)" }
 
    ELazyPat e        -> checkLPat e >>= (return . LazyPat)
    EAsPat n e        -> checkLPat e >>= (return . AsPat n)
@@ -706,7 +706,7 @@ checkAPat loc e = case e of
    
    -- n+k patterns
    OpApp (L nloc (HsVar n)) (L _ (HsVar plus)) _ 
-       (L _ (HsOverLit lit@(HsIntegral _ _ _)))
+        (L _ (HsOverLit lit@(OverLit {ol_val = HsIntegral {}})))
                      | plus == plus_RDR
                      -> return (mkNPlusKPat (L nloc n) lit)
    
@@ -1070,9 +1070,6 @@ mkExtName rdrNm = mkFastString (occNameString (rdrNameOcc rdrNm))
 -- Misc utils
 
 \begin{code}
-showRdrName :: RdrName -> String
-showRdrName r = showSDoc (ppr r)
-
 parseError :: SrcSpan -> String -> P a
 parseError span s = parseErrorSDoc span (text s)