From e5f02e15fa479cc9e4a97d6e6f7ea12adbb0f9b9 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 13 Feb 2009 09:26:13 +0100
Subject: [PATCH] Fix a bug in Cluster.fixNodes

We need to lookup the moving accumulator, of course.
---
 src/Cluster.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Cluster.hs b/src/Cluster.hs
index 4ce884cf7..c45f9b93c 100644
--- a/src/Cluster.hs
+++ b/src/Cluster.hs
@@ -598,8 +598,8 @@ fixNodes nl il =
                    assocEqual = (\ (i, _) (j, _) -> i == j)
                    pdx = Instance.pnode inst
                    sdx = Instance.snode inst
-                   pold = fromJust $ lookup pdx nl
-                   sold = fromJust $ lookup sdx nl
+                   pold = fromJust $ lookup pdx accu
+                   sold = fromJust $ lookup sdx accu
                    pnew = Node.setPri pold idx
                    snew = Node.setSec sold idx
                    ac1 = deleteBy assocEqual (pdx, pold) accu
-- 
GitLab