Fix space leaks
authorSimon Marlow <marlowsd@gmail.com>
Mon, 18 Jun 2018 16:18:10 +0000 (17:18 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 16 Jul 2018 14:33:19 +0000 (15:33 +0100)
commit71f6b18ba365da9ee4795f6cbce6ec9f1bfe95e8
tree5c827256559249740703e47359ab8bfe43173560
parent8b6a9e5575fc848dc03b50b415aa57447654662f
Fix space leaks

Summary:
All these were detected by -fghci-leak-check when GHC was
compiled *without* optimisation (e.g. using the "quick" build flavour).

Unfortunately I don't know of a good way to keep this working.  I'd like
to just disable the -fghci-leak-check flag when the compiler is built
without optimisation, but it doesn't look like we have an easy way to do
that. And even if we could, it would be fragile anyway,

Test Plan: `cd testsuite/tests/ghci; make`

Reviewers: bgamari, hvr, erikd, tdammers

Subscribers: tdammers, rwbarton, thomie, carter

GHC Trac Issues: #15246

Differential Revision: https://phabricator.haskell.org/D4872
compiler/ghci/Linker.hs
compiler/iface/IfaceEnv.hs
compiler/main/DriverPipeline.hs
compiler/main/HscTypes.hs
compiler/typecheck/TcRnMonad.hs
compiler/utils/IOEnv.hs
ghc/GHCi/UI.hs
testsuite/tests/perf/compiler/all.T