X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FRdrHsSyn.lhs;h=a914bbaa59eab04d76027b8b1dd3251be4bdb6d1;hp=779b67b80c0f01fe3fa47276ed99240bc6309fcf;hb=58521c72cec262496dabf5fffb057d25ab17a0f7;hpb=4b8dfb01980b44bc3284c87aadeada130f94f85f diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 779b67b..a914bba 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -777,8 +777,10 @@ checkAPat loc e = case e of ExplicitPArr _ es -> do ps <- mapM checkLPat es return (PArrPat ps placeHolderType) - ExplicitTuple es b -> do ps <- mapM checkLPat es - return (TuplePat ps b placeHolderType) + ExplicitTuple es b + | all tupArgPresent es -> do ps <- mapM checkLPat [e | Present e <- es] + return (TuplePat ps b placeHolderType) + | otherwise -> parseError loc "Illegal tuple section in pattern" RecordCon c _ (HsRecFields fs dd) -> do fs <- mapM checkPatField fs @@ -959,7 +961,6 @@ mkInlineSpec Nothing match_info False = neverInlineSpec match_info -- NOINLINE mkInlineSpec (Just act) match_info inl = Inline (InlinePragma act match_info) inl - ----------------------------------------------------------------------------- -- utilities for foreign declarations