@@ -82,8 +82,8 @@ import Path.IO
82
82
, renameFile
83
83
)
84
84
import RIO.Process
85
- ( HasProcessContext , byteStringInput , doesExecutableExist
86
- , eceExitCode , findExecutable , getStderr , getStdout , inherit
85
+ ( HasProcessContext , byteStringInput , eceExitCode
86
+ , findExecutable , getStderr , getStdout , inherit
87
87
, modifyEnvVars , proc , runProcess_ , setStderr , setStdin
88
88
, setStdout , showProcessArgDebug , useHandleOpen , waitExitCode
89
89
, withProcessWait , withWorkingDir
@@ -1958,33 +1958,10 @@ singleBuild ac@ActionContext {..} ee@ExecuteEnv {..} task@Task {..} installedMap
1958
1958
mcurator <- view $ buildConfigL. to bcCurator
1959
1959
when (doHaddock mcurator package) $ do
1960
1960
announce " haddock"
1961
- sourceFlag <- if not (boptsHaddockHyperlinkSource eeBuildOpts)
1962
- then pure []
1963
- else do
1964
- -- See #2429 for why the temp dir is used
1965
- ec
1966
- <- withWorkingDir (toFilePath eeTempDir)
1967
- $ proc " haddock" [" --hyperlinked-source" ]
1968
- $ \ pc -> withProcessWait
1969
- (setStdout createSource $ setStderr createSource pc) $ \ p ->
1970
- runConcurrently
1971
- $ Concurrently (runConduit $ getStdout p .| CL. sinkNull)
1972
- *> Concurrently (runConduit $ getStderr p .| CL. sinkNull)
1973
- *> Concurrently (waitExitCode p)
1974
- case ec of
1975
- -- Fancy crosslinked source
1976
- ExitSuccess -> pure [" --haddock-option=--hyperlinked-source" ]
1977
- -- Older hscolour colouring
1978
- ExitFailure _ -> do
1979
- hscolourExists <- doesExecutableExist " HsColour"
1980
- unless hscolourExists $
1981
- prettyWarnL
1982
- [ flow " Warning: Haddock is not generating hyperlinked \
1983
- \sources because 'HsColour' not found on PATH (use"
1984
- , style Shell (flow " stack install hscolour" )
1985
- , flow " to install)."
1986
- ]
1987
- pure [" --hyperlink-source" | hscolourExists]
1961
+ let sourceFlag =
1962
+ [ " --haddock-option=--hyperlinked-source"
1963
+ | boptsHaddockHyperlinkSource eeBuildOpts
1964
+ ]
1988
1965
1989
1966
-- For GHC 8.4 and later, provide the --quickjump option.
1990
1967
actualCompiler <- view actualCompilerVersionL
0 commit comments