diff options
author | Ian Lynagh <igloo@earth.li> | 2012-07-16 21:22:48 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-07-16 21:22:48 +0100 |
commit | 4dc9ecd3905f75adb6bcfb818fbc163c724d4545 (patch) | |
tree | 3a58f6e3fb296fa5625038b4a9ef2515a4f7637c | |
parent | 45f24c7fb08b66f4160e94216599be6594f02416 (diff) |
Fix haddock following some GHC changes
Passing _|_ as the Settings for defaultDynFlags no longer works well
enough
-rw-r--r-- | src/Main.hs | 8 |
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) |