Skip to content

Commit 738fe1d

Browse files
committed
Re #6270, further document --haddock-for-hackage
1 parent 72bb687 commit 738fe1d

File tree

2 files changed

+37
-17
lines changed

2 files changed

+37
-17
lines changed

doc/build_command.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ upload to Hackage.
247247

248248
For each local package, the generated Haddock documentation files are in
249249
directory `doc\html\<package_version>-docs\`, relative to Stack's dist work
250-
directory (see `stack path --dist-dir`).
250+
directory (see [`stack path --dist-dir`](path_command.md)).
251251

252252
If the flag is set:
253253

254-
* the [`--[no-]haddock-hyperlink-source`](#no-haddock-hyperlink-source-flag)
254+
* the [`--[no-]haddock-hyperlink-source`](#-no-haddock-hyperlink-source-flag)
255255
flag is ignored and `--haddock-hyperlink-source` is implied; and
256-
* the [`--[no-]haddock-internal`](#no-haddock-hyperlink-internal-flag) flag is
256+
* the [`--[no-]haddock-internal`](#-no-haddock-hyperlink-internal-flag) flag is
257257
ignored and `--no-haddock-internal` is implied.
258258

259259
!!! note
@@ -274,7 +274,7 @@ Default: Enabled
274274

275275
Unset the flag to disable building building hyperlinked source for Haddock.
276276

277-
If the [`--haddock-for-hackage`](#no-haddock-for-haddock-flag) flag is passed,
277+
If the [`--haddock-for-hackage`](#-no-haddock-for-haddock-flag) flag is passed,
278278
this flag is ignored.
279279

280280
### `--[no-]haddock-internal` flag
@@ -283,7 +283,7 @@ Default: Disabled
283283

284284
Set the flag to enable building Haddock documentation for internal modules.
285285

286-
If the [`--haddock-for-hackage`](#no-haddock-for-haddock-flag) flag is passed,
286+
If the [`--haddock-for-hackage`](#-no-haddock-for-haddock-flag) flag is passed,
287287
this flag is ignored.
288288

289289
### `--[no-]keep-going` flag

doc/yaml_configuration.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -434,41 +434,61 @@ build:
434434
# incorrectly formatted. This could also affect scripts which use Stack.
435435
haddock: false
436436
haddock-arguments:
437-
haddock-args: [] # Additional arguments passed to haddock, --haddock-arguments
437+
438+
# Additional arguments passed to haddock. The corresponding command line
439+
# option is --haddock-arguments. Example of use:
440+
#
438441
# haddock-args:
439442
# - "--css=/home/user/my-css"
440-
open-haddocks: false # --open
441-
haddock-deps: false # if unspecified, defaults to true if haddock is set
442-
haddock-for-hackage: false # if specified, implies haddock-internal: false and
443-
# haddock-hyperlink-source: true
444-
haddock-internal: false # ignored, if haddock-for-hackage: true
445-
haddock-hyperlink-source: true # ignored, if haddock-for-hackage: true
443+
haddock-args: []
444+
445+
# The corresponding command line flag is --[no-]open.
446+
open-haddocks: false
447+
448+
# If Stack is configured to build Haddock documentation, defaults to true.
449+
haddock-deps: false
450+
451+
# If specified, implies haddock-internal: false and
452+
# haddock-hyperlink-source: true. Since Stack UNRELEASED.
453+
haddock-for-hackage: false
454+
455+
# The configuration is ignored, if haddock-for-hackage: true.
456+
haddock-internal: false
457+
458+
# The configuration is ignored, if haddock-for-hackage: true.
459+
haddock-hyperlink-source: true
446460

447461
# These are inadvisable to use in your global configuration, as they make the
448462
# Stack build command line behave quite differently.
449463
test: false
450464
test-arguments:
451465
rerun-tests: true # Rerun successful tests
452-
additional-args: [] # --test-arguments
466+
467+
# The corresponding command line option is --test-arguments. Example of use:
468+
#
453469
# additional-args:
454470
# - "--fail-fast"
471+
additional-args: []
455472
coverage: false
456473
no-run-tests: false
457474
bench: false
458475
benchmark-opts:
459-
benchmark-arguments: ""
476+
477+
# Example of use:
478+
#
460479
# benchmark-arguments: "--csv bench.csv"
480+
benchmark-arguments: ""
461481
no-run-benchmarks: false
462482
force-dirty: false
463483
reconfigure: false
464484
cabal-verbose: false
465485
split-objs: false
466486

467-
# Since 1.8. Starting with 2.0, the default is true
487+
# Since Stack 1.8. Starting with Stack 2.0, the default is true
468488
interleaved-output: true
469-
# Since 2.13.1. Available options are none, count-only, capped and full.
489+
# Since Stack 2.13.1. Available options are none, count-only, capped and full.
470490
progress-bar: capped
471-
# Since 1.10.
491+
# Since Stack 1.10.
472492
ddump-dir: ""
473493
~~~
474494

0 commit comments

Comments
 (0)