aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/LexParseRn.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-08-13 23:58:46 +0100
committerIan Lynagh <ian@well-typed.com>2012-08-13 23:58:46 +0100
commit671b21146139d61339ee03b6afc33beab72ed63d (patch)
treee4905b955d0d91516e49dee131e1f6588396f85d /src/Haddock/Interface/LexParseRn.hs
parentbcc20b6bf309df26bd8b9f0d80b598eaf6cfcf42 (diff)
Improve haddock memory usage
Diffstat (limited to 'src/Haddock/Interface/LexParseRn.hs')
-rw-r--r--src/Haddock/Interface/LexParseRn.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs
index d68f78f8..09f2855c 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)