From c3663e6c2e71cca45cce2704d98656e304def2fb Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 26 Feb 2001 17:42:15 +0000 Subject: [PATCH] [project @ 2001-02-26 17:42:15 by simonmar] only collect free type variable info if -fkeep-stg-types is on. --- ghc/compiler/stgSyn/CoreToStg.lhs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/stgSyn/CoreToStg.lhs b/ghc/compiler/stgSyn/CoreToStg.lhs index 58c07c8..e5d3c41 100644 --- a/ghc/compiler/stgSyn/CoreToStg.lhs +++ b/ghc/compiler/stgSyn/CoreToStg.lhs @@ -391,6 +391,7 @@ coreToStgExpr (Case scrut bndr alts) -- ToDo: remove the minusVarSet; -- since escs won't include any of these binders ) + vars_alg_alt other = pprPanic "vars_alg_alt" (ppr other) vars_deflt Nothing = returnLne (StgNoDefault, emptyFVInfo, emptyVarSet) @@ -873,9 +874,11 @@ minusFVBinders :: [Id] -> FreeVarsInfo -> FreeVarsInfo minusFVBinders vs fv = foldr minusFVBinder fv vs minusFVBinder :: Id -> FreeVarsInfo -> FreeVarsInfo -minusFVBinder v fv | isId v = (fv `delVarEnv` v) `unionFVInfo` - tyvarFVInfo (tyVarsOfType (idType v)) - | otherwise = fv `delVarEnv` v +minusFVBinder v fv | isId v && opt_KeepStgTypes + = (fv `delVarEnv` v) `unionFVInfo` + tyvarFVInfo (tyVarsOfType (idType v)) + | otherwise + = fv `delVarEnv` v -- When removing a binder, remember to add its type variables -- c.f. CoreFVs.delBinderFV -- 1.7.10.4