X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsUtils.lhs;h=d793a3b882fff718b7987365bf78879d693d938b;hb=1e436f2bb208a6c990743afaf17b7c2a93c31742;hp=667f8cc55ff6e36244a9e36e5f68f554284f6173;hpb=58521c72cec262496dabf5fffb057d25ab17a0f7;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs index 667f8cc..d793a3b 100644 --- a/compiler/hsSyn/HsUtils.lhs +++ b/compiler/hsSyn/HsUtils.lhs @@ -338,9 +338,8 @@ mkMatch pats expr binds = noLoc (Match (map paren pats) Nothing (GRHSs (unguardedRHS expr) binds)) where - paren p = case p of - L _ (VarPat _) -> p - L l _ -> L l (ParPat p) + paren lp@(L l p) | hsPatNeedsParens p = L l (ParPat lp) + | otherwise = lp \end{code}