diff --git a/src/Stack/Build/Haddock.hs b/src/Stack/Build/Haddock.hs index 7c2e67eb58..b8418f202e 100644 --- a/src/Stack/Build/Haddock.hs +++ b/src/Stack/Build/Haddock.hs @@ -203,7 +203,7 @@ generateHaddockIndex descr envOverride wc packageIDs docRelDir destDir = do readProcessNull (Just destDir) envOverride - (compilerExeName wc) + (haddockExeName wc) (["--gen-contents", "--gen-index"] ++ concatMap fst interfaceOpts) where toInterfaceOpt pid@(PackageIdentifier name _) = do diff --git a/src/Stack/Types/Compiler.hs b/src/Stack/Types/Compiler.hs index 9e76fbc1ac..51101c8cd0 100644 --- a/src/Stack/Types/Compiler.hs +++ b/src/Stack/Types/Compiler.hs @@ -75,3 +75,7 @@ isWantedCompiler _ _ _ = False compilerExeName :: WhichCompiler -> String compilerExeName Ghc = "ghc" compilerExeName Ghcjs = "ghcjs" + +haddockExeName :: WhichCompiler -> String +haddockExeName Ghc = "haddock" +haddockExeName Ghcjs = "haddock-ghcjs"