[commit: ghc] master: StgLint: Show constructor arity in mismatch message (c2881a2)

git at git.haskell.org git at git.haskell.org
Tue Sep 5 11:22:29 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c2881a23319d91c6e1301a6fd149ca37a3bcfc1e/ghc

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

commit c2881a23319d91c6e1301a6fd149ca37a3bcfc1e
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Sep 4 08:14:11 2017 -0400

    StgLint: Show constructor arity in mismatch message
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3921


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

c2881a23319d91c6e1301a6fd149ca37a3bcfc1e
 compiler/stgSyn/StgLint.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/stgSyn/StgLint.hs b/compiler/stgSyn/StgLint.hs
index 5140a47..90628f0 100644
--- a/compiler/stgSyn/StgLint.hs
+++ b/compiler/stgSyn/StgLint.hs
@@ -490,7 +490,7 @@ mkAlgAltMsg3 :: DataCon -> [Id] -> MsgDoc
 mkAlgAltMsg3 con alts
   = vcat [
         text "In some algebraic case alternative, number of arguments doesn't match constructor:",
-        ppr con,
+        ppr con <+> parens (text "arity" <+> ppr (dataConRepArity con)),
         ppr alts
     ]
 



More information about the ghc-commits mailing list