diff --git a/ChangeLog.md b/ChangeLog.md index d0dae418a8..4cd418bfdd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,6 +14,8 @@ Other enhancements: Bug fixes: +* `--haddock-for-hackage` does not ignore `--haddock-arguments`. + ## v2.15.1 - 2024-02-09 Release notes: diff --git a/src/Stack/Build/ExecutePackage.hs b/src/Stack/Build/ExecutePackage.hs index a2898fc208..209b171451 100644 --- a/src/Stack/Build/ExecutePackage.hs +++ b/src/Stack/Build/ExecutePackage.hs @@ -596,20 +596,21 @@ singleBuild fulfillHaddockExpectations pname mcurator $ \keep -> do let args = concat - ( if isHaddockForHackage - then - [ [ "--for-hackage" ] ] - else - [ [ "--html" - , "--hoogle" - , "--html-location=../$pkg-$version/" - ] - , [ "--haddock-option=--hyperlinked-source" - | ee.buildOpts.haddockHyperlinkSource - ] - , [ "--internal" | ee.buildOpts.haddockInternal ] - , quickjump - ] + ( ( if isHaddockForHackage + then + [ [ "--for-hackage" ] ] + else + [ [ "--html" + , "--hoogle" + , "--html-location=../$pkg-$version/" + ] + , [ "--haddock-option=--hyperlinked-source" + | ee.buildOpts.haddockHyperlinkSource + ] + , [ "--internal" | ee.buildOpts.haddockInternal ] + , quickjump + ] + ) <> [ [ "--haddock-option=" <> opt | opt <- ee.buildOpts.haddockOpts.additionalArgs ]