diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-10-20 11:12:57 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-10-20 11:12:57 +0000 |
commit | 5ddb372746432ff0e1026f62171c1e0e3a705a6f (patch) | |
tree | 39ac5b5895e58d307fc4c320805249c1d8b67474 | |
parent | 97fdcaec2088d1d5c8eb318e423e484336b2439c (diff) |
Force interface more aggressively.
For running Haddock on GHC this reduces memory usage by about 50 MB on
a 32 bit system. A heap profile shows total memory usage peak at
about 100 MB, but actual usage is at around 300 MB even with
compacting GC (+RTS -c).
-rw-r--r-- | src/Haddock/Interface.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Haddock/Interface.hs b/src/Haddock/Interface.hs index 4835b08e..c8c03413 100644 --- a/src/Haddock/Interface.hs +++ b/src/Haddock/Interface.hs @@ -29,6 +29,7 @@ import qualified Data.Map as Map import Data.Map (Map) import Data.List import Control.Monad +import Control.Exception ( evaluate ) import GHC import Name @@ -148,6 +149,7 @@ processModule modsum flags modMap = dynflags let (interface, msg) = runWriter $ createInterface ghcMod flags modMap liftIO $ mapM_ putStrLn msg + liftIO $ evaluate interface return interface #else processModule :: Session -> ModSummary -> [Flag] -> ModuleMap -> IO Interface |