X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FSetLevels.lhs;h=8be8dd65e29c3714483f845fc324d4890ec9b983;hb=478b939d1bd08c37ba3e334296eeb448c78491d2;hp=020ed71541ee863f7f4ff953924518052aa204a5;hpb=25d7f19d1fa3a58931f2fb39f6a63e533fa72ddd;p=ghc-hetmet.git diff --git a/compiler/simplCore/SetLevels.lhs b/compiler/simplCore/SetLevels.lhs index 020ed71..8be8dd6 100644 --- a/compiler/simplCore/SetLevels.lhs +++ b/compiler/simplCore/SetLevels.lhs @@ -669,8 +669,8 @@ type LevelEnv = (FloatOutSwitches, -- We also use these envs when making a variable polymorphic -- because we want to float it out past a big lambda. -- - -- The SubstEnv and IdEnv always implement the same mapping, but the - -- SubstEnv maps to CoreExpr and the IdEnv to LevelledExpr + -- The Subst and IdEnv always implement the same mapping, but the + -- Subst maps to CoreExpr and the IdEnv to LevelledExpr -- Since the range is always a variable or type application, -- there is never any difference between the two, but sadly -- the types differ. The SubstEnv is used when substituting in @@ -774,9 +774,11 @@ abstractVars :: Level -> LevelEnv -> VarSet -> [Var] -- These are the ones we are going to abstract out abstractVars dest_lvl (_, lvl_env, _, id_env) fvs = map zap $ uniq $ sortLe le - [var | fv <- varSetElems fvs - , var <- absVarsOf id_env fv - , abstract_me var] + [var | fv <- varSetElems fvs + , var <- absVarsOf id_env fv + , abstract_me var ] + -- NB: it's important to call abstract_me only on the OutIds the + -- come from absVarsOf (not on fv, which is an InId) where -- Sort the variables so the true type variables come first; -- the tyvars scope over Ids and coercion vars