diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-08-13 22:12:27 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-08-13 22:12:27 +0100 |
commit | ed9ff6c9ba93f0759d276715fd1162edc4d21ad7 (patch) | |
tree | 16d254364cc613733f342d42744ef75360250e0d /src/Haddock/Interface/LexParseRn.hs | |
parent | 2ea02e816f5cdeb7d07ac2e788ab757d1e2e9058 (diff) |
Improve haddock memory usage
Diffstat (limited to 'src/Haddock/Interface/LexParseRn.hs')
-rw-r--r-- | src/Haddock/Interface/LexParseRn.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs index a5eb1143..3ad9719e 100644 --- a/src/Haddock/Interface/LexParseRn.hs +++ b/src/Haddock/Interface/LexParseRn.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -Wwarn #-} +{-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.LexParseRn @@ -78,7 +80,8 @@ processModuleHeader dflags gre safety mayStr = do tell ["haddock module header parse failed: " ++ msg] return failure Right (hmi, doc) -> do - let hmi' = hmi { hmi_description = rename dflags gre <$> hmi_description hmi } + let !descr = rename dflags gre <$> hmi_description hmi + hmi' = hmi { hmi_description = descr } doc' = rename dflags gre doc return (hmi', Just doc') return (hmi { hmi_safety = Just $ showPpr dflags safety }, doc) |