[commit: ghc] wip/gadtpm: small fix in non-exhaustive messages (85edcd3)

git at git.haskell.org git at git.haskell.org
Wed Oct 14 15:02:50 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/gadtpm
Link       : http://ghc.haskell.org/trac/ghc/changeset/85edcd3800c259c6dbf6eb858b677978d15ff5c4/ghc

>---------------------------------------------------------------

commit 85edcd3800c259c6dbf6eb858b677978d15ff5c4
Author: George Karachalias <george.karachalias at gmail.com>
Date:   Tue Oct 13 13:55:48 2015 +0200

    small fix in non-exhaustive messages


>---------------------------------------------------------------

85edcd3800c259c6dbf6eb858b677978d15ff5c4
 compiler/deSugar/PmExpr.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/deSugar/PmExpr.hs b/compiler/deSugar/PmExpr.hs
index 7360453..0987a04 100644
--- a/compiler/deSugar/PmExpr.hs
+++ b/compiler/deSugar/PmExpr.hs
@@ -354,8 +354,10 @@ filterComplex = zipWith rename nameList . map mkGroup
     isNegLitCs' (PmExprLit l) (PmExprVar x) = Just (x, l)
     isNegLitCs' _ _             = Nothing
 
+    -- Try nice names p,q,r,s,t before using the (ugly) t_i
     nameList :: [SDoc]
-    nameList = [ ptext (sLit ('t':show u)) | u <- [(0 :: Int)..] ]
+    nameList = map (ptext . sLit) ["p","q","r","s","t"] ++
+                 [ ptext (sLit ('t':show u)) | u <- [(0 :: Int)..] ]
 
 -- ----------------------------------------------------------------------------
 



More information about the ghc-commits mailing list