diff options
Diffstat (limited to 'compiler/GHC/Tc/Utils/Env.hs')
-rw-r--r-- | compiler/GHC/Tc/Utils/Env.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs index 7755d3370d..61d0cdcd47 100644 --- a/compiler/GHC/Tc/Utils/Env.hs +++ b/compiler/GHC/Tc/Utils/Env.hs @@ -520,14 +520,15 @@ tcExtendNameTyVarEnv :: [(Name,TcTyVar)] -> TcM r -> TcM r tcExtendNameTyVarEnv binds thing_inside -- this should be used only for explicitly mentioned scoped variables. -- thus, no coercion variables - = do { tc_extend_local_env NotTopLevel - [(name, ATyVar name tv) | (name, tv) <- binds] $ - tcExtendBinderStack tv_binds $ - thing_inside } + = tc_extend_local_env NotTopLevel names $ + tcExtendBinderStack tv_binds $ + thing_inside where tv_binds :: [TcBinder] tv_binds = [TcTvBndr name tv | (name,tv) <- binds] + names = [(name, ATyVar name tv) | (name, tv) <- binds] + isTypeClosedLetBndr :: Id -> Bool -- See Note [Bindings with closed types] in GHC.Tc.Types isTypeClosedLetBndr = noFreeVarsOfType . idType |