[commit: ghc] supercompiler: Fix horrendous bug with new insertVarRenaming (5cc3d3b)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/5cc3d3bbd6b19fb277a2606f29b28b40e4e666e7

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

commit 5cc3d3bbd6b19fb277a2606f29b28b40e4e666e7
Author: Max Bolingbroke <[email protected]>
Date:   Fri May 11 09:35:40 2012 +0100

    Fix horrendous bug with new insertVarRenaming

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

 .../supercompile/Supercompile/Core/Renaming.hs     |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Core/Renaming.hs b/compiler/supercompile/Supercompile/Core/Renaming.hs
index 21fe136..4dcd281 100644
--- a/compiler/supercompile/Supercompile/Core/Renaming.hs
+++ b/compiler/supercompile/Supercompile/Core/Renaming.hs
@@ -203,8 +203,8 @@ coreSynToVar = fromMaybe (panic "renameId" empty) . getId_maybe
 
 insertVarRenaming :: Renaming -> Var -> Out Var -> Renaming
 insertVarRenaming rn x y
-  | isTyVar x = insertTypeSubst     rn x (mkTyVarTy x)
-  | isCoVar x = insertCoercionSubst rn x (mkCoVarCo x)
+  | isTyVar x = insertTypeSubst     rn x (mkTyVarTy y)
+  | isCoVar x = insertCoercionSubst rn x (mkCoVarCo y)
   | otherwise = insertIdRenaming    rn x y
 
 insertIdRenaming :: Renaming -> Id -> Out Id -> Renaming
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.