From d8ef45a3126bf72d09e1eae91d45de66e9ab37af Mon Sep 17 00:00:00 2001 From: sewardj Date: Thu, 24 Jan 2002 16:55:04 +0000 Subject: [PATCH] [project @ 2002-01-24 16:55:04 by sewardj] This is one of those commits where the commit message is hundreds of times, in bytes, larger than the fix. If you count pixels, it's probably more like thousands of times larger, since the fix involves adding a missing apostrophe. In compiling let bindings, when filtering the free vars of each RHS against the supplied on-stack environment p, filter against p after it has been augmented with the binders in this let (viz, p'), rather than before. Without this, letrec-bound binders can never "get started" in the environment. This fixes the HEAD crash for [(i,1) | i <- [1]]. Stable branch is ok since the free-var machinery works a different way there. --- ghc/compiler/ghci/ByteCodeGen.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index f422cab..2e3a9e8 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -312,7 +312,7 @@ schemeE d s p (fvs, AnnLet binds b) AnnRec xs_n_rhss -> unzip xs_n_rhss n = length xs - is_local id = not (isTyVar id) && elemFM id p + is_local id = not (isTyVar id) && elemFM id p' fvss = map (filter is_local . varSetElems . fst) rhss -- Sizes of tagged free vars, + 1 for the fn -- 1.7.10.4