[commit: haddock] master: Fixes #256 (c953c64)

git at git.haskell.org git at git.haskell.org
Wed Sep 18 23:25:32 CEST 2013


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/c953c649da38f78249fe67986d55784a020a1965

>---------------------------------------------------------------

commit c953c649da38f78249fe67986d55784a020a1965
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date:   Wed Sep 4 21:21:40 2013 +0100

    Fixes #256
    
    We inject -dynamic-too into flags before we run all our actions in the
    GHC monad.


>---------------------------------------------------------------

c953c649da38f78249fe67986d55784a020a1965
 src/Haddock.hs |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/Haddock.hs b/src/Haddock.hs
index 5f5b115..1deb640 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -136,7 +136,14 @@ haddock args = handleTopExceptions $ do
   shortcutFlags flags
   qual <- case qualification flags of {Left msg -> throwE msg; Right q -> return q}
 
-  withGhc' flags $ do
+  -- inject dynamic-too into flags before we proceed
+  flags' <- withGhc' flags $ do
+        df <- getDynFlags
+        case lookup "GHC Dynamic" (compilerInfo df) of
+          Just "YES" -> return $ Flag_OptGhc "-dynamic-too" : flags
+          _ -> return flags
+
+  withGhc' flags' $ do
 
     dflags <- getDynFlags
 




More information about the ghc-commits mailing list