X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fparser%2FRdrHsSyn.lhs;h=e875bf5bf53dc4f1bfad5603f87d2fd2dc4a4dff;hb=058f3b6f29e9f5f5f42d9ee28ec6326e8f8e74a5;hp=64de0f5fe37d8e3cfc4bf5b39222990e9c0aa367;hpb=f2fdfdb0616f3da27b3d27d2e3caacf976a36d64;p=ghc-hetmet.git diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 64de0f5..e875bf5 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -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)