X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2FhsSyn%2FHsPat.lhs;h=4880120df26ea87700b1fce41cb31b4e5a03af4f;hb=10dd2a6d050e4779782800184014b8738fadc679;hp=322549ba1e3552145824042edc621e1daf6b6e32;hpb=57bdd6a6e55f0f147ca408895ba399e33e2f87ca;p=ghc-hetmet.git diff --git a/ghc/compiler/hsSyn/HsPat.lhs b/ghc/compiler/hsSyn/HsPat.lhs index 322549b..4880120 100644 --- a/ghc/compiler/hsSyn/HsPat.lhs +++ b/ghc/compiler/hsSyn/HsPat.lhs @@ -79,7 +79,7 @@ data Pat id | LitPat HsLit -- Used for *non-overloaded* literal patterns: -- Int#, Char#, Int, Char, String, etc. - | NPat (HsOverLit id) -- *Always* positive + | NPat (HsOverLit id) -- ALWAYS positive (Maybe (SyntaxExpr id)) -- Just (Name of 'negate') for negative -- patterns, Nothing otherwise (SyntaxExpr id) -- Equality checker, of type t->t->Bool @@ -166,7 +166,8 @@ pprPat (ConPatOut con tvs dicts binds details _) else pprUserCon con details pprPat (LitPat s) = ppr s -pprPat (NPat l _ _ _) = ppr l +pprPat (NPat l Nothing _ _) = ppr l +pprPat (NPat l (Just _) _ _) = char '-' <> ppr l pprPat (NPlusKPat n k _ _) = hcat [ppr n, char '+', ppr k] pprPat (TypePat ty) = ptext SLIT("{|") <> ppr ty <> ptext SLIT("|}") pprPat (SigPatIn pat ty) = ppr pat <+> dcolon <+> ppr ty