[project @ 2005-08-10 07:44:51 by simonpj]
authorsimonpj <unknown>
Wed, 10 Aug 2005 07:44:51 +0000 (07:44 +0000)
committersimonpj <unknown>
Wed, 10 Aug 2005 07:44:51 +0000 (07:44 +0000)
Fix pretty-printing bug for NPat; MERGE to STABLE

ghc/compiler/hsSyn/HsPat.lhs

index 2243f5f..4880120 100644 (file)
@@ -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