- new_ids = zipWith setIdType all_ids id_tys
-
- let ictxt = hsc_IC hsc_env
- type_env = ic_type_env ictxt
- bound_names = map idName new_ids
- -- Remove any shadowed bindings from the type_env;
- -- they are inaccessible but might, I suppose, cause
- -- a space leak if we leave them there
- old_bound_names = map idName (typeEnvIds (ic_type_env ictxt)) ;
- shadowed = [ n | name <- bound_names,
- n <- old_bound_names,
- nameOccName name == nameOccName n ] ;
- filtered_type_env = delListFromNameEnv type_env shadowed
- new_type_env = extendTypeEnvWithIds filtered_type_env new_ids
- old_tyvars = ic_tyvars ictxt
- new_ic = ictxt { ic_type_env = new_type_env,
- ic_tyvars = old_tyvars `unionVarSet` new_tyvars }
+ new_ids = zipWith setIdType all_ids tidy_tys
+ global_ids = map (globaliseId VanillaGlobal) new_ids
+
+ let ictxt = extendInteractiveContext (hsc_IC hsc_env)
+ global_ids new_tyvars
+