summaryrefslogtreecommitdiff
path: root/compiler/main/InteractiveEval.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-01-26 11:26:06 -0800
committerBartosz Nitka <niteria@gmail.com>2016-01-26 11:29:15 -0800
commit144ddb414a8a4f40df1ad9ab27fcdf38f30db4d3 (patch)
tree9cbb9a06a085a3e77997dc19a86ac5eb519250ca /compiler/main/InteractiveEval.hs
parent6817703b31840620cca8596ca62ed70633934972 (diff)
downloadhaskell-144ddb414a8a4f40df1ad9ab27fcdf38f30db4d3.tar.gz
Construct in_scope set in mkTopTCvSubst
The pre-condition on `mkTopTCvSubst` turned out to be wrong and not satisfied by any of the callers. I've fixed it, so that it constructs the in_scope set from the range of the substitution. `mkTopTCvSubst` was also unnecessarily general it is never called with `CoVars`, so I changed the type signature and added an assertion. Test Plan: ./validate --slow Reviewers: goldfire, simonpj, bgamari, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1801 GHC Trac Issues: #11371
Diffstat (limited to 'compiler/main/InteractiveEval.hs')
-rw-r--r--compiler/main/InteractiveEval.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index b7c2178fc3..f0df270044 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -543,13 +543,13 @@ bindLocalsAtBreakpoint hsc_env apStack_fhv (Just BreakInfo{..}) = do
let tv_subst = newTyVars us free_tvs
filtered_ids = [ id | (id, Just _hv) <- zip ids mb_hValues ]
(_,tidy_tys) = tidyOpenTypes emptyTidyEnv $
- map (substTyUnchecked tv_subst . idType) filtered_ids
+ map (substTy tv_subst . idType) filtered_ids
new_ids <- zipWith3M mkNewId occs tidy_tys filtered_ids
result_name <- newInteractiveBinder hsc_env (mkVarOccFS result_fs) span
let result_id = Id.mkVanillaGlobal result_name
- (substTyUnchecked tv_subst result_ty)
+ (substTy tv_subst result_ty)
result_ok = isPointer result_id
final_ids | result_ok = result_id : new_ids