diff options
author | simonpj@microsoft.com <unknown> | 2007-01-03 11:50:09 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2007-01-03 11:50:09 +0000 |
commit | 8ffdb8eed6b38db00761093889f5cddbe8ca1d60 (patch) | |
tree | 72795c6aa7b7b26d3e9330a45a2c6cd85ce85dab /compiler/simplCore | |
parent | b89a7fb470edee5762fba51effb64d1c071df373 (diff) | |
download | haskell-8ffdb8eed6b38db00761093889f5cddbe8ca1d60.tar.gz |
Fix several bugs related to finding free variables
Now that coercion variables mention types, a type-lambda binder can
have free variables. This patch adjusts the free-variable finder
to take account of this, by treating Ids and TyVars more uniformly.
In addition, I fixed a bug in the specialiser that was missing a
free type variable in a binder. And a bug in tyVarsOfInst that
was missing the type variables in the kinds of the quantified tyvars.
Diffstat (limited to 'compiler/simplCore')
-rw-r--r-- | compiler/simplCore/SetLevels.lhs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/simplCore/SetLevels.lhs b/compiler/simplCore/SetLevels.lhs index 225dea5bb4..5dbaec65f0 100644 --- a/compiler/simplCore/SetLevels.lhs +++ b/compiler/simplCore/SetLevels.lhs @@ -771,8 +771,7 @@ absVarsOf dest_lvl (_, lvl_env, _, id_env) v Just (abs_vars, _) -> abs_vars Nothing -> [v] - add_tyvars v | isId v = v : varSetElems (idFreeTyVars v) - | otherwise = [v] + add_tyvars v = v : varSetElems (varTypeTyVars v) -- We are going to lambda-abstract, so nuke any IdInfo, -- and add the tyvars of the Id (if necessary) |