aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-07-16 21:22:48 +0100
committerIan Lynagh <igloo@earth.li>2012-07-16 21:22:48 +0100
commit4dc9ecd3905f75adb6bcfb818fbc163c724d4545 (patch)
tree3a58f6e3fb296fa5625038b4a9ef2515a4f7637c /src
parent45f24c7fb08b66f4160e94216599be6594f02416 (diff)
Fix haddock following some GHC changes
Passing _|_ as the Settings for defaultDynFlags no longer works well enough
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Main.hs b/src/Main.hs
index b80c0e96..a22f1ae4 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -218,7 +218,7 @@ render dflags flags ifaces installedIfaces srcMap = do
sourceUrls' = (srcBase, srcModule, srcMap')
libDir <- getHaddockLibDir flags
- prologue <- getPrologue flags
+ prologue <- getPrologue dflags flags
themes <- getThemes libDir flags >>= either bye return
when (Flag_GenIndex `elem` flags) $ do
@@ -404,13 +404,13 @@ updateHTMLXRefs packages = do
mapping' = [ (moduleName m, html) | (m, html) <- mapping ]
-getPrologue :: [Flag] -> IO (Maybe (Doc RdrName))
-getPrologue flags =
+getPrologue :: DynFlags -> [Flag] -> IO (Maybe (Doc RdrName))
+getPrologue dflags flags =
case [filename | Flag_Prologue filename <- flags ] of
[] -> return Nothing
[filename] -> do
str <- readFile filename
- case parseParas (tokenise (defaultDynFlags (panic "No settings")) str
+ case parseParas (tokenise dflags str
(1,0) {- TODO: real position -}) of
Nothing -> throwE $ "failed to parse haddock prologue from file: " ++ filename
Just doc -> return (Just doc)