[commit: ghc] master: Rules: Show the binder type in the unbound template binder error (8c23b54)

git at git.haskell.org git at git.haskell.org
Tue Sep 26 19:39:56 UTC 2017


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

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

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

commit 8c23b54f0e51b7fb028e46a52d4329235d2013ca
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Sep 26 14:32:02 2017 -0400

    Rules: Show the binder type in the unbound template binder error
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D4013


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

8c23b54f0e51b7fb028e46a52d4329235d2013ca
 compiler/specialise/Rules.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index ec19740..edcab88 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -583,7 +583,7 @@ matchN (in_scope, id_unf) rule_name tmpl_vars tmpl_es target_es
             = env
 
     unbound var = pprPanic "Template variable unbound in rewrite rule" $
-                  vcat [ text "Variable:" <+> ppr var
+                  vcat [ text "Variable:" <+> ppr var <+> dcolon <+> ppr (varType var)
                        , text "Rule" <+> pprRuleName rule_name
                        , text "Rule bndrs:" <+> ppr tmpl_vars
                        , text "LHS args:" <+> ppr tmpl_es



More information about the ghc-commits mailing list