Fix Trac #2394: test for non-algebraic types in standalone deriving
[ghc-hetmet.git] / compiler / parser / RdrHsSyn.lhs
index 64de0f5..aeb80a2 100644 (file)
@@ -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)