Created
October 5, 2013 07:34
-
-
Save christiaanb/6837931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Haddock.hs b/src/Haddock.hs | |
index a7ac5ba..2cd220c 100644 | |
--- a/src/Haddock.hs | |
+++ b/src/Haddock.hs | |
@@ -113,6 +113,11 @@ handleGhcExceptions = | |
case e of | |
PhaseFailed _ code -> exitWith code | |
_ -> do | |
+ flags <- saveStaticFlagGlobals | |
+ unless (fst flags) $ do | |
+ _ <- parseStaticFlags [] | |
+ return () | |
+ | |
print (e :: GhcException) | |
exitFailure | |
@@ -318,7 +323,7 @@ withGhc libDir flags ghcActs = saveStaticFlagGlobals >>= \savedFlags -> do | |
(restFlags, _) <- parseStaticFlags (map noLoc flags) | |
runGhc (Just libDir) $ do | |
dynflags <- getSessionDynFlags | |
- let dynflags' = gopt_set dynflags Opt_Haddock | |
+ let dynflags' = dopt_set (gopt_set dynflags Opt_Haddock) Opt_D_dump_if_trace | |
let dynflags'' = dynflags' { | |
hscTarget = HscNothing, | |
ghcMode = CompManager, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment