Fix GHCi space leaks (#15111)
authorSimon Marlow <marlowsd@gmail.com>
Tue, 1 May 2018 15:52:05 +0000 (16:52 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 17 May 2018 14:18:20 +0000 (15:18 +0100)
commitf27e4f624fe1270e8027ff0a14f03514f5be31b7
treeeb711910a70958b0ee9bcfca52050b45be10e178
parent5f15d53a98ad2f26465730d8c3463ccc58f6d94a
Fix GHCi space leaks (#15111)

Summary:
There were a number of leaks causing previously loaded modules to be
retained after a new `:load`.  This fixes enough leaks to get the
tests to pass from D4658.

Test Plan: See new tests in D4658

Reviewers: niteria, bgamari, simonpj, erikd

Subscribers: thomie, carter

GHC Trac Issues: #15111

Differential Revision: https://phabricator.haskell.org/D4659
compiler/iface/LoadIface.hs
compiler/main/HscTypes.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/haddock/all.T