[commit: ghc] : Fix long-standing bug in zipBracketeds, exposed by eager value splitting (6f08f8b)

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  : 

http://hackage.haskell.org/trac/ghc/changeset/6f08f8bd2111d2e78a40e66d12fe3f42243d1dc4

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

commit 6f08f8bd2111d2e78a40e66d12fe3f42243d1dc4
Author: Max Bolingbroke <[email protected]>
Date:   Tue Jan 3 16:42:45 2012 +0000

    Fix long-standing bug in zipBracketeds, exposed by eager value splitting

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

 compiler/supercompile/Supercompile/Drive/Split.hs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Split.hs b/compiler/supercompile/Supercompile/Drive/Split.hs
index b8f494d..dc609a7 100644
--- a/compiler/supercompile/Supercompile/Drive/Split.hs
+++ b/compiler/supercompile/Supercompile/Drive/Split.hs
@@ -455,7 +455,7 @@ zipBracketeds (TailsKnown bty mk_bshell bholes) = case ei_holes of
                 \ty -> shell_extra_fvs ty `unionVarSet` nonRecBindersFreeVars bvs (bracketedExtraFvs rbracketed),
                 \ty es rev_es' -> case splitBy (bracketedHoles rbracketed) es of
                                     (es_here, es_later) -> shell_wrapper ty es_later (shellWrapper (bracketedShell rbracketed) es_here:rev_es'),
-                case ei_holes of Left holes -> Left (holes ++ bracketedHoles rbracketed)
+                case ei_holes of Left holes -> Left (bracketedHoles rbracketed ++ holes)
                                  Right holes | is_tail   -> Left (bracketedHoles rbracketed ++ map tailishHole holes)
                                              | otherwise -> Right (map (TailishHole False) (bracketedHoles rbracketed) ++ holes))
             where rbracketed = rigidizeBracketed bracketed
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.