aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/GHC.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Haddock/GHC.hs b/src/Haddock/GHC.hs
index 0d047080..7856273e 100644
--- a/src/Haddock/GHC.hs
+++ b/src/Haddock/GHC.hs
@@ -52,12 +52,13 @@ startGhc libDir flags = do
ghcLink = NoLink
}
dynflags''' <- parseGhcFlags dynflags'' restFlags flags
-#if __GLASGOW_HASKELL__ >= 609
- setSessionDynFlags dynflags'''
- ghcActs dynflags'''
+ defaultCleanupHandler dynflags''' $ do
+#if __GLASGOW_HASKELL__ >= 609
+ setSessionDynFlags dynflags'''
+ ghcActs dynflags'''
#else
- setSessionDynFlags session dynflags'''
- return (session, dynflags''')
+ setSessionDynFlags session dynflags'''
+ return (session, dynflags''')
#endif