[project @ 2001-05-01 11:37:18 by sewardj]
authorsewardj <unknown>
Tue, 1 May 2001 11:37:18 +0000 (11:37 +0000)
committersewardj <unknown>
Tue, 1 May 2001 11:37:18 +0000 (11:37 +0000)
Ignore tyvars on variables bound by case alts when generating unpack code.

ghc/compiler/ghci/ByteCodeGen.lhs

index d8f3032..4b1bed5 100644 (file)
@@ -346,7 +346,7 @@ schemeE d s p (fvs, AnnCase scrut bndr alts)
         codeAlt alt@(discr, binds_f, rhs)
            | isAlgCase 
            = let (unpack_code, d_after_unpack, p_after_unpack)
-                    = mkUnpackCode binds_f d' p'
+                    = mkUnpackCode (filter (not.isTyVar) binds_f) d' p'
              in  schemeE d_after_unpack s p_after_unpack rhs
                                        `thenBc` \ rhs_code -> 
                  returnBc (my_discr alt, unpack_code `appOL` rhs_code)