Add annotations in the right order
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 28 Feb 2013 10:25:59 +0000 (10:25 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 28 Feb 2013 10:25:59 +0000 (10:25 +0000)
src/GHC/HeapView.hs

index b2990e0..c0a6847 100644 (file)
@@ -831,7 +831,7 @@ generalBuildHeapGraph limit (HeapGraph hg) addBoxes = do
     -- already there
     (is, hg') <- runWriterT (evalStateT run initialState)
     -- Now add the annotations of the root values
-    let hg'' = foldr (uncurry annotateHeapGraph) (HeapGraph hg') is
+    let hg'' = foldl' (flip (uncurry annotateHeapGraph)) (HeapGraph hg') is
     return (hg'', is)
   where
     run = do