packages feed

stack 3.7.1 → 3.9.1

raw patch · 190 files changed

+3454/−6897 lines, 190 filesdep ~Cabaldep ~QuickCheckdep ~Win32setup-changed

Dependency ranges changed: Cabal, QuickCheck, Win32, bytestring, conduit-extra, containers, exceptions, extra, filelock, filepath, ghc-boot, hashable, hi-file-parser, hpc, hspec, microlens, open-browser, pantry, persistent-sqlite, rio, template-haskell, text, transformers, unix-compat, unordered-containers, zlib

Files

CONTRIBUTING.md view
@@ -39,8 +39,8 @@ Maintainers should be included in discussions of controversial changes and
 tricky code changes.
 
-Our general approach is **"it's easier to ask forgiveness than permission"**. If
-there is ever a bad change, it can always be rolled back.
+Our general approach is **"it is easier to ask forgiveness than permission"**.
+If there is ever a bad change, it can always be rolled back.
 
 ### Stack's maintainers
 
@@ -318,11 +318,11 @@ ## Code
 
 If you would like to contribute code to fix a bug, add a new feature, or
-otherwise improve `stack`, pull requests are most welcome. It's a good idea to
+otherwise improve `stack`, pull requests are most welcome. It is a good idea to
 [submit an issue](https://github.com/commercialhaskell/stack/issues/new) to
 discuss the change before plowing into writing code.
 
-If you'd like to help out but aren't sure what to work on, look for issues with
+If you'd like to help out but are not sure what to work on, look for issues with
 the
 [awaiting pull request](https://github.com/commercialhaskell/stack/issues?q=is%3Aopen+is%3Aissue+label%3A%22awaiting+pull+request%22)
 label. Issues that are suitable for newcomers to the codebase have the
@@ -330,12 +330,15 @@ label. Best to post a comment to the issue before you start work, in case anyone
 has already started.
 
-Please include a
-[ChangeLog](https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md)
-entry and
-[documentation](https://github.com/commercialhaskell/stack/tree/master/doc/)
-updates with your pull request.
+Please include with your pull request:
 
+* a
+  [ChangeLog](https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md)
+  entry; and
+
+* [documentation](https://github.com/commercialhaskell/stack/tree/master/doc/)
+  updates.
+
 ## Backwards Compatibility
 
 The Stack package provides a library and an executable (`stack`) that depends on
@@ -348,9 +351,10 @@ Stack aims to depend on well-known packages. The specific versions on which it
 depends at any time are specified by `package.yaml` and `stack.yaml`. It does
 not aim to be compatible with more than one version of the `Cabal` package at
-any time. At the time of writing (June 2025) the package versions are
-primarily ones in Stackage snapshot LTS Haskell 23.24 (for GHC 9.8.4) and
-`hpack-0.38.1`, `persistent-2.17.0.0` and `tls-2.1.8`.
+any time. At the time of writing (January 2026) the package versions are
+primarily ones in Stackage snapshot LTS Haskell 24.24 (for GHC 9.10.3), the
+latest version of `Cabal` released on Hackage (`Cabal-3.16.0.0`),
+`pantry-0.11.2`, and `persistent-2.18.0.0`.
 
 A Stack executable makes use of Cabal (the library) through a small 'Setup'
 executable that it compiles from Haskell source code. The executable compiles
@@ -358,12 +362,11 @@ specified GHC compiler. Each release of Stack will normally aim to support all
 versions of GHC and the Cabal package in Stackage LTS Haskell snapshots
 published within seven years of the release. For example, snapshot LTS Haskell
-12.0, published on 9 July 2018, was the first LTS Haskell snapshot to
-provide GHC 8.4.3 which comes with `base-4.11.1.0` and `Cabal-2.2.0.1`.
-Normally, until, at least, 9 July 2025, Stack releases would aim to support the
-immediate predecessor, GHC 8.2.2 and `base-4.10.1.0`, `Cabal-2.0.1.1` and
-Haddock 2.18.1. However, Stack 3.1.1 dropped support for versions of Cabal
-before 2.2. `Cabal-2.2.0.0` was released with GHC 8.4.1 on 8 March 2018.
+13.0, published on 23 December 2018, was the first LTS Haskell snapshot to
+provide GHC 8.6.3 which comes with `base-4.12.0.0` and `Cabal-2.4.0.1`.
+Normally, until, at least, 23 December 2025, Stack releases would aim to support
+the immediate predecessor, GHC 8.4.4 and `base-4.11.1.0`, `Cabal-2.2.0.1` and
+Haddock 2.20.0.
 
 When a version of the Stack executable actually ceases to support a version of
 GHC and `Cabal`, that should be recorded in Stack's
@@ -416,9 +419,21 @@ 
 ## Code syntax
 
-Stack makes use of GHC's `GHC2021` collection of language extensions, which is
+Stack makes use of GHC's `GHC2024` collection of language extensions. That is
 set using the `language` key in the `package.yaml` file.
 
+The `GHC2024` edition enables the `MonoLocalBinds` language extension. Enabling
+the extension can change how GHC infers the types of local bindings (that is,
+let-bound or where-bound variables). When enabled it means that the types of a
+group of local bindings are not generalised unless:
+
+* any of its binders has a partial type signature; or
+
+* all of its free variables are closed. If a variable is closed then its type
+  definitely has no free type variables. A variable imported from another module
+  is closed. A variable that is let-bound and has an explicit type signature
+  with no free type variables is closed.
+
 Stack makes use of single-constructor types where the constructor has a large
 number of fields. Some of those fields have similar types, and so on. Given
 that, Stack makes use of `OverloadedRecordDot`, introduced in GHC 9.2.1. It also
@@ -509,10 +524,10 @@ ~~~
 
 The `--file-watch` is a very useful option to get quick feedback. However,
-running the entire test suite after each file change will slow you down. You'll
-need to specify which test suite (unit test or integration) and pass arguments
-to specify which module you'd specifically like to run to get quick feedback. A
-description of this follows below.
+running the entire test suite after each file change will slow you down. You
+will need to specify which test suite (unit test or integration) and pass
+arguments to specify which module you'd specifically like to run to get quick
+feedback. A description of this follows below.
 
 
 If you would like to run the unit tests on their own, you can command:
@@ -545,7 +560,7 @@ [tests/integration](https://github.com/commercialhaskell/stack/tree/master/tests/integration)
 folder.
 
-Running the integration tests is a little involved, you'll need to command:
+Running the integration tests is a little involved, you will need to command:
 
 ~~~text
 stack build --flag stack:integration-tests stack --exec stack-integration-test
@@ -579,8 +594,8 @@ stack build --flag stack:integration-tests stack --exec "stack-integration-test -n <PATTERN1> -n <PATTERN2>"
 ~~~
 
-To disable folders named after `<PATTERN1>` and `<PATTERN2>`
-It's especially useful when some tests are taking a while to complete.
+to disable folders named after `<PATTERN1>` and `<PATTERN2>`. It is especially
+useful when some tests are taking a while to complete.
 
 On Linux, the `stack-integration-test` executable uses the `lld` linker and
 expects it to be on the PATH. The integration tests complete significantly
@@ -674,13 +689,35 @@ 
 [Stan](https://hackage.haskell.org/package/stan) is a Haskell static analysis
 tool. As of `stan-0.1.0.1`, it supports GHC >= 9.6.3 and Stack is built with
-GHC 9.8.4. The tool is configured by the contents of the `.stan.toml` file.
+GHC 9.10.3. The tool is configured by the contents of the `.stan.toml` file.
 
 This workflow will run if:
 
 * there is a pull request
 * requested
 
+## Change log
+
+Stack seeks to maintain a comprehesive and useful change log, that captures all
+changes that could be relevant to users of Stack. The change log is also
+published at <https://docs.haskellstack.org/> under menu item
+"More/Version history".
+
+The change log for each release or the current, unreleased, version of Stack is
+organised under one or more of the headings "Major changes", "Behavior changes",
+"Other enhancements" and "Bug fixes". Major changes are those anticipated to be
+important to many Stack users. The heading "Release notes" can also be used to
+communicate other important information about a release not categorised under
+those headings.
+
+Change log entries aim to be succinct and clear. The change log is not intended
+to be a substitute for high quality in-tool and online documentation.
+
+If you consider that the existing change log is incomplete, inaccurate or
+ambiguous, please
+[open an issue](https://github.com/commercialhaskell/stack/issues/new) at
+Stack's GitHub repository.
+
 ## Haskell Language Server
 
 You may be using [Visual Studio Code](https://code.visualstudio.com/) (VS Code)
@@ -823,7 +860,7 @@ 
 ## Slack channel
 
-If you're making deep changes and real-time communication with the Stack team
+If you are making deep changes and real-time communication with the Stack team
 would be helpful, we have a `#stack-collaborators` Slack channel in the
 Haskell Foundation workspace. To join the workspace, follow this
 [link](https://haskell-foundation.slack.com/join/shared_invite/zt-z45o9x38-8L55P27r12YO0YeEufcO2w#/shared-invite/email).
ChangeLog.md view
@@ -1,5 +1,60 @@ # Changelog
 
+## v3.9.1 - 2026-01-04
+
+**Changes since v3.7.1:**
+
+Behavior changes:
+
+* Where applicable and Stack supports the GHC version, only the wired-in
+  packages of the actual version of GHC used are treated as wired-in packages.
+* Stack now recognises `ghc-internal` as a GHC wired-in package.
+* The configuration option `package-index` has a new default value: the `keyids`
+  key lists the keys of the Hackage root key holders applicable from 2025-07-24.
+* Stack's `dot` command now treats `--depth` the same way as the
+  `ls dependencies` command, so that the nodes of
+  `stack dot --external --depth 0` are the same as the packages listed by
+  `stack ls dependencies --depth 0`.
+* When building GHC from source, on Windows, the default Hadrian build target is
+  `reloc-binary-dist` and the default path to the GHC built by Hadrian is
+  `_build/reloc-bindist`.
+* Stack's `haddock` command no longer requires a package to have a main library
+  that exposes modules.
+* On Windows, the path segment _platform_\\_hash_\\_ghc version_, under
+  `.stack-work\install` and `.stack-work\hoogle`, is hashed only once, rather
+  than twice.
+
+Other enhancements:
+
+* Bump to Hpack 0.39.1.
+* Consider GHC 9.14 to be a tested compiler and remove warnings.
+* Consider Cabal 3.16 to be a tested library and remove warnings.
+* From GHC 9.12.1, `base` is not a GHC wired-in package. In configuration files,
+  the `notify-if-base-not-boot` key is introduced, to allow the exisitng
+  notification to be muted if unwanted when using such GHC versions.
+* Add flag `--[no-]omit-this` (default: disabled) to Stack's `clean` command to
+  omit directories currently in use from cleaning (when `--full` is not
+  specified).
+* Add option `-w` as synonym for `--stack-yaml`.
+* `stack new` now allows `codeberg:` as a service for template downloads
+* In YAML configuration files, the `compiler-target` and
+  `compiler-bindist-path` keys are introduced to allow, when building GHC from
+  source, the Hadrian build target and Hadrian path to the built GHC to be
+  specified.
+
+Bug fixes:
+
+* `--PROG-option=<argument>` passes `--PROG-option=<argument>` (and not
+  `--PROG-option="<argument>"`) to Cabal (the library).
+* The message S-7151 now presents as an error, with advice, and not as a bug.
+* Stack's `dot` command now uses a box to identify all GHC wired-in packages,
+  not just those with no dependencies (being only `rts`).
+* Stack's `dot` command now gives all nodes with no dependencies in the graph
+  the maximum rank, not just those nodes with no relevant dependencies at all
+  (being only `rts`, when `--external` is specified).
+* Improved error messages for S-4634 and S-8215.
+* Improved in-app help for the `--hpack-force` flag.
+
 ## v3.7.1 - 2025-06-28
 
 **Changes since v3.5.1:**
@@ -23,7 +78,7 @@   environment variable. In previous versions of Stack, this affected
   `stack script` when copying a pre-compiled package from another package
   database.
-* On Windows, when decompressing, and extracting tools, from archive files,
+* On Windows, when decompressing, and extracting, tools from archive files,
   Stack uses the system temporary directory, rather than the root of the
   destination drive, if the former is on the destination drive.
 
@@ -168,10 +223,12 @@ * In YAML configuration files, the `global-hints-location` key is introduced to
   allow the location of the global hints YAML specification file to be
   specified.
-* By default, Hpack 0.20.0 or later will decline to overwrite a Cabal file that
-  was modified manually. In YAML configuration files, the `hpack-force` key is
-  introduced to allow Hpack to overwrite such a Cabal file. The corresponding
-  `--hpack-force` flag is also added.
+* By default, Hpack 0.12.0 or later will decline to overwrite a Cabal file that
+  was created by a more recent version of Hpack and Hpack 0.20.0 or later will
+  decline to overwrite a Cabal file that was modified manually. In YAML
+  configuration files, the `hpack-force` key is introduced to allow Hpack to
+  overwrite such a Cabal file. The corresponding `--hpack-force` flag is also
+  added.
 * Add the `stack config set recommend-stack-upgrade` command to configure
   whether or not Stack should notify the user if it identifes a new version of
   Stack is available in YAML configuration files.
@@ -652,7 +709,7 @@   [#5608](https://github.com/commercialhaskell/stack/pull/5608)
 * On Unix-like operating systems, respect the `with-gcc` option when installing
   GHC. See [#5609](https://github.com/commercialhaskell/stack/pull/5609)
-* Fixed logic in `get_isa()` in `get-stack.sh` to exclude systems that don't
+* Fixed logic in `get_isa()` in `get-stack.sh` to exclude systems that do not
   have x86 in their `uname -m` output. See
   [5792](https://github.com/commercialhaskell/stack/issues/5792).
 * Fixed output of `stack ls snapshots local` on Windows, to behave like that on
@@ -667,7 +724,7 @@ 
 Behavior changes:
 
-* Cloning git repositories isn't per sub-directory anymore, see
+* Cloning git repositories is not per sub-directory anymore, see
   [#5411](https://github.com/commercialhaskell/stack/issues/5411)
 
 Other enhancements:
@@ -843,10 +900,11 @@ Release notes:
 
 * We have reduced the number of platforms that we support with executable
-  releases. The reason behind this is that we've been slowed down in our release
-  process until now with issues trying to build executables for less common
-  platforms. In order to make sure we can address issues more quickly (like
-  supporting new GHC versions), we're limiting support from the Stack team to:
+  releases. The reason behind this is that we have been slowed down in our
+  release process until now with issues trying to build executables for less
+  common platforms. In order to make sure we can address issues more quickly
+  (like supporting new GHC versions), we are limiting support from the Stack
+  team to:
 
     * Linux 64-bit/x86_64 (statically-linked)
     * macOS x86_64
@@ -946,8 +1004,8 @@   Previously, if you SIGTERMed at the wrong time while running a script, you
   could end up with an inconsistent database state.
 
-* `--resolver global` doesn't retrieve snapshots list from the internet because
-  doesn't need it. See
+* `--resolver global` does not retrieve snapshots list from the internet because
+  does not need it. See
   [#5103](https://github.com/commercialhaskell/stack/issues/5103)
 
 * Fix using relative links in haddocks output.  See
@@ -1213,7 +1271,7 @@   now include package names so they can be more easily copy-pasted.
 * Git repos are shared across multiple projects. See
   [#3551](https://github.com/commercialhaskell/stack/issues/3551)
-* Use en_US.UTF-8 locale by default in pure Nix mode so programs won't
+* Use en_US.UTF-8 locale by default in pure Nix mode so programs will not
   crash because of Unicode in their output
   [#4095](https://github.com/commercialhaskell/stack/issues/4095)
 * Add `--tree` to `ls dependencies` to list dependencies as tree.
@@ -1235,7 +1293,7 @@   with packages from Hackage, not Git repos or archives.
 * When using the script interpreter with `--optimize` or `--compile`,
   Stack will perform an optimization of checking whether a newer
-  executable exists, making reruns significantly faster. There's a
+  executable exists, making reruns significantly faster. There is a
   downside to this, however: if you have a multifile script, and
   change one of the dependency modules, Stack will not automatically
   detect and recompile.
@@ -1313,7 +1371,7 @@ * Fix for git packages to update submodules to the correct state. See
   [#4314](https://github.com/commercialhaskell/stack/pull/4314)
 * Add `--cabal-files` flag to `stack ide targets` command.
-* Don't download ghc when using `stack clean`.
+* Do not download ghc when using `stack clean`.
 * Support loading in GHCi definitions from symlinked C files. Without this
   patch, Stack will try to find object files in the directory pointed to
   by symlinks, while GCC will produce the object files in the original
@@ -1352,7 +1410,7 @@   [#4488](https://github.com/commercialhaskell/stack/issues/4488)
 * Docker: fix detection of expected subprocess failures.  This fixes
   downloading a compatible `stack` executable  when the host `stack` is not
-  compatible with the Docker image (on Linux), and doesn't show an unnecessary
+  compatible with the Docker image (on Linux), and does not show an unnecessary
   extra error when the in-container re-exec'ed `stack` exits with failure.
 * The `stack ghci` command's `--ghc-options` flag now parses multiple options.
   See [#3315](https://github.com/commercialhaskell/stack/issues/3315).
@@ -1597,10 +1655,10 @@ * `stack setup --verbose` causes verbose output of GHC configure process.
   See [#3716](https://github.com/commercialhaskell/stack/issues/3716)
 * Improve the error message when an `extra-dep` from a path or git reference
-  can't be found. See
+  cannot be found. See
   [#3808](https://github.com/commercialhaskell/stack/pull/3808)
 * Nix integration is now disabled on windows even if explicitly enabled,
-  since it isn't supported. See
+  since it is not supported. See
   [#3600](https://github.com/commercialhaskell/stack/issues/3600)
 * `stack build` now supports a new flag `--keep-tmp-files` to retain
   intermediate files and directories for the purpose of debugging. It is best
@@ -1621,7 +1679,7 @@   [#3658](https://github.com/commercialhaskell/stack/issues/3658).
   In particular, this makes it possible to pass `-- +RTS ... -RTS` to specify
   RTS arguments used when running the script.
-* Don't ignore the template `year` parameter in config files, and clarify the
+* Do not ignore the template `year` parameter in config files, and clarify the
   surrounding documentation. See
   [#2275](https://github.com/commercialhaskell/stack/issues/2275).
 * Benchmarks used to be run concurrently with other benchmarks
@@ -1649,8 +1707,8 @@ * `stack ghci` now replaces the Stack process with ghci. This improves
   signal handling behavior. In particular, handling of Ctrl-C.  To make
   this possible, the generated files are now left behind after exit.
-  The paths are based on hashing file contents, and it's stored in the
-  system temporary directory, so this shouldn't result in too much
+  The paths are based on hashing file contents, and it is stored in the
+  system temporary directory, so this should not result in too much
   garbage. See
   [#3821](https://github.com/commercialhaskell/stack/issues/3821).
 
@@ -1780,7 +1838,7 @@ * The `with-hpack` configuration option specifies an Hpack executable to use
   instead of the Hpack bundled with Stack. Please
   see [#3179](https://github.com/commercialhaskell/stack/issues/3179).
-* It's now possible to skip tests and benchmarks using `--skip`
+* It is now possible to skip tests and benchmarks using `--skip`
   flag
 * `GitSHA1` is now `StaticSHA256` and is implemented using the
   `StaticSize 64 ByteString` for improved performance. See
@@ -1822,7 +1880,7 @@ * Better descriptions are now available for `stack upgrade --help`. See:
   [#3070](https://github.com/commercialhaskell/stack/issues/3070)
 * When using Nix, nix-shell now depends always on gcc to prevent build errors
-  when using the FFI. As ghc depends on gcc anyway, this doesn't increase the
+  when using the FFI. As ghc depends on gcc anyway, this does not increase the
   dependency footprint.
 * `--cwd DIR` can now be passed to `stack exec` in order to execute the
   program in a different directory. See:
@@ -1840,7 +1898,7 @@ * Log when each individual test suite finishes. See:
   [#3552](https://github.com/commercialhaskell/stack/issues/3552).
 * Avoid spurious rebuilds when using `--file-watch` by not watching files for
-  executable, test and benchmark components that aren't a target. See:
+  executable, test and benchmark components that are not a target. See:
   [#3483](https://github.com/commercialhaskell/stack/issues/3483).
 * Stack will now try to detect the width of the running terminal
   (only on POSIX for the moment) and use that to better display
@@ -1859,7 +1917,7 @@   [#3534](https://github.com/commercialhaskell/stack/issues/3534)
 * GHC binary distributions can now be identified by their SHA256 checksum in
   addition to their SHA1 checksum, allowing for more security in download.
-* For filesystem setup-info paths, it's no longer assumed that the
+* For filesystem setup-info paths, it is no longer assumed that the
   directory is writable, instead a temp dir is used.  See
   [#3188](https://github.com/commercialhaskell/stack/issues/3188).
 
@@ -1872,7 +1930,7 @@ * `stack haddock` now includes package names for all modules in the
    Haddock index page. See:
   [#2886](https://github.com/commercialhaskell/stack/issues/2886)
-* Fixed an issue where Stack wouldn't detect missing Docker images
+* Fixed an issue where Stack would not detect missing Docker images
   properly with newer Docker versions.
   [#3171](https://github.com/commercialhaskell/stack/pull/3171)
 * Previously, Cabal files with just test-suite could cause build to fail
@@ -1922,7 +1980,7 @@   [#3562](https://github.com/commercialhaskell/stack/issues/3562)
 * Fixes a bug that has existed since 1.5.0, where
   `stack setup --upgrade-cabal` would say that Cabal is already the latest
-  version, when it wasn't.
+  version, when it was not.
 * Ensure that an `extra-dep` from a local directory is not treated as
   a `$locals` for GHC options purposes. See
   [#3574](https://github.com/commercialhaskell/stack/issues/3574).
@@ -1978,7 +2036,7 @@   of sources being included in Haddock output.
   See [#3099](https://github.com/commercialhaskell/stack/issues/3099)
 * `stack ghci` will now skip building all local targets, even if they have
-  downstream deps, as long as it's registered in the DB.
+  downstream deps, as long as it is registered in the DB.
 * The `pvp-bounds` feature now supports adding `-revision` to the end of each
   value, e.g. `pvp-bounds: both-revision`. This means that, when uploading to
   Hackage, Stack will first upload your tarball with an unmodified Cabal file,
@@ -2011,7 +2069,7 @@ * Fixes case where `stack build --profile` might not cause executables /
   tests / benchmarks to be rebuilt.
   See [#2984](https://github.com/commercialhaskell/stack/issues/2984)
-* `stack ghci file.hs` now loads the file even if it isn't part of
+* `stack ghci file.hs` now loads the file even if it is not part of
   your project.
 * `stack clean --full` now works when docker is enabled.
   See [#2010](https://github.com/commercialhaskell/stack/issues/2010)
@@ -2027,7 +2085,7 @@   groups on Ubuntu Yakkety (16.10).
   See [#3092](https://github.com/commercialhaskell/stack/issues/3092)
 * Switching a package between extra-dep and local package now forces
-  rebuild (previously it wouldn't if versions were the same).
+  rebuild (previously it would not if versions were the same).
   See [#2147](https://github.com/commercialhaskell/stack/issues/2147)
 * `stack upload` no longer reveals your password when you type it on
   MinTTY-based Windows shells, such as Cygwin and MSYS2.
@@ -2263,7 +2321,7 @@   [#2647](https://github.com/commercialhaskell/stack/issues/2647).
 * The `--main-is` flag for GHCI now implies the TARGET, fixing
   [#1845](https://github.com/commercialhaskell/stack/issues/1845).
-* `stack ghci` no longer takes all build options, as many weren't useful
+* `stack ghci` no longer takes all build options, as many were not useful
   [#2199](https://github.com/commercialhaskell/stack/issues/2199)
 * `--no-time-in-log` option, to make verbose logs more diffable
   [#2727](https://github.com/commercialhaskell/stack/issues/2727)
@@ -2514,8 +2572,8 @@   --compiler-exe`. See
   [#2123](https://github.com/commercialhaskell/stack/issues/2123)
 * For packages specified in terms of a git or hg repo, the hash used in the
-  location has changed.  This means that existing downloads from older stack
-  versions won't be used.  This is a side-effect of the fix to
+  location has changed.  This means that existing downloads from older Stack
+  versions will not be used.  This is a side-effect of the fix to
   [#2133](https://github.com/commercialhaskell/stack/issues/2133)
 * `stack upgrade` no longer pays attention to local `stack.yaml` files, just the
   global config and CLI options.
@@ -2592,7 +2650,7 @@   `sdist`)
 * GPG signing of packages while uploading to Hackage is now the default. Use
   `upload --no-signature` if you would rather not contribute your package
-  signature. If you don't yet have a GPG keyset, read this
+  signature. If you do not yet have a GPG keyset, read this
   [blog post on GPG keys](https://fpcomplete.com/blog/2016/05/stack-security-gnupg-keys).
   We can add a `stack.yaml` config setting to disable signing if some people
   desire it. We hope that people will sign. Later we will be adding GPG
@@ -2704,7 +2762,7 @@ 
 Bug fixes:
 
-* Don't delete contents of ~/.ssh when using `stack clean --full` with Docker
+* Do not delete contents of ~/.ssh when using `stack clean --full` with Docker
   enabled [#2000](https://github.com/commercialhaskell/stack/issues/2000)
 
 ## 1.0.4.2 - 2016-03-09
@@ -2783,7 +2841,7 @@ * Add space before auto-generated bench opts (makes profiling options work
   uniformly for applications and benchmark suites)
   [#1771](https://github.com/commercialhaskell/stack/issues/1771).
-* Don't try to find plugin if it resembles flag.
+* Do not try to find plugin if it resembles flag.
 * Setup.hs changes cause package dirtiness
   [#1711](https://github.com/commercialhaskell/stack/issues/1711).
 * Send "stack templates" output to stdout
@@ -2815,7 +2873,7 @@ - Docker: pass supplementary groups and umask into container
 - If git fetch fails wipe the directory and try again from scratch
   [#1418](https://github.com/commercialhaskell/stack/issues/1418)
-- Warn if newly installed executables won't be available on the PATH
+- Warn if newly installed executables will not be available on the PATH
   [#1362](https://github.com/commercialhaskell/stack/issues/1362)
 - `stack.yaml`: for `stack image container`, specify multiple images to
   generate, and which executables should be added to those images
@@ -2828,7 +2886,7 @@ 
 Bug fixes:
 
-- Don't share precompiled packages between GHC/platform variants and Docker
+- Do not share precompiled packages between GHC/platform variants and Docker
   [#1551](https://github.com/commercialhaskell/stack/issues/1551)
 - Properly redownload corrupted downloads with the correct file size.
   [Mailing list discussion](https://groups.google.com/d/msg/haskell-stack/iVGDG5OHYxs/FjUrR5JsDQAJ)
@@ -2855,7 +2913,7 @@ 
 Release notes:
 
-*  We're calling this version 1.0.0 in preparation for Stackage
+*  We are calling this version 1.0.0 in preparation for Stackage
    LTS 4.  Note, however, that this does not mean the code's API
    will be stable as this is primarily an end-user tool.
 
@@ -2906,7 +2964,7 @@   [#1480](https://github.com/commercialhaskell/stack/issues/1480)
 * Restrict commands allowed in interpreter mode
   [#1504](https://github.com/commercialhaskell/stack/issues/1504)
-* `stack ghci` doesn't see preprocessed files for executables
+* `stack ghci` does not see preprocessed files for executables
   [#1347](https://github.com/commercialhaskell/stack/issues/1347)
 * All test suites run even when only one is requested
   [#1550](https://github.com/commercialhaskell/stack/pull/1550)
@@ -2979,12 +3037,12 @@ * Docker-built binaries and libraries in different path
   [#911](https://github.com/commercialhaskell/stack/issues/911)
   [#1367](https://github.com/commercialhaskell/stack/issues/1367)
-* Docker: `--resolver` argument didn't effect selected image tag
+* Docker: `--resolver` argument did not effect selected image tag
 * GHCi: Spaces in filepaths caused module loading issues
   [#1401](https://github.com/commercialhaskell/stack/issues/1401)
-* GHCi: cpp-options in Cabal files weren't used
+* GHCi: cpp-options in Cabal files were not used
   [#1419](https://github.com/commercialhaskell/stack/issues/1419)
-* Benchmarks couldn't be run independently of each other
+* Benchmarks could not be run independently of each other
   [#1412](https://github.com/commercialhaskell/stack/issues/1412)
 * Send output of building setup to stderr
   [#1410](https://github.com/commercialhaskell/stack/issues/1410)
@@ -3057,7 +3115,7 @@   [#1105](https://github.com/commercialhaskell/stack/issues/1105)
 * Fix: Global options did not work consistently after subcommand
   [#519](https://github.com/commercialhaskell/stack/issues/519)
-* Fix: 'stack ghci' doesn't notice that a module got deleted
+* Fix: 'stack ghci' does not notice that a module got deleted
   [#1180](https://github.com/commercialhaskell/stack/issues/1180)
 * Rebuild when Cabal file is changed
 * Fix: Paths in GHC warnings not canonicalized, nor those for packages in
@@ -3106,7 +3164,7 @@   [#1089](https://github.com/commercialhaskell/stack/issues/1089)
 * Docker: download or override location of Stack executable to re-run in
   container [#974](https://github.com/commercialhaskell/stack/issues/974)
-* Docker: when Docker Engine is remote, don't run containerized processes as
+* Docker: when Docker Engine is remote, do not run containerized processes as
   host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
 * Docker: `set-user` option to enable/disable running containerized processes as
   host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
@@ -3178,7 +3236,7 @@ * Added `--file-watch-poll` flag for polling instead of using filesystem events
   (useful for running tests in a Docker container while modifying code in the
   host environment. When code is injected into the container via a volume, the
-  container won't propagate filesystem events).
+  container will not propagate filesystem events).
 * Give a preemptive error message when `-prof` is given as a GHC option
   [#1015](https://github.com/commercialhaskell/stack/issues/1015)
 * Locking is now optional, and will be turned on by setting the `STACK_LOCK`
@@ -3195,7 +3253,7 @@   [#806](https://github.com/commercialhaskell/stack/issues/806)
 * Build executables for local extra-deps
   [#920](https://github.com/commercialhaskell/stack/issues/920)
-* copyFile can't handle directories
+* copyFile cannot handle directories
   [#942](https://github.com/commercialhaskell/stack/pull/942)
 * Support for spaces in Haddock interface files
   [fpco/minghc#85](https://github.com/fpco/minghc/issues/85)
@@ -3268,7 +3326,7 @@ * More intelligent logic for setting UTF-8 locale environment variables
   [#856](https://github.com/commercialhaskell/stack/issues/856)
 * Create missing directories for `stack sdist`
-* Don't ignore Cabal files with extra periods
+* Do not ignore Cabal files with extra periods
   [#895](https://github.com/commercialhaskell/stack/issues/895)
 * Deprecate unused `--optimizations` flag
 * Truncated output on slow terminals
@@ -3307,7 +3365,7 @@ * Track build status of tests and benchmarks
   [#525](https://github.com/commercialhaskell/stack/issues/525)
 * `--no-run-tests` [#517](https://github.com/commercialhaskell/stack/pull/517)
-* Targets outside of root dir don't build
+* Targets outside of root dir do not build
   [#366](https://github.com/commercialhaskell/stack/issues/366)
 * Upper limit on number of flag combinations to test
   [#543](https://github.com/commercialhaskell/stack/issues/543)
@@ -3317,7 +3375,7 @@   `--copy-bins` [#342](https://github.com/commercialhaskell/stack/issues/342)
 * Custom snapshots [#111](https://github.com/commercialhaskell/stack/issues/111)
 * --force-dirty flag: Force treating all local packages as having dirty files
-  (useful for cases where Stack can't detect a file change)
+  (useful for cases where Stack cannot detect a file change)
 * GHC error messages: display file paths as absolute instead of relative for
   better editor integration
 * Add the `--copy-bins` option
@@ -3325,7 +3383,7 @@ * Give warnings on unexpected config keys
   [#48](https://github.com/commercialhaskell/stack/issues/48)
 * Remove Docker `pass-host` option
-* Don't require `cabal-install` to upload
+* Do not require `cabal-install` to upload
   [#313](https://github.com/commercialhaskell/stack/issues/313)
 * Generate indexes for all deps and all installed snapshot packages
   [#143](https://github.com/commercialhaskell/stack/issues/143)
@@ -3352,7 +3410,7 @@   default [#449](https://github.com/commercialhaskell/stack/issues/449)
 * Fix: haddock forces rebuild of empty packages
   [#452](https://github.com/commercialhaskell/stack/issues/452)
-* Don't copy over executables excluded by component selection
+* Do not copy over executables excluded by component selection
   [#605](https://github.com/commercialhaskell/stack/issues/605)
 * Fix: Stack fails on Windows with git package in `stack.yaml` and no git
   executable on the PATH
@@ -3374,11 +3432,11 @@ * Add `--force` flag to `init` command
 * exec style commands accept the `--package` option (see
   [Reddit discussion](http://www.reddit.com/r/haskell/comments/3bd66h/stack_runghc_turtle_as_haskell_script_solution/))
-* `stack upload` without arguments doesn't do anything
+* `stack upload` without arguments doe snot do anything
   [#439](https://github.com/commercialhaskell/stack/issues/439)
 * Print latest version of packages on conflicts
   [#450](https://github.com/commercialhaskell/stack/issues/450)
-* Flag to avoid rerunning tests that haven't changed
+* Flag to avoid rerunning tests that have not changed
   [#451](https://github.com/commercialhaskell/stack/issues/451)
 * Stack can act as a script interpreter (see [Script interpreter]
   (https://github.com/commercialhaskell/stack/wiki/Script-interpreter) and
@@ -3418,7 +3476,7 @@ * Give a reason for unregistering packages
   [#389](https://github.com/commercialhaskell/stack/issues/389)
 * `stack exec` accepts the `--no-ghc-package-path` parameter
-* Don't require build plan to upload
+* Do not require build plan to upload
   [#400](https://github.com/commercialhaskell/stack/issues/400)
 * Specifying test components only builds/runs those tests
   [#398](https://github.com/commercialhaskell/stack/issues/398)
@@ -3442,7 +3500,7 @@ 
 ## 0.1.0.0 - 2015-06-23
 
-* Fall back to Cabal dependency solver when a snapshot can't be found
+* Fall back to Cabal dependency solver when a snapshot cannot be found
 * Basic implementation of `stack new`
   [#137](https://github.com/commercialhaskell/stack/issues/137)
 * `stack solver` command
@@ -3491,4 +3549,4 @@ 
 ## 0.0.1 - 2015-06-09
 
-* First public release, beta quality
+* First public release, as the Haskell Tool Stack (beta quality).
LICENSE view
@@ -1,7 +1,7 @@ Stack
 =====
 
-Copyright (c) 2015-2025, Stack contributors. All rights reserved.
+Copyright (c) 2015-2026, Stack contributors. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:
README.md view
@@ -1,10 +1,12 @@-## The Haskell Tool Stack
+## Stack
 
 [![Unit tests](https://github.com/commercialhaskell/stack/workflows/Unit%20tests/badge.svg)](https://github.com/commercialhaskell/stack/actions/workflows/unit-tests.yml)
 [![Integration tests](https://github.com/commercialhaskell/stack/workflows/Integration%20tests/badge.svg)](https://github.com/commercialhaskell/stack/actions/workflows/integration-tests.yml)
 [![Release](https://img.shields.io/github/release/commercialhaskell/stack.svg)](https://github.com/commercialhaskell/stack/releases)
 
-Stack is a cross-platform program for developing Haskell projects. It is intended for Haskellers both new and experienced.
+Stack is a program for developing Haskell projects. It is aimed at new and
+experienced users of Haskell and seeks to support them fully on Linux, macOS
+and Windows.
 
 See [haskellstack.org](http://haskellstack.org), or the [doc](./doc) directory
 of this repository, for more information.
Setup.hs view
@@ -25,6 +25,7 @@ import           Distribution.Types.PackageName ( unPackageName )
 import           Distribution.Types.UnqualComponentName
                    ( unUnqualComponentName )
+import           Distribution.Utils.Path ( interpretSymbolicPathCWD )
 import           Distribution.Verbosity ( Verbosity, normal )
 import           System.FilePath ( (</>) )
 
@@ -47,7 +48,7 @@   -> LocalBuildInfo
   -> IO ()
 generateBuildModule verbosity pkg lbi = do
-  let dir = autogenPackageModulesDir lbi
+  let dir = interpretSymbolicPathCWD (autogenPackageModulesDir lbi)
   createDirectoryIfMissingVerbose verbosity True dir
   withLibLBI pkg lbi $ \_ libcfg -> do
     withExeLBI pkg lbi $ \exe clbi -> do
+ SetupHooks.hs view
@@ -0,0 +1,103 @@+{-# LANGUAGE OverloadedStrings #-}
+
+-- | See https://github.com/well-typed/hooks-build-type. As part of their work,
+-- Well-Typed reviewed stack-2.13.1 and identified that it used a pre-build hook
+-- to generate, for the stack main library component, a module that lists all
+-- the dependencies of stack (both library and executable), which is used in
+-- `Stack.BuildInfo` to be listed. They also wrote an experimental patch, the
+-- source code of which is below (with some reformatting).
+--
+-- This would be used if Stack's build type was 'Hooks' rather than 'Custom'.
+
+module SetupHooks
+  ( setupHooks
+  ) where
+
+import           Data.List ( nub, sortBy )
+import           Data.Ord ( comparing )
+import           Distribution.InstalledPackageInfo
+                   ( installedUnitId, sourcePackageId )
+import           Distribution.Package
+                   ( PackageId, UnitId, packageName, packageVersion )
+import           Distribution.PackageDescription
+                   ( PackageDescription (..), Executable (..), componentNameRaw
+                   )
+import           Distribution.Pretty ( prettyShow )
+import           Distribution.Simple
+                   ( UserHooks(..), defaultMainWithHooks, simpleUserHooks )
+import           Distribution.Simple.BuildPaths ( autogenComponentModulesDir )
+import           Distribution.Simple.LocalBuildInfo
+import           Distribution.Simple.PackageIndex
+                   ( allPackages, dependencyClosure )
+import           Distribution.Simple.Setup ( BuildFlags (..), fromFlag )
+import           Distribution.Simple.SetupHooks
+import           Distribution.Simple.Utils
+                   ( createDirectoryIfMissingVerbose, rewriteFileEx )
+import           Distribution.Types.PackageName ( PackageName, unPackageName )
+import           Distribution.Types.UnqualComponentName
+                   ( unUnqualComponentName )
+import           Distribution.Verbosity ( Verbosity, normal )
+import           System.FilePath ( (</>) )
+
+setupHooks :: SetupHooks
+setupHooks =
+  noSetupHooks
+    { buildHooks =
+       noBuildHooks
+         { preBuildComponentHook = Just preBuildHook }
+    }
+
+preBuildHook :: BuildingWhat -> LocalBuildInfo -> TargetInfo -> IO ()
+preBuildHook flags lbi tgt
+  | CLibName LMainLibName <- componentName $ targetComponent tgt =
+      generateBuildModule (buildingWhatVerbosity flags) (localPkgDescr lbi)
+        lbi tgt
+  | otherwise = pure ()
+
+generateBuildModule ::
+     Verbosity
+  -> PackageDescription
+  -> LocalBuildInfo
+  -> TargetInfo
+  -> IO ()
+generateBuildModule verbosity pkg lbi mainLibTargetInfo = do
+  -- Generate a module in the stack library component that lists all the
+  -- dependencies of stack (both the library and the executable).
+  createDirectoryIfMissingVerbose verbosity True autogenDir
+  withExeLBI pkg lbi $ \ _ exeCLBI -> do
+    rewriteFileEx normal buildModulePath $ unlines
+      [ "module Build_" ++ pkgNm
+      , "  ( deps"
+      , "  ) where"
+      , ""
+      , "deps :: [String]"
+      , "deps = " ++ (show $ formatdeps (transDeps mainLibCLBI exeCLBI))
+      ]
+  where
+    mainLibCLBI = targetCLBI mainLibTargetInfo
+    autogenDir = autogenComponentModulesDir lbi mainLibCLBI
+    pkgNm :: String
+    pkgNm = unPackageName' $ package pkg
+    buildModulePath = autogenDir </> "Build_" ++ pkgNm ++ ".hs"
+    formatdeps = map formatone . sortBy (comparing unPackageName')
+    formatone p = unPackageName' p ++ "-" ++ prettyShow (packageVersion p)
+    unPackageName' = unPackageName . packageName
+    transDeps xs ys = either
+      (map sourcePackageId . allPackages)
+      handleDepClosureFailure $ dependencyClosure allInstPkgsIdx availInstPkgIds
+     where
+      allInstPkgsIdx = installedPkgs lbi
+      allInstPkgIds = map installedUnitId $ allPackages allInstPkgsIdx
+      -- instPkgIds includes `stack-X.X.X`, which is not a dependency hence is
+      -- missing from allInstPkgsIdx. Filter that out.
+      availInstPkgIds = filter (`elem` allInstPkgIds) $ testDeps xs ys
+      handleDepClosureFailure unsatisfied =
+        error $
+             "Computation of transitive dependencies failed."
+          ++ if null unsatisfied
+               then ""
+               else " Unresolved dependencies: " ++ show unsatisfied
+
+testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [UnitId]
+testDeps xs ys =
+  map fst $ nub $ componentPackageDeps xs ++ componentPackageDeps ys
cabal.config view
@@ -1,16 +1,17 @@ constraints:
-  , Cabal ==3.10.3.0
-  , Cabal-syntax ==3.10.3.0
+  , Cabal ==3.16.0.0
+  , Cabal-syntax ==3.16.0.0
   , Glob ==0.10.2
   , OneTuple ==0.4.2
-  , QuickCheck ==2.14.3
+  , QuickCheck ==2.15.0.1
   , StateVar ==1.2.2
-  , Win32 ==2.13.4.0
+  , Win32 ==2.14.1.0
   , aeson ==2.2.3.0
   , aeson-warning-parser ==0.1.1
+  , alex ==3.5.4.0
   , annotated-wl-pprint ==0.7.0
-  , ansi-terminal ==1.1.2
-  , ansi-terminal-types ==1.1
+  , ansi-terminal ==1.1.4
+  , ansi-terminal-types ==1.1.3
   , appar ==0.1.8
   , array ==0.5.8.0
   , asn1-encoding ==0.9.6
@@ -18,24 +19,25 @@   , asn1-types ==0.3.4
   , assoc ==1.1.1
   , async ==2.2.5
+  , atomic-counter ==0.1.2.4
   , attoparsec ==0.14.4
   , attoparsec-aeson ==2.2.2.0
   , auto-update ==0.2.6
-  , base ==4.19.2.0
+  , base ==4.20.2.0
   , base-orphans ==0.9.3
   , base16-bytestring ==1.0.2.0
   , base64-bytestring ==1.2.1.0
   , basement ==0.0.16
   , bifunctors ==5.6.2
-  , binary ==0.8.9.1
+  , binary ==0.8.9.3
   , bitvec ==1.1.5.0
-  , blaze-builder ==0.4.3
+  , blaze-builder ==0.4.4.1
   , blaze-html ==0.9.2.0
   , blaze-markup ==0.8.3.0
   , byteorder ==1.0.4
-  , bytestring ==0.12.1.0
-  , casa-client ==0.0.2
-  , casa-types ==0.0.2
+  , bytestring ==0.12.2.0
+  , casa-client ==0.0.3
+  , casa-types ==0.0.3
   , case-insensitive ==1.2.1.0
   , cborg ==0.2.10.0
   , cereal ==0.5.8.3
@@ -47,57 +49,59 @@   , companion ==0.1.0
   , conduit ==1.3.6.1
   , conduit-combinators ==1.3.0
-  , conduit-extra ==1.3.7
-  , containers ==0.6.8
+  , conduit-extra ==1.3.8
+  , containers ==0.7
   , contravariant ==1.5.5
   , cookie ==0.5.1
   , cryptohash-sha256 ==0.11.102.1
   , crypton ==1.0.4
   , crypton-conduit ==0.2.3
-  , crypton-connection ==0.4.4
+  , crypton-connection ==0.4.5
+  , crypton-socks ==0.6.2
   , crypton-x509 ==1.7.7
-  , crypton-x509-store ==1.6.10
+  , crypton-x509-store ==1.6.12
   , crypton-x509-system ==1.6.7
   , crypton-x509-validation ==1.6.14
-  , data-default ==0.7.1.3
-  , data-default-class ==0.1.2.2
-  , data-default-instances-containers ==0.1.0.3
-  , data-default-instances-dlist ==0.0.1.2
-  , data-default-instances-old-locale ==0.0.1.2
+  , data-default ==0.8.0.1
+  , data-default-class ==0.2.0.0
   , data-fix ==0.3.4
-  , deepseq ==1.5.1.0
+  , deepseq ==1.5.0.0
   , digest ==0.0.2.1
   , directory ==1.3.8.5
+  , directory-ospath-streaming ==0.2.2
   , distributive ==0.6.2.1
   , dlist ==1.0
   , easy-file ==0.2.5
   , echo ==0.1.4
   , ed25519 ==0.0.5.0
-  , exceptions ==0.10.7
-  , extra ==1.7.16
-  , fast-logger ==3.2.5
+  , exceptions ==0.10.9
+  , extra ==1.8.1
+  , fast-logger ==3.2.6
   , file-embed ==0.0.16.0
-  , filelock ==0.1.1.7
-  , filepath ==1.4.301.0
-  , fsnotify ==0.4.3.0
+  , file-io ==0.1.5
+  , filelock ==0.1.1.8
+  , filepath ==1.5.4.0
+  , fsnotify ==0.4.4.0
   , generic-deriving ==1.14.6
   , generically ==0.1.1
   , ghc-bignum ==1.3
-  , ghc-boot ==9.8.4
-  , ghc-boot-th ==9.8.4
-  , ghc-prim ==0.11.0
+  , ghc-boot ==9.10.3
+  , ghc-boot-th ==9.10.3
+  , ghc-internal ==9.1003.0
+  , ghc-platform ==0.1.0.0
+  , ghc-prim ==0.12.0
   , githash ==0.1.7.0
-  , hackage-security ==0.6.3.0
-  , half ==0.3.2
-  , happy ==2.0.2
-  , happy-lib ==2.0.2
-  , hashable ==1.4.7.0
+  , hackage-security ==0.6.3.2
+  , half ==0.3.3
+  , happy ==2.1.7
+  , happy-lib ==2.1.7
+  , hashable ==1.5.0.0
   , haskell-src-exts ==1.23.1
   , haskell-src-meta ==0.8.15
-  , hi-file-parser ==0.1.7.0
+  , hi-file-parser ==0.1.8.0
   , hourglass ==0.2.12
-  , hpack ==0.38.1
-  , hpc ==0.7.0.0
+  , hpack ==0.39.1
+  , hpc ==0.7.0.2
   , http-api-data ==0.6.2
   , http-client ==0.7.19
   , http-client-tls ==0.3.6.4
@@ -115,10 +119,10 @@   , libyaml-clib ==0.2.5
   , lift-type ==0.1.2.0
   , lifted-base ==0.2.3.12
-  , megaparsec ==9.6.1
+  , megaparsec ==9.7.0
   , memory ==0.18.0
-  , microlens ==0.4.13.1
-  , microlens-mtl ==0.2.0.3
+  , microlens ==0.4.14.0
+  , microlens-mtl ==0.2.1.0
   , microlens-th ==0.4.3.17
   , mime-types ==0.1.2.0
   , mintty ==0.1.4
@@ -130,36 +134,36 @@   , mtl-compat ==0.2.2
   , mustache ==2.4.3.1
   , neat-interpolation ==0.5.1.4
-  , network ==3.2.7.0
+  , network ==3.2.8.0
   , network-uri ==2.6.4.2
   , old-locale ==1.0.0.7
   , old-time ==1.1.0.4
-  , open-browser ==0.2.1.1
+  , open-browser ==0.4.0.0
   , optparse-applicative ==0.18.1.0
   , optparse-simple ==0.1.1.4
   , os-string ==2.0.7
-  , pantry ==0.10.1
-  , parsec ==3.1.17.0
+  , pantry ==0.11.2
+  , parsec ==3.1.18.0
   , parser-combinators ==1.3.0
-  , path ==0.9.5
+  , path ==0.9.6
   , path-io ==1.8.2
   , path-pieces ==0.2.1
   , pem ==0.2.4
-  , persistent ==2.17.0.0
-  , persistent-sqlite ==2.13.3.0
+  , persistent ==2.18.0.0
+  , persistent-sqlite ==2.13.3.1
   , persistent-template ==2.12.0.0
   , pretty ==1.1.3.6
   , prettyprinter ==1.7.1
   , prettyprinter-ansi-terminal ==1.1.3
   , primitive ==0.9.1.0
-  , process ==1.6.25.0
+  , process ==1.6.26.1
   , project-template ==0.2.1.0
   , random ==1.2.1.3
   , replace-megaparsec ==1.5.0.1
   , resource-pool ==0.4.0.0
   , resourcet ==1.3.0
   , retry ==0.9.3.1
-  , rio ==0.1.22.0
+  , rio ==0.1.24.0
   , rio-orphans ==0.1.2.0
   , rio-prettyprint ==0.1.8.0
   , rts ==1.0.2
@@ -170,24 +174,23 @@   , semigroupoids ==6.0.1
   , serialise ==0.2.6.1
   , silently ==1.2.5.4
-  , socks ==0.6.1
   , split ==0.2.5
-  , splitmix ==0.1.1
-  , stack ==3.7.1
+  , splitmix ==0.1.3.1
+  , stack ==3.9.1
   , static-bytes ==0.1.1
   , stm ==2.5.3.1
   , stm-chans ==3.0.0.9
-  , streaming-commons ==0.2.3.0
+  , streaming-commons ==0.2.3.1
   , strict ==0.5.1
   , string-interpolate ==0.3.4.0
   , syb ==0.7.2.4
-  , tagged ==0.8.8
-  , tar ==0.6.3.0
+  , tagged ==0.8.9
+  , tar ==0.6.4.0
   , tar-conduit ==0.4.1
   , tasty ==1.5.3
-  , template-haskell ==2.21.0.0
+  , template-haskell ==2.22.0.0
   , temporary ==1.3
-  , text ==2.1.1
+  , text ==2.1.3
   , text-conversions ==0.3.1.1
   , text-iso8601 ==0.1.1
   , text-metrics ==0.3.3
@@ -201,18 +204,18 @@   , th-reify-many ==0.1.10
   , these ==1.2.1
   , time ==1.12.2
-  , time-compat ==1.9.7
+  , time-compat ==1.9.8
   , tls ==2.1.8
-  , transformers ==0.6.1.0
+  , transformers ==0.6.1.1
   , transformers-base ==0.4.6
   , transformers-compat ==0.7.2
   , typed-process ==0.2.13.0
   , unix ==2.8.6.0
-  , unix-compat ==0.7.4
-  , unix-time ==0.4.16
+  , unix-compat ==0.7.4.1
+  , unix-time ==0.4.17
   , unliftio ==0.2.25.1
   , unliftio-core ==0.2.1.0
-  , unordered-containers ==0.2.20
+  , unordered-containers ==0.2.20.1
   , utf8-string ==1.0.2
   , uuid-types ==1.0.6
   , vault ==0.3.1.5
@@ -222,5 +225,5 @@   , witherable ==0.5
   , yaml ==0.11.11.2
   , zip-archive ==0.4.3.2
-  , zlib ==0.7.1.0
+  , zlib ==0.7.1.1
   , zlib-clib ==1.3.1
cabal.project view
@@ -33,8 +33,8 @@ -- specified by the snapshot specifed in Stack's project-level YAML
 -- configuration file (`stack.yaml`). The relevant version of GHC can be
 -- confirmed by reviewing the snapshot on Stackage. For example, at:
--- https://www.stackage.org/lts-23.24/cabal.config.
+-- https://www.stackage.org/lts-24.24/cabal.config.
 --
-with-compiler: ghc-9.8.4
+with-compiler: ghc-9.10.3
 import: cabal.config
 packages: .
doc/CONTRIBUTING.md view
@@ -1,835 +1,1 @@-# Contributors Guide
-
-Thank you for considering contributing to the maintenance or development of
-Stack, or otherwise supporting users of Stack! We hope that the following
-information will encourage and assist you. We start with some advice about
-Stack's goals and governance, and approach to supporting users.
-
-## Stack's goals
-
-Stack's current goals are:
-
-* To provide easy to use tooling for Haskell development
-* To provide complete support for at least the following three development
-  environments: Linux, macOS, and Windows
-* To address the needs of industrial users, open source maintainers, and other
-  people
-* To focus on the 'curated package set' use case
-* To prioritize reproducible build plans
-
-The goals above are not set in stone. However, any major changes to them
-should involve significant public discussion and a public vote by the Stack
-maintainer team.
-
-## Stack's governance
-
-People involved in maintaining or developing Stack with rights to make commits
-to the repository can be classified into two groups: 'committers' and
-'maintainers'.
-
-### Stack's committers
-
-We encourages a wide range of people to be granted rights to make commits to the
-repository.
-
-People are encouraged to take initiative to make non-controversial
-changes, such as documentation improvements, bug fixes, performance
-improvements, and feature enhancements.
-
-Maintainers should be included in discussions of controversial changes and
-tricky code changes.
-
-Our general approach is **"it's easier to ask forgiveness than permission"**. If
-there is ever a bad change, it can always be rolled back.
-
-### Stack's maintainers
-
-Stack's maintainers are long-term contributors to the project. Michael Snoyman
-(@snoyberg) was the founder of Stack, and its initial maintainer - and he has
-added others. Michael's current interests and priorities mean that he is no
-longer actively involved in adding new features to Stack.
-
-Maintainers are recognized for their contributions including:
-
-* Direct code contribution
-* Review of pull requests
-* Interactions on the GitHub issue tracker
-* Documentation management
-* External support - for example, hosting or training
-
-The maintainer team make certain decisions when that is necessary, specifically:
-
-* How to proceed, if there is disagreement on how to do so on a specific topic
-* Whether to add or remove (see further below) a maintainer
-
-Generally, maintainers are only removed due to non-participation or actions
-unhealthy to the project. Removal due to non-participation is not a punishment,
-simply a recognition that maintainership is for active participants only.
-
-We hope that removal due to unhealthy actions will never be necessary, but would
-include protection for cases of:
-
-* Disruptive behavior in public channels related to Stack
-* Impairing the codebase through bad commits/merges
-
-Like committers, maintainers are broadly encouraged to make autonomous
-decisions. Each maintainer is empowered to make a unilateral decision. However,
-maintainers should favor getting consensus first if:
-
-* They are uncertain what is the best course of action
-* They anticipate that other maintainers or users of Stack will disagree on the
-  decision
-
-## Stack's support
-
-A large part of the general discussion around Stack is on support-related
-topics, and that is reflected in the current issue tracker content. Assistance
-in responding to such matters is greatly appreciated.
-
-While support-related matters can be posted here as an 'issue', we encourage the
-use of other forums, in particular the
-[Haskell Community](https://discourse.haskell.org/) forum. See its 'Learn'
-category. We also recommend that forum for general discussions about Stack's
-current or desired features.
-
-Stack is also discussed:
-
-* in the Haskell
-  [Stack and Stackage](https://matrix.to/#/#haskell-stack:matrix.org) room
-  (address `#haskell-stack:matrix.org`) on [Matrix](https://matrix.org/); and
-
-* on Reddit's [Haskell community](https://www.reddit.com/r/haskell/).
-
-We encourage use of those other forums because support-related discussions can
-clog up the issue tracker and make it more difficult to maintain the project.
-People needing support may also get a faster and fuller response on other
-forums.
-
-Additions to the issue tracker are better suited to concrete feature proposals,
-bug reports, and other code base discussions (for example, refactorings).
-
-## Bug Reports
-
-Please [open an issue](https://github.com/commercialhaskell/stack/issues/new)
-and use the provided template to include all necessary details.
-
-The more detailed your report, the faster it can be resolved and will ensure it
-is resolved in the right way. Once your bug has been resolved, the responsible
-person will tag the issue as _Needs confirmation_ and assign the issue back to
-you. Once you have tested and confirmed that the issue is resolved, close the
-issue. If you are not a member of the project, you will be asked for
-confirmation and we will close it.
-
-## Documentation
-
-Consistent with its goal of being easy to use, Stack aims to maintain a high
-quality of in-tool and online documentation.
-
-The in-tool documentation includes the output when the `--help` flag is
-specified and the content of Stack's warning and error messages.
-
-When drafting documentation it is helpful to have in mind the intended reader
-and what they are assumed to know, and not know, already. In that regard,
-documentation should aim to meet, at least, the needs of a person who is about
-to begin to study computing as an undergraduate but who has not previously
-coded using Haskell. That person may be familiar with one popular operating
-system but may not be familiar with others.
-
-The files which make up Stack's online documentation are located in the `doc`
-directory of the repository. They are formatted in the
-[Markdown syntax](https://daringfireball.net/projects/markdown/), with some
-extensions.
-
-Those files are rendered on [haskellstack.org](http://haskellstack.org) by
-[Read the Docs](https://readthedocs.org/) using
-[MkDocs](https://www.mkdocs.org/) and the
-[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme. The
-`stable` branch of the repository provides the 'stable' version of the online
-documentation. The `master` branch provides the 'latest' version of the
-documentation.
-
-The 'stable' version of the online documentation is intended to be applicable to
-the latest released version of Stack. If you would like to help with that
-documentation, please submit a
-[pull request](https://help.github.com/articles/using-pull-requests/) with your
-changes/additions based off the
-[stable branch](https://github.com/commercialhaskell/stack/tree/stable).
-
-The Markdown files are organised into the navigation menu (the table of
-contents) in the file `mkdocs.yml`, the configuration file for MkDocs. The
-description of a file in the menu can differ from the file's name. The
-navigation menu allows files to be organised in a hierarchy. Currently, up to
-three levels are used. The top level is:
-
-* **Welcome!:** The introduction to Stack. This page aims to be no longer than
-  necessary but also to not assume much existing knowledge on the part of the
-  reader. It provides a 'quick start' guide to getting and using Stack.
-* **How to get & use Stack:** This includes Stack's user's guide, answers to
-  frequently asked questions, and more thorough explanations of aspects of
-  Stack. The user's guide is divided into two parts. The first part is
-  'introductory', and has the style of a tutorial. The second part is
-  'advanced', and has more of a reference style.
-* **How Stack works (advanced):** Many users will not need to consult this
-  advanced documentation.
-* **Stack's code (advanced):** Other information useful to people contributing
-  to, or maintaining, Stack's code, documentation, and other files.
-* **Signing key:** How Stack's released executables are signed.
-* **Glossary:** A glossary of terms used throughout Stack's in-tool and online
-  documentation. We aim to describe the same things in the same way in different
-  places.
-* **Version history:** The log of changes to Stack between versions.
-
-The specific versions of the online documentation (eg `v: v2.9.1`) are generated
-from the content of files at the point in the repository's history specified by
-the corresponding release tag. Consequently, that content is fixed once
-released.
-
-If the names of Markdown files do not change between versions, then people can
-use the flyout on the online documentation to move between different versions of
-the same page. For that reason, the names of new Markdown files should be chosen
-with care and existing Markdown files should not be deleted or renamed without
-due consideration of the consequences.
-
-The Markdown syntax supported by MkDocs and the Material for MkDocs theme can
-differ from the GitHub Flavored Markdown ([GFM](https://github.github.com/gfm/))
-supported for content on GitHub.com. Please refer to the
-[MkDocs documentation](https://www.mkdocs.org/user-guide/writing-your-docs/#writing-with-markdown)
-and the
-[Material for MkDocs reference](https://squidfunk.github.io/mkdocs-material/reference/)
-to ensure your pull request will achieve the desired rendering.
-
-The extensions to the basic Markdown syntax used are set out in `mkdocs.yml` and
-include:
-
-* admonitions
-* code blocks, with syntax highlighting provided by
-  [Pygments](https://pygments.org/)
-* content tabs, which can be nested
-* icons and emojis
-
-The files in the `doc` directory of the repository include two symbolic links
-(symlinks), `ChangeLog.md` and `CONTRIBUTING.md`. Users of Git on Windows should
-be aware of its approach to symbolic links. See the
-[Git for Windows Wiki](https://github.com/git-for-windows/git/wiki/Symbolic-Links).
-If `git config --show-scope --show-origin core.symlinks` is `false` in a local
-repository on Windows, then the files will be checked out as small plain files
-that contain the link text  See the
-[Git documentation](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks).
-
-The online documentation can be previewed using the `mkdocs` tool, as described
-in [Getting Started with MkDocs](https://www.mkdocs.org/getting-started/). The
-prerequisites are:
-
-*   [Python](https://www.python.org/); and
-*   the required Python packages set out in `doc/requirements.txt`. They can be
-    installed using Python's package manager `pip` with:
-
-    ~~~text
-    pip install --requirement doc/requirements.txt
-    ~~~
-
-Once the required version of `mkdocs` is installed, command `mkdocs serve` in
-the same directory as the `mkdocs.yml` file to start a web server. The command
-will, eventually, output the URL at which the documentation is being served.
-
-Command `mkdocs build` to build the documentation.
-
-=== "Windows"
-
-    With the correct prerequisites (see further below), users of the `make` tool
-    in the Stack-supplied MSYS2 environment can automate some of these steps
-    from Stack's project directory with:
-
-    * preview: `stack exec -- make docs-serve`; and
-    * build: `stack exec -- make _site/index.html`.
-
-    However, Windows and the Stack-supplied MSYS2 environment do not come with
-    Python or `make` by default. Further, Python on Windows does not use the
-    `python3` command (used on Unix-like operating systems) to invoke Python.
-    Further still, in the MSYS2 environment, development versions of packages
-    `libxml2` and `libxslt` are necessary dependencies. Consequently, the
-    automation requires the following command to install requirements into the
-    the MSYS2 environment:
-
-    ~~~text
-    stack exec -- pacman --sync python make libxml2-devel libxslt-devel
-    ~~~
-
-    !!! note
-
-        If the automation fails before the `mkdocs` tool etc is installed, the
-        directory `.python-doc-virtualenv` created by the automation will need
-        to be deleted before the automation will work again.
-
-    For most users, the automation will be less convenient than simply using the
-    `mkdocs serve` command directly.
-
-=== "Unix-like"
-
-    With `python3` and `make` available on the PATH, users of the `make` tool
-    can automate some of these steps from Stack's project directory with:
-
-    * preview: `make docs-serve`; and
-    * build: `make _site/index.html`.
-
-## Error messages
-
-Stack catches exceptions thrown by its dependencies or by Stack itself in
-`Stack.main`. In addition to exceptions that halt Stack's execution, Stack logs
-certain other matters as 'errors'.
-
-To support the Haskell Foundation's
-[Haskell Error Index](https://errors.haskell.org/) initiative, all Stack
-error messages generated by Stack itself should have a unique initial line:
-
-~~~text
-Error: [S-nnnn]
-~~~
-
-where `nnnn` is a four-digit number in the range 1000 to 9999.
-
-If you create a new Stack error, select a number using a random number generator
-(see, for example, [RANDOM.ORG](https://www.random.org/)) and check that number
-is not already in use in Stack's code. If it is, pick another until the number
-is unique.
-
-All exceptions generated by Stack itself are implemented using data constructors
-of closed sum types. Typically, there is one such type for each module that
-exports functions that throw exceptions. This type and the related `instance`
-definitions are usually located at the top of the relevant module.
-
-Stack supports two types of exceptions: 'pretty' exceptions that are instances
-of class `RIO.PrettyPrint.Pretty`, which provides `pretty :: e -> StyleDoc`, and
-thrown as expressions of type `RIO.PrettyPrint.PrettyException.PrettyException`;
-and other 'plain' exceptions that are simply instances of class
-`Control.Exception.Exception` and, hence, instances of class `Show`. These types
-and classes are re-exported by `Stack.Prelude`.
-
-Stack throws exceptions in parts of the code that should, in principle, be
-unreachable. The functions `Stack.Prelude.bugReport` and
-`Stack.Prelude.bugPrettyReport` are used to give the messages a consistent
-format. The names of the data constructors for those exceptions usually end in
-`Bug`.
-
-In a few cases, Stack may throw an exception in 'pure' code. The function
-`RIO.impureThrow :: Exception e => e -> a`, re-exported by `Stack.Prelude`, is
-used for that purpose.
-
-## Code
-
-If you would like to contribute code to fix a bug, add a new feature, or
-otherwise improve `stack`, pull requests are most welcome. It's a good idea to
-[submit an issue](https://github.com/commercialhaskell/stack/issues/new) to
-discuss the change before plowing into writing code.
-
-If you'd like to help out but aren't sure what to work on, look for issues with
-the
-[awaiting pull request](https://github.com/commercialhaskell/stack/issues?q=is%3Aopen+is%3Aissue+label%3A%22awaiting+pull+request%22)
-label. Issues that are suitable for newcomers to the codebase have the
-[newcomer friendly](https://github.com/commercialhaskell/stack/issues?q=is%3Aopen+is%3Aissue+label%3A%22awaiting+pull+request%22+label%3a%22newcomer+friendly%22)
-label. Best to post a comment to the issue before you start work, in case anyone
-has already started.
-
-Please include a
-[ChangeLog](https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md)
-entry and
-[documentation](https://github.com/commercialhaskell/stack/tree/master/doc/)
-updates with your pull request.
-
-## Backwards Compatibility
-
-The Stack package provides a library and an executable (`stack`) that depends on
-the library. The library is intended for use only by the executable.
-
-Consequently, the Stack package does not need to, and does not, strive for the
-compatibility with a range of versions of GHC that a library package (such as
-`pantry`) would seek.
-
-Stack aims to depend on well-known packages. The specific versions on which it
-depends at any time are specified by `package.yaml` and `stack.yaml`. It does
-not aim to be compatible with more than one version of the `Cabal` package at
-any time. At the time of writing (June 2025) the package versions are
-primarily ones in Stackage snapshot LTS Haskell 23.24 (for GHC 9.8.4) and
-`hpack-0.38.1`, `persistent-2.17.0.0` and `tls-2.1.8`.
-
-A Stack executable makes use of Cabal (the library) through a small 'Setup'
-executable that it compiles from Haskell source code. The executable compiles
-that code with a dependency on the version of Cabal that ships with the
-specified GHC compiler. Each release of Stack will normally aim to support all
-versions of GHC and the Cabal package in Stackage LTS Haskell snapshots
-published within seven years of the release. For example, snapshot LTS Haskell
-12.0, published on 9 July 2018, was the first LTS Haskell snapshot to
-provide GHC 8.4.3 which comes with `base-4.11.1.0` and `Cabal-2.2.0.1`.
-Normally, until, at least, 9 July 2025, Stack releases would aim to support the
-immediate predecessor, GHC 8.2.2 and `base-4.10.1.0`, `Cabal-2.0.1.1` and
-Haddock 2.18.1. However, Stack 3.1.1 dropped support for versions of Cabal
-before 2.2. `Cabal-2.2.0.0` was released with GHC 8.4.1 on 8 March 2018.
-
-When a version of the Stack executable actually ceases to support a version of
-GHC and `Cabal`, that should be recorded in Stack's
-[ChangeLog](https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md).
-
-## Code Quality
-
-The Stack project uses [yamllint](https://github.com/adrienverge/yamllint) as a
-YAML file quality tool and [HLint](https://github.com/ndmitchell/hlint) as a
-code quality tool.
-
-### Linting of YAML files
-
-The yamllint configuration extends the tools default and is set out in
-`.yamllint.yaml`. In particular, indentation is set at 2 spaces and `- ` in
-sequences is treated as part of the indentation.
-
-### Linting of Haskell source code
-
-The HLint configurations is set out in `.hlint.yaml`.
-
-Stack contributors need not follow dogmatically the suggested HLint hints but
-are encouraged to debate their usefulness. If you find a HLint hint is not
-useful and detracts from readability of code, consider marking it in the
-[configuration file](https://github.com/commercialhaskell/stack/blob/master/.hlint.yaml)
-to be ignored. Please refer to the
-[HLint manual](https://github.com/ndmitchell/hlint#readme)
-for configuration syntax.
-
-Quoting
-[@mgsloan](https://github.com/commercialhaskell/stack/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Amgsloan):
-
-> We are optimizing for code clarity, not code concision or what HLint thinks.
-
-You can install HLint with Stack. You might want to install it in the global
-project in case you run into dependency conflicts. HLint can report hints in
-your favourite text editor. Refer to the HLint repository for more details.
-
-To install, command:
-
-~~~text
-stack install hlint
-~~~
-
-Once installed, you can check your changes with command:
-
-~~~text
-stack exec -- sh ./etc/scripts/hlint.sh
-~~~
-
-## Code syntax
-
-Stack makes use of GHC's `GHC2021` collection of language extensions, which is
-set using the `language` key in the `package.yaml` file.
-
-Stack makes use of single-constructor types where the constructor has a large
-number of fields. Some of those fields have similar types, and so on. Given
-that, Stack makes use of `OverloadedRecordDot`, introduced in GHC 9.2.1. It also
-makes use of `NoFieldSelectors`, also introduced in GHC 9.2.1, and, where
-necessary, `DuplicateRecordFields`. Together, these language extensions enable
-the removal from the names of fields of the prefixes that were used historically
-to indicate the type and make field names unique. This is because the names of
-fields no longer need to be unique in situations where the intended field is
-unambiguous. This allows for a terser syntax without loss of expressiveness.
-For example:
-
-~~~haskell
-let cliTargets = (boptsCLITargets . bcoBuildOptsCLI) bco
-~~~
-
-can become:
-
-~~~haskell
-let cliTargets = bco.buildOptsCLI.targets
-~~~
-
-The intended field is unambiguous in almost all cases. In the case of a few
-record updates it is ambiguous. The name of the field needs to be qualified in
-those cases. For example:
-
-~~~haskell
-import qualified  Stack.Types.Build as ConfigCache ( ConfigCache (..) )
-...
-let ignoreComponents :: ConfigCache -> ConfigCache
-    ignoreComponents cc = cc { ConfigCache.components = Set.empty }
-~~~
-
-## Code Style
-
-A single code style is not applied consistently to Stack's code and Stack is not
-Procrustean about matters of style. Rules of thumb, however, are:
-
-* keep pull requests that simply reformat code separate from those that make
-  other changes to code; and
-* when making changes to code other than reformatting, follow the existing style
-  of the function(s) or module(s) in question.
-
-That said, the following may help:
-
-* Stack's code generally avoids the use of C preprocessor (CPP) directives.
-  Windows and non-Windows code is separated in separate source code directories
-  and distinguished in Stack's Cabal file. `Stack.Constants.osIsWindows :: Bool`
-  is provided. Multi-line strings are generally formatted on the assumption that
-  GHC's `CPP` language pragma is not being used.
-* Language pragmas usually start with `NoImplictPrelude`, where applicable, and
-  then all others are listed alphabetically. The closing `#-}` are aligned, for
-  purely aesthetic reasons.
-* Stack is compiled with GHC's `-Wall` enabled, which includes `-Wtabs` (no tabs
-  in source code). Most modules are based on two spaces (with one space for a
-  `where`) for indentation but older and larger modules are still based on four
-  spaces.
-* Stack's code and documentation tends to be based on lines of no more than 80
-  characters or, if longer, no longer than necessary.
-* Stack uses export lists.
-* Stack's imports are listed alphabetically, including `Stack.Prelude`, where
-  applicable. The module names are left aligned, with space left for `qualified`
-  where it is absent.
-* Stack's code is sufficiently stable that explicit import lists can sensibly be
-  used. The exception is the import of `Stack.Prelude`. Not all modules have
-  comprehensive explicit import lists.
-* Short explicit import lists follow the module name. Longer lists start on the
-  line below the module name. Spaces are used to separate listed items from
-  their enclosing parentheses.
-* As noted above, the types used to implement Stack's exceptions and the related
- `instance` definitions are usually located at the top of the relevant module.
-* In function type signatures, the `::` is kept on the same line as the
-  function's name. This format is Haskell syntax highlighter-friendly.
-* If `where` is used, the declarations follow on a separate line.
-
-## Testing
-
-The Stack code has both unit tests and integration tests.
-
-### Working with Unit Tests
-
-Unit tests can be found in the
-[tests/unit](https://github.com/commercialhaskell/stack/tree/master/tests/unit)
-directory. Tests are written using the [Hspec](https://hspec.github.io/)
-framework. In order to run the full test suite, you can simply command:
-
-~~~text
-stack test
-~~~
-
-The `--file-watch` is a very useful option to get quick feedback. However,
-running the entire test suite after each file change will slow you down. You'll
-need to specify which test suite (unit test or integration) and pass arguments
-to specify which module you'd specifically like to run to get quick feedback. A
-description of this follows below.
-
-
-If you would like to run the unit tests on their own, you can command:
-
-~~~text
-stack test stack:stack-unit-test
-~~~
-
-Running an individual module works with a command like this:
-
-~~~text
-stack test stack:stack-unit-test --ta "-m <PATTERN>"
-~~~
-
-Where `<PATTERN>` is the name of the module without `Spec.hs`.
-
-You may also load tests into GHCi and run them with these command:
-
-~~~text
-stack ghci stack:stack-unit-test --only-main
-# GHCi starting up output ...
-> :main -m "<PATTERN>"
-~~~
-
-Where again, `<PATTERN>` is the name of the module without `Spec.hs`.
-
-### Working with Integration Tests
-
-Integration tests can be found in the
-[tests/integration](https://github.com/commercialhaskell/stack/tree/master/tests/integration)
-folder.
-
-Running the integration tests is a little involved, you'll need to command:
-
-~~~text
-stack build --flag stack:integration-tests stack --exec stack-integration-test
-~~~
-
-Running an individual module works with a command like this:
-
-~~~text
-stack build --flag stack:integration-tests stack --exec "stack-integration-test -m <PATTERN>"
-~~~
-
-Where `<PATTERN>` is the name of the folder listed in the
-[test/integration/tests/](https://github.com/commercialhaskell/stack/tree/master/test/integration/tests)
-directory.
-
-You may also achieve this through GHCi with this command:
-
-~~~text
-stack ghci stack:stack-integration-test
-# GHCi starting up output ...
-> :main -m "<PATTERN>"
-~~~
-
-Where again, `<PATTERN>` is the name of the folder listed in the
-[test/integration/tests/](https://github.com/commercialhaskell/stack/tree/master/test/integration/tests)
-directory.
-
-You can disable a few integration tests through the -n option :
-
-~~~text
-stack build --flag stack:integration-tests stack --exec "stack-integration-test -n <PATTERN1> -n <PATTERN2>"
-~~~
-
-To disable folders named after `<PATTERN1>` and `<PATTERN2>`
-It's especially useful when some tests are taking a while to complete.
-
-On Linux, the `stack-integration-test` executable uses the `lld` linker and
-expects it to be on the PATH. The integration tests complete significantly
-quicker with `lld` than with the `ld.bfd` linker.
-
-## Continuous integration (CI)
-
-We use [GitHub Actions](https://docs.github.com/en/actions) to do CI on Stack.
-The configuration of the workflows is in the YAML files in `.github/workflows`.
-The current active workflows are:
-
-### Linting - `lint.yml`
-
-This workflow will run if:
-
-* there is a pull request
-* commits are pushed to these branches: `master`, `stable` and `rc/**`
-
-The workflow has one job (`style`). It runs on `ubuntu` only and applies
-yamllint and Hlint.
-
-### Test suite - `unit-tests.yml`
-
-This workflow will run if:
-
-* there is a pull request
-* commits are pushed to these branches: `master`, `stable` and `rc/**`.
-* requested
-
-The workflow has two jobs: `pedantic` and `unit-tests`.
-
-The `pedantic` job runs on `ubuntu` only and builds Stack with the
-`--pedantic` flag.
-
-The `unit-tests` job runs on a matrix of operating systems and Stack
-project-level configuration files (`stack.yaml`, by default). It builds and
-tests Stack with the following flags: `--haddock --no-haddock-deps`.
-
-Its approach to creating a cache depends on the operating system. Its 'Cache
-dependencies on Unix-like OS' step caches the Stack root on Unix-like operating
-systems. Its 'Cache dependencies on Windows' step caches the same information
-on Windows, but takes into account that a relevant directory is located outside
-of the Stack root.
-
-### Integration-based - `integration-tests.yml`
-
-This workflow will run if:
-
-* there is a pull request
-* commits are pushed to these branches: `master`, `stable` and `rc/**`
-* any tag is created
-* requested
-
-The workflow has three jobs: `integration-tests`, `linux-arm64` and
-`github-release`.
-
-The `integration-tests` job runs on a matrix of operating systems (`ubuntu`,
-`windows` and `macos`) and makes use of the `release.hs` script at
-`etc/scripts`. Its approach to creating a cache is the same as for
-`unit-tests.yml`, described above.
-
-Its 'Install deps and run checks' step uses `release.hs check`.
-
-Its 'Build bindist' step uses `release.hs build`.
-
-Its 'Upload bindist' step uploads artifacts using the name of the runner's
-operating system (`Linux`, `Windows` or `macOS`) as the name for the artifacts.
-
-The `linux-arm64` job runs on a self-hosted runner for Linux and ARM64. It makes
-use of Docker and a Docker file at `etc/dockerfiles/arm64.Dockerfile`.
-
-Its 'Build bindist' step makes use of a compiled version of `release.hs` script
-at `etc/scripts` to command `release build`.
-
-Its 'Upload bindist' step uploads artifacts using `Linux-ARM64` as the name for
-the artifacts.
-
-The `github-release` job needs `integration-tests` and `linux-arm64`. It only
-takes effect if the trigger for the workflow was the creation of a tag.
-
-Its four steps `Download Linux/Windows/macOS/Linux-ARM64 artifact` download the
-named artifacts to path `_release`.
-
-Its step 'Hash and sign assets' makes use of a 'secret' environment variable
-`RELEASE_SIGNING_KEY` established by the owner of the Stack repository. The
-variable contains the private key for the GPG key with ID 0x575159689BEFB442.
-That key is imported into GPG and then used by GPG to create a detached signature
-for each file.
-
-### Stan tool - `stan.yml`
-
-[Stan](https://hackage.haskell.org/package/stan) is a Haskell static analysis
-tool. As of `stan-0.1.0.1`, it supports GHC >= 9.6.3 and Stack is built with
-GHC 9.8.4. The tool is configured by the contents of the `.stan.toml` file.
-
-This workflow will run if:
-
-* there is a pull request
-* requested
-
-## Haskell Language Server
-
-You may be using [Visual Studio Code](https://code.visualstudio.com/) (VS Code)
-with its
-[Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell),
-which is powered by the
-[Haskell Language Server](https://github.com/haskell/haskell-language-server)
-(HLS).
-
-Stack can be built with Stack (which is recommended) or with Cabal (the tool).
-
-=== "Stack"
-
-    If you use Stack to build Stack, command `stack ghci` in the root directory
-    of the Stack project should work as expected, if you have first commanded
-    `stack build` once. `stack build` causes Cabal (the library) to create the
-    automatically generated module `Stack_build`.
-
-    If `ghc` is not on your PATH, then Haskell Language Server may report the
-    following error about `Stack.Constants.ghcShowOptionsOutput`:
-    ~~~text
-    • Exception when trying to run compile-time code:
-        ghc: readCreateProcess: does not exist (No such file or directory)
-      Code: (TH.runIO (readProcess "ghc" ["--show-options"] "")
-               >>= TH.lift . lines)
-    • In the untyped splice:
-        $(TH.runIO (readProcess "ghc" ["--show-options"] "") >>= TH.lift
-            . lines)
-    ~~~
-
-    `ghc` should be on the PATH if you run VS Code itself in the Stack
-    environment:
-    ~~~text
-    stack exec -- code .
-    ~~~
-
-    The following [cradle (`hie.yaml`)](https://github.com/haskell/hie-bios)
-    should suffice to configure Haskell Language Server (HLS) explicitly for
-    `./Setup.hs` and each of the buildable components in Stack's Cabal file:
-    ~~~yaml
-    cradle:
-      multi:
-      - path: "./Setup.hs"
-        config:
-          cradle:
-            direct:
-              arguments: []
-      - path: "./"
-        config:
-          cradle:
-            stack:
-            - path: "./src"
-              component: "stack:lib"
-            - path: "./app"
-              component: "stack:exe:stack"
-            - path: "./tests/integration"
-              component: "stack:exe:stack-integration-test"
-            - path: "./tests/unit"
-              component: "stack:test:stack-unit-test"
-    ~~~
-
-=== "Cabal (the tool)"
-
-    If you use Cabal (the tool) to build Stack, command `cabal repl` in the root
-    directory of the Stack project should work as expected, if you have GHC and
-    (on Windows) MSYS2 on the PATH. Stack's custom `./Setup.hs` causes
-    `cabal repl` to cause Cabal (the library) to create the automatically
-    generated module `Stack_build`.
-
-    If `ghc` is not on your PATH, then Haskell Language Server may report the
-    following error about `Stack.Constants.ghcShowOptionsOutput`:
-    ~~~text
-    • Exception when trying to run compile-time code:
-        ghc: readCreateProcess: does not exist (No such file or directory)
-      Code: (TH.runIO (readProcess "ghc" ["--show-options"] "")
-               >>= TH.lift . lines)
-    • In the untyped splice:
-        $(TH.runIO (readProcess "ghc" ["--show-options"] "") >>= TH.lift
-            . lines)
-    ~~~
-
-    `ghc` and (on Windows) MSYS2 should be on the PATH if you run commands
-    (including `cabal`) in the Stack environment:
-    ~~~text
-    stack exec --no-ghc-package-path -- cabal repl
-    ~~~
-
-    or
-    ~~~text
-    stack exec --no-ghc-package-path -- code .
-    ~~~
-
-    Use of GHC's environment variable `GHC_PACKAGE_PATH` is not compatible with
-    Cabal (the tool). That is why the `--no-ghc-package-path` flag must be
-    specified with `stack exec` when relying on Cabal (the tool).
-
-    The following [cradle (`hie.yaml`)](https://github.com/haskell/hie-bios)
-    should suffice to configure Haskell Language Server (HLS) explicitly for
-    `./Setup.hs` and each of the buildable components in Stack's Cabal file:
-    ~~~yaml
-    cradle:
-      multi:
-      - path: "./Setup.hs"
-        config:
-          cradle:
-            direct:
-              arguments: []
-      - path: "./"
-        config:
-          cradle:
-            cabal:
-            - path: "./src"
-              component: "lib:stack"
-            - path: "./app"
-              component: "exe:stack"
-            - path: "./tests/integration"
-              component: "exe:stack-integration-test"
-            - path: "./tests/unit"
-              component: "test:stack-unit-test"
-    ~~~
-
-A cradle is not committed to Stack's repository because it imposes a choice of
-tool used for building.
-
-## Dev Containers
-
-A [Development Container](https://containers.dev) (or Dev Container for short)
-allows you to use a container as a full‑featured development environment.
-
-You can run Dev Containers locally/remotely (with VS Code), or create a
-[Codespace](https://github.com/features/codespaces) for a branch in a
-repository to develop online.
-
-Stack's default Dev Container is intended for use with its default
-project‑level configuration (`stack.yaml`). But there are also Dev Containers
-for the experimental project‑level configurations.
-
-For further information, see the documentation for
-[Dev Containers](dev_containers.md).
-
-## Slack channel
-
-If you're making deep changes and real-time communication with the Stack team
-would be helpful, we have a `#stack-collaborators` Slack channel in the
-Haskell Foundation workspace. To join the workspace, follow this
-[link](https://haskell-foundation.slack.com/join/shared_invite/zt-z45o9x38-8L55P27r12YO0YeEufcO2w#/shared-invite/email).
-
-## Matrix room
-
-There is also a
-[Haskell Stack room](https://matrix.to/#/#haskell-stack:matrix.org)
-at address `#haskell-stack:matrix.org` on [Matrix](https://matrix.org/).
+../CONTRIBUTING.md
doc/ChangeLog.md view
@@ -1,3494 +1,1 @@-# Changelog
-
-## v3.7.1 - 2025-06-28
-
-**Changes since v3.5.1:**
-
-Other enhancements:
-
-* Bump to Hpack 0.38.1.
-* The `--extra-dep` option of Stack's `script` command now accepts a YAML value
-  specifying any immutable extra-dep. Previously only an extra-dep in the
-  package index that could be specified by a YAML string (for example,
-  `acme-missiles-0.3@rev:0`) was accepted.
-
-Bug fixes:
-
-* `stack script --package <pkg-name>` now uses GHC's `-package-id` option to
-  expose the installed package, rather than GHC's `-package` option. For
-  packages with public sub-libraries, `-package <pkg>` can expose an
-  installed package other than one listed by `ghc-pkg list <pkg>`.
-* Work around `ghc-pkg` bug where, on Windows only, it cannot register a package
-  into a package database that is also listed in the `GHC_PACKAGE_PATH`
-  environment variable. In previous versions of Stack, this affected
-  `stack script` when copying a pre-compiled package from another package
-  database.
-* On Windows, when decompressing, and extracting tools, from archive files,
-  Stack uses the system temporary directory, rather than the root of the
-  destination drive, if the former is on the destination drive.
-
-## v3.5.1 - 2025-03-29
-
-**Changes since v3.3.1:**
-
-Behavior changes:
-
-* Stack will also warn (message S-8432) if there is any non-ISO/IEC 8859-1
-  (Latin-1) character in Stack's 'programs' path, as `hsc2hs` does not work if
-  there is such a character in the path to its default template
-  `template-hsc.h`.
-* Stack customizes setup using `Cabal`, so if a `setup-depends` field does not
-  mention it as a dependency, Stack warns and adds the GHC boot package as a
-  dependency. Previously, Stack would not do so but only warn that build errors
-  were likely.
-
-Other enhancements:
-
-* Bump to Hpack 0.38.0.
-* In YAML configuration files, the `install-msys` key is introduced, to enable
-  or disable the download and installation of Stack-supplied MSYS2 when
-  necessary (subject to `skip-msys: false`). The default is the same as the
-  `install-ghc` setting (including if that is set at the command line).
-  Consequently, the default behaviour of Stack is unaffected.
-* Add the `stack config set install-msys` command to configure the
-  `install-msys` option in YAML configuration files.
-* Option `allow-newer-deps` is no longer classified as experimental in
-  documentation.
-* `stack sdist` and `stack upload` report the version of Cabal (the library)
-  being used to check packages.
-* Add the `stack config build-files` command to generate (when applicable) a
-  Cabal file from a package description in the Hpack format and/or a lock file
-  for Stack's project-level configuration, without taking any other build steps.
-
-## v3.3.1 - 2024-12-28
-
-**Changes since v3.1.1:**
-
-Behavior changes:
-
-* Stack interprets consecutive line ends in the value of the `user-message`
-  project-specific configuration option as a single blank line. Previously all
-  line ends were interpreted as white space.
-* Stack no longer supports Docker versions before Docker 1.9.1 and,
-  consequently, if a Docker container is not being run 'detached', its standard
-  input channel will always be kept open. (Before Docker 1.9.1 the use of an
-  interactive container could hang in certain circumstances.)
-* On Windows, Stack will always warn (message S-8432) if there is a space
-  character in Stack's 'programs' path, as GHC 9.4.1 and later do not work if
-  there is a space in the path to the `ghc` executable. S-8432 now presents as a
-  warning and not an error.
-* Stack respects the `--no-run-tests` and `--no-run-benchmarks` flags when
-  determining build actions. Previously Stack respected the flags when executing
-  the run test suites or run benchmarks actions for each targeted project
-  package.
-
-Other enhancements:
-
-* Consider GHC 9.10 to be a tested compiler and remove warnings.
-* Consider Cabal 3.12 to be a tested library and remove warnings.
-* Add flags `--run-tests` and `--run-benchmarks` (the existing defaults) to
-  Stack's `build` command, which take precedence over the existing
-  `no-run-tests` and `no-run-benchmarks` configuration options, respectively.
-* In configuration files, the `notify-if-no-run-tests` and
-  `notify-if-no-run-benchmarks` keys are introduced, to allow the exisitng
-  notification to be muted if unwanted.
-
-Bug fixes:
-
-* Stack's in-app messages refer to https://haskellstack.org as currently
-  structured. (Most URLs in older Stack versions are redirected.)
-* Stack's `upgrade` command only treats the current running Stack executable
-  as '`stack`' if the executable file is named `stack` or, on Windows,
-  `stack.exe`. Previously only how it was invoked was considered.
-* `stack test --no-run-tests --dry-run` no longer reports that Stack would test
-  project packages with test suites and
-  `stack bench --no-run-benchmarks --dry-run` no longer reports that Stack
-  would benchmark project packages with benchmarks.
-* `StackSetupShim` compiles with `Cabal >= 3.14.0.0`.
-
-## v3.1.1 - 2024-07-28
-
-Release notes:
-
-* The change in major version from 2.x to 3.1 marks the dropping of support for
-  versions of GHC before 8.4, deprecated in Stack 2.15.1.
-
-**Changes since v2.15.7:**
-
-Behavior changes:
-
-* Stack uses the version of the Cabal package that comes with the specified
-  version of GHC. Stack no longer supports such Cabal versions before 2.2, which
-  came with versions of GHC before 8.4. Consequently, the `init` command will
-  not try LTS Haskell before 12.0.
-* The `init` command initialises `stack.yaml` with a `snapshot` key rather than
-  a `resolver` key.
-* After installing GHC or another tool, Stack deletes the archive file which
-  provided the tool.
-* Remove hidden flag `--skip-intermediate-deps`, effectively deprecated since
-  Stack 1.3.0, from `ghci` and `repl` commands.
-* The `haddock --haddock-for-hackage` command only seeks to create an archive of
-  the `<package_version>-docs` directory for build targets and if flags
-  excluding the building of project packages are not set.
-* The predecessor of configuration option `package-index`, `package-indices`
-  (deprecated in Stack 2.9.3) has been removed as an alternative option.
-* If a build target is a package identifier, and the package version is not in
-  the snapshot or the package index, Stack will report an error when the target
-  is parsed. Previously, if another version of the package was in the snapshot,
-  Stack would construct the build plan with that other version or, if it was
-  not, Stack would defer an error to the construction of the build plan.
-* The `list` command, with a specified snapshot and package, also reports the
-  version of the package included indirectly in the snapshot (as a boot package
-  of the compiler specified by the snapshot).
-* `stack build --flag *:[-]<flag_name>` now only applies the flag setting to
-  packages for which the Cabal flag is defined, as opposed to all packages.
-* On Unix-like operating systems, drop support for `/etc/stack/config`,
-  deprecated in Stack 0.1.6.0.
-* Drop support for, in the Stack root, directory `global` and file `stack.yaml`,
-  both deprecated in Stack 0.1.6.0.
-
-Other enhancements:
-
-* Bump to Hpack 0.37.0.
-* In YAML configuration files, the `msys-environment` key is introduced to
-  allow, on Windows, the MSYS2 environment to be specified. The default
-  environment is still `MINGW64` on 64-bit Windows and `MINGW32` on 32-bit
-  Windows.
-* In YAML configuration files, the `default-init-snapshot` key is introduced to
-  allow a default snapshot to be specified for use with the `stack init`
-  command, as if it had been specified at the command line.
-* Add flags `--haddock-executables`, `--haddock-tests` and
-  `--haddock-benchmarks` to Stack's `build` command (including the `haddock`
-  synonym for `build --haddock`) to enable also building Haddock
-  documentation for executables, test suites and benchmarks. Due to a bug in
-  Cabal (the library), Stack will ignore the flags with a warning for GHC
-  versions before 9.4.
-* Add flag `--[no-]save-hackage-creds` to Stack's `upload` command, which takes
-  precedence over the existing `save-hackage-creds` configuration option.
-* In YAML configuration files, the `global-hints-location` key is introduced to
-  allow the location of the global hints YAML specification file to be
-  specified.
-* By default, Hpack 0.20.0 or later will decline to overwrite a Cabal file that
-  was modified manually. In YAML configuration files, the `hpack-force` key is
-  introduced to allow Hpack to overwrite such a Cabal file. The corresponding
-  `--hpack-force` flag is also added.
-* Add the `stack config set recommend-stack-upgrade` command to configure
-  whether or not Stack should notify the user if it identifes a new version of
-  Stack is available in YAML configuration files.
-* Add the `ls globals` command to list all global packages for the version of
-  GHC specified by the snapshot.
-* Add `stack -h` (equivalent to `stack --help`).
-* In YAML configuration files, the `file-watch-hook` key is introduced to allow
-  `--file-watch` post-processing to be customised with a executable or `sh`
-  shell script.
-* Add flag `--[no-]allow-newer` to Stack's `build` command, which takes
-  precedence over the existing `allow-newer` configuration option.
-
-Bug fixes:
-
-* The `config set snapshot` and `config set resolver` commands now respect the
-  presence of a synoymous key.
-* The `config set` commands support existing keys only in the form `key: value`
-  on a single line. The commands now recognise that a line `key:` does not have
-  that form.
-* On Unix-like operating systems, the `test --coverage` command now finds
-  package keys even for very long package names.
-* The Error S-6362 message now acknowledges when the wanted compiler has been
-  specified at the command line.
-* Fix a regression, introduced in Stack 2.11.1, that caused the `script` command
-  to parse an (otherwise ignored) project-level configuration file.
-* Stack no longer makes recommendations about a project-level configuration file
-  when only a global configuration file is in use.
-* Fix a regression, introduced in Stack 2.15.7, that caused GHC 8.10.7 or
-  earlier to fail to build a package with a `Custom` build type, if GHC option
-  `-haddock` was specified.
-
-## v2.15.7 - 2024-05-12
-
-Release notes:
-
-* This release fixes potential bugs.
-* The hash that Stack uses to distinguish one build plan from another has
-  changed for plans that set (as opposed to unset) manually Cabal flags for
-  immutable dependencies. This will cause Stack to rebuild dependencies for such
-  plans.
-
-**Changes since v2.15.5:**
-
-Major changes:
-
-* Stack 2.15.5 and earlier cannot build with Cabal (the library) version
-  `3.12.0.0`. Stack can now build with that Cabal version.
-
-Behavior changes:
-
-* Stack's `StackSetupShim` executable, when called with `repl` and
-  `stack-initial-build-steps`, no longer uses Cabal's `replHook` to apply
-  `initialBuildSteps` but takes a more direct approach.
-
-Bug fixes:
-
-* Fix a regression introduced in Stack 2.15.1 that caused a 'no operation'
-  `stack build` to be slower than previously.
-* The hashes that Stack uses to distinguish one build plan from another now
-  include the Cabal flags for immutable dependencies set manually. Previously,
-  in error, only such flags that were unset manually were included.
-
-## v2.15.5 - 2024-03-28
-
-Release notes:
-
-* This release fixes potential bugs.
-
-**Changes since v2.15.3:**
-
-Behavior changes:
-
-* Following the handover of the Stackage project to the Haskell Foundation, the
-  default value of the `urls` key is
-  `latest-snapshot: https://stackage-haddock.haskell.org/snapshots.json`.
-* Stack no longer includes the snapshot package database when compiling the
-  setup executable for a package with `build-type: Configure`.
-
-## v2.15.3 - 2024-03-07
-
-Release notes:
-
-* With one exception, this release fixes bugs.
-
-**Changes since v2.15.1:**
-
-Behavior changes:
-
-* `stack path --global-config`, `--programs`, and `--local-bin` no longer set
-  up Stack's environment.
-
-Bug fixes:
-
-* Due to a bug, Stack 2.15.1 did not support versions of GHC before 8.2. Stack
-  now supports GHC versions from 8.0.
-* `--haddock-for-hackage` does not ignore `--haddock-arguments`.
-* On Windows, package locations that are Git repositories with submodules now
-  work as intended.
-* The `ghc`, `runghc` and `runhaskell` commands accept `--package` values that
-  are a list of package names or package identifiers separated by spaces and, in
-  the case of package identifiers, in the same way as if they were specified as
-  targets to `stack build`.
-
-## v2.15.1 - 2024-02-09
-
-Release notes:
-
-* After an upgrade from an earlier version of Stack, on first use only,
-  Stack 2.15.1 may warn that it had trouble loading the CompilerPaths cache.
-* The hash used as a key for Stack's pre-compiled package cache has changed,
-  following the dropping of support for Cabal versions older than `1.24.0.0`.
-
-**Changes since v2.13.1:**
-
-Behavior changes:
-
-* Stack does not leave `*.hi` or `*.o` files in the `setup-exe-src` directory of
-  the Stack root, and deletes any corresponding to a `setup-<hash>.hs` or
-  `setup-shim-<hash>.hs` file, to avoid GHC issue
-  [#21250](https://gitlab.haskell.org/ghc/ghc/-/issues/21250).
-* If Stack's Nix integration is not enabled, Stack will notify the user if a
-  `nix` executable is on the PATH. This usually indicates the Nix package
-  manager is available. In YAML configuration files, the `notify-if-nix-on-path`
-  key is introduced, to allow the notification to be muted if unwanted.
-* Drop support for Intero (end of life in November 2019).
-* `stack path --stack-root` no longer sets up Stack's environment and does not
-  load Stack's configuration.
-* Stack no longer locks on configuration, so packages (remote and local) can
-  be configured in parallel. This increases the effective concurrency of builds
-  that before would use fewer threads. Reconsider your `--jobs` setting
-  accordingly. See [#84](https://github.com/commercialhaskell/stack/issues/84).
-* Stack warns that its support for Cabal versions before `2.2.0.0` is deprecated
-  and may be removed in the next version of Stack. Removal would mean that
-  projects using snapshots earlier than `lts-12.0` or `nightly-2018-03-18`
-  (GHC 8.4.1) might no longer build. See
-  [#6377](https://github.com/commercialhaskell/stack/issues/6377).
-* If Stack's `--resolver` option is not specified, Stack's `unpack` command with
-  a package name will seek to update the package index before seeking to
-  download the most recent version of the package in the index.
-* If the version of Cabal (the library) provided with the specified GHC can copy
-  specific components, Stack will copy only the components built and will not
-  build all executable components at least once.
-
-Other enhancements:
-
-* Consider GHC 9.8 to be a tested compiler and remove warnings.
-* Stack can build packages with dependencies on public sub-libraries of other
-  packages.
-* Add flag `--no-init` to Stack's `new` command to skip the initialisation of
-  the newly-created project for use with Stack.
-* The HTML file paths produced at the end of `stack haddock` are printed on
-  separate lines and without a trailing dot.
-* Add option of the form `--doctest-option=<argument>` to `stack build`, where
-  `doctest` is a program recognised by versions of the Cabal library from
-  `1.24.0.0`.
-* Experimental: Add flag `--haddock-for-hackage` to Stack's `build` command
-  (including the `haddock` synonym for `build --haddock`) to enable building
-  project packages with flags to generate Haddock documentation, and an archive
-  file, suitable for upload to Hackage. The form of the Haddock documentation
-  generated for other packages is unaffected.
-* Experimental: Add flag `--documentation` (`-d` for short) to Stack's `upload`
-  command to allow uploading of documentation for packages to Hackage.
-* `stack new` no longer rejects project templates that specify a `package.yaml`
-  in a subdirectory of the project directory.
-* Stack will notify the user if Stack has not been tested with the version of
-  GHC that is being user or a version of Cabal (the library) that has been
-  found. In YAML configuration files, the `notify-if-ghc-untested` and
-  `notify-if-cabal-untested` keys are introduced, to allow the notification to
-  be muted if unwanted.
-* The compiler version is included in Stack's build message (e.g.
-  `stack> build (lib + exe + test) with ghc-9.6.4`).
-* Add flag `--candidate` to Stack's `unpack` command, to allow package
-  candidates to be unpacked locally.
-* Stack will notify the user if a specified architecture value is unknown to
-  Cabal (the library). In YAML configuration files, the `notify-if-arch-unknown`
-  key is introduced, to allow the notification to be muted if unwanted.
-* Add option `--filter <item>` to Stack's `ls dependencies text` command to
-  filter out an item from the results, if present. The item can be `$locals` for
-  all project packages.
-* Add option `--snapshot` as synonym for `--resolver`.
-* Add the `config set snapshot` command, corresponding to the
-  `config set resolver` command.
-
-Bug fixes:
-
-* Fix the `Curator` instance of `ToJSON`, as regards `expect-haddock-failure`.
-* Better error message if a `resolver:` or `snapshot:` value is, in error, a
-  YAML number.
-* Stack accepts all package names that are, in fact, acceptable to Cabal.
-* Stack's `sdist` command can check packages with names that include non-ASCII
-  characters.
-
-## v2.13.1 - 2023-09-29
-
-Release notes:
-
-* Further to the release notes for Stack 2.3.1, the `-static` suffix has been
-  removed from the statically-linked Linux/x86_64 executables.
-* The executables for Linux/Aarch64 are now statically-linked.
-* Executables are now provided for macOS/AArch64.
-
-**Changes since v2.11.1:**
-
-Behavior changes:
-
-* Build artefacts are placed in `.stack-work/dist/<platform>/<GHC_version>`
-  (hashed to a shorter path on Windows), rather than
-  `.stack-work/dist/<platform>/<Cabal_version>`. This allows build artifacts to
-  be distinguished by GHC version.
-* By default, the `stack build` progress bar is capped to a length equal to the
-  terminal width.
-* When building GHC from source, Stack no longer uses Hadrian's deprecated
-  `--configure`\\`-c` flag and, instead, seeks to run GHC's Python `boot` and
-  sh `configure` scripts, and ensure that the `happy` and `alex` executables are
-  on the PATH.
-* When auto-detecting `--ghc-build` on Linux, the `musl` GHC build only is
-  considered a possible GHC build if `libc.musl-x86_64.so.1` is found in `\lib`
-  or `\lib64`.
-* No longer supports Cabal versions older than `1.24.0.0`. This means projects
-  using snapshots earlier than `lts-7.0` or `nightly-2016-05-26` (GHC 8.0.1)
-  will no longer build. GHC 8.0.1 comes with Haddock 2.17.2.
-* When unregistering many packages in a single step, Stack can now do that
-  efficiently. Stack no longer uses GHC-supplied `ghc-pkg unregister` (which is,
-  currently, slower).
-* `stack hpc report`, `stack list`, `stack templates` and `stack uninstall`
-  output their information to the standard output stream rather than to the
-  standard error stream. Logging is still to the standard error stream.
-* `stack upgrade` no longer assumes that binary upgrade is not supported on a
-  AArch64 machine architecture.
-
-Other enhancements:
-
-* Consider GHC 9.6 to be a tested compiler and remove warnings.
-* Consider Cabal 3.10 to be a tested library and remove warnings.
-* Bump to Hpack 0.36.0.
-* Depend on `pantry-0.9.2`, for support for long filenames and directory names
-  in archives created by `git archive`.
-* Avoid the duplicate resolving of usage files when parsing `*.hi` files into a
-  set of modules and a collection of resolved usage files. See
-  [#6123](https://github.com/commercialhaskell/stack/pull/6123).
-* Add composable component type flags `--exes`, `--tests` and `--benchmarks` to
-  Stack's `ide targets` command, to list only those components.
-* `stack --verbose` excludes lengthy information about build plan construction
-  in the debug output by default. The new `stack --[no-]plan-in-log` flag
-  enables or disables the inclusion of the information in the debug output.
-* In YAML configuration files, the `casa` key is introduced, which takes
-  precedence over the existing `casa-repo-prefix` key. The latter is deprecated.
-  The new key also allows Stack's use of a Casa (content-addressable storage
-  archive) server to be disabled and the maximum number of keys per request to
-  be configured. The default Casa prefix references https://casa.stackage.org,
-  instead of https://casa.fpcomplete.com.
-* Add option `--progress-bar=<format>` to Stack's `build` command to configure
-  the format of the progress bar, where `<format>` is one of `none`,
-  `count-only` (only the package count), `capped` (capped to a length equal to
-  the terminal width) and `full` (the previous format).
-
-Bug fixes:
-
-* Restore `stack sdist --pvp-bounds lower` (broken with Stack 2.9.1).
-* Restore building of Stack with Cabal flag `disable-git-info` (broken with
-  Stack 2.11.1).
-* With `stack hoogle`, avoid the message
-  `Minimum version is hoogle-5.0. Found acceptable hoogle-<x.y.z> in your index, requiring its installation.`
-  when a `hoogle` executable has already been found on the `PATH`.
-* Stack's sanity check on a selected GHC now passes GHC flag
-  `-hide-all-packages`, stopping GHC from looking for a package environment in
-  default locations.
-* Restore Stack script files without extensions (broken with Stack 2.11.1).
-* Restore message suffix `due to warnings` with `dump-logs: warning` (broken
-  with Stack 2.11.1).
-* On Windows, the `local-programs-path` directory can now be on a different
-  drive to the system temporary directory and MSYS2 will still be installed.
-
-## v2.11.1 - 2023-05-18
-
-**Changes since v2.9.3:**
-
-Behavior changes:
-
-* Add flag `--[no-]-only-local-bin` to Stack's `upgrade` command for a binary
-  upgrade. If the Stack executable is `my-stack`, the default is
-  `my-stack upgrade --only-local-bin` where previously it was, effectively,
-  `my-stack upgrade --no-only-local-bin`. If the Stack executable is `stack`,
-  the default is `stack upgrade --no-only-local-bin`, the same behaviour as
-  previously.
-* Use `$XDG_CACHE_HOME/stack/ghci-script`, rather than
-  `<temp>/haskell-stack-ghci` (where `<temp>` is the directory yielded by the
-  `temporary` package's `System.IO.Temp.getCanonicalTemporaryDirectory`), as the
-  base location for GHCi script files generated by `stack ghci` or `stack repl`.
-  See [#5203](https://github.com/commercialhaskell/stack/issues/5203)
-* Drop support for `Cabal` versions before 1.22 and, consequently, GHC versions
-  before 7.10.
-* `stack ghci` and `stack repl` now take into account the values of
-  `default-language` fields in Cabal files, like they take into account the
-  values of `default-extensions` fields.
-* Removed `--ghc-paths`, `--global-stack-root` and `--local-bin-path` flags for
-  `stack path`, deprecated in Stack 1.1.0 in favour of `--programs`,
-  `--stack-root` and `local-bin` respectively.
-* On Windows, `stack upgrade` always renames the file of the running Stack
-  executable (adding extension `.old`) before attempting to write to the
-  original file name.
-* On Windows, `stack upgrade` does not offer `sudo` command alternatives if
-  attempting to write to the original file name of the running Stack exectuable
-  results in a 'Permission' error.
-* On Linux, Stack's `setup` command now distinguishes GHC build
-  `tinfo6-libc6-pre232` from existing `tinfo6`. The former refers to systems
-  where the version of `libc6` (the GNU C Library) is not compatible with
-  version 2.32. `tinfo6-libc6-pre232` is now a possible value for the
-  `ghc-build` configuration option.
-
-Other enhancements:
-
-* Add options of the form `--PROG-option=<argument>` to `stack build`, where
-  `PROG` is a program recognised by the Cabal library and one of `alex`, `ar`,
-  `c2hs`, `cpphs`, `gcc`, `greencard`, `happy`, `hsc2hs`, `hscolour`, `ld`,
-  `pkg-config`, `strip` and `tar`. If Cabal uses the program during the
-  configuration step, the argument is passed to it.
-* By default all `--PROG-option` options are applied to all project packages.
-  This behaviour can be changed with new configuration option
-  `apply-prog-options`.
-* Add flag `--[no-]use-root` to `stack script` (default disabled). Used with
-  `--compile` or `--optimize`, when enabled all compilation outputs (including
-  the executable) are written to a script-specific location in the `scripts`
-  directory of the Stack root rather than the script's directory, avoiding
-  clutter of the latter directory.
-* Better error message if the value of the `STACK_WORK` environment variable or
-  `--work-dir` option is not a valid relative path.
-* Stack will use the value of the `GH_TOKEN`, or `GITHUB_TOKEN`, environment
-  variable as credentials to authenticate its GitHub REST API requests.
-* `stack uninstall` also shows how to uninstall Stack-supplied tools.
-
-Bug fixes:
-
-* Fix incorrect warning if `allow-newer-deps` are specified but `allow-newer` is
-  `false`. See
-  [#6068](https://github.com/commercialhaskell/stack/issues/6086).
-* `stack build` with `--file-watch` or `--file-watch-poll` outputs 'pretty'
-  error messages, as intended. See
-  [#5978](https://github.com/commercialhaskell/stack/issues/5978).
-* `stack build` unregisters any project packages for the sub libraries of a
-  project package that is to be unregistered. See
-  [#6046](https://github.com/commercialhaskell/stack/issues/6046).
-* The warning that sublibrary dependency is not supported is no longer triggered
-  by internal libraries.
-
-## v2.9.3.1 - 2023-06-22
-
-Hackage-only release of the `stack` package:
-
-* Supports building against snapshot Stackage LTS Haskell 21.0 (GHC 9.4.5),
-  without extra-deps.
-* Supports build with `persistent-2.14.5.0`, using CPP directives.
-* Supports build with `unix-compat-0.7`, by removing reliance on the module
-  `System.PosixCompat.User` removed in that package.
-* Includes `cabal.project` and `cabal.config` files in the package.
-
-## v2.9.3 - 2022-12-16
-
-**Changes since v2.9.1:**
-
-Behavior changes:
-
-* In YAML configuration files, the `package-index` key is introduced which takes
-  precedence over the existing `package-indices` key. The latter is deprecated.
-* In YAML configuration files, the `hackage-security` key of the `package-index`
-  key or the `package-indices` item can be omitted, and the Hackage Security
-  configuration for the item will default to that for the official Hackage
-  server. See [#5870](https://github.com/commercialhaskell/stack/issues/5870).
-* Add the `stack config set package-index download-prefix` command to set the
-  location of Stack's package index in YAML configuration files.
-* `stack setup` with the `--no-install-ghc` flag warns that the flag and the
-  command are inconsistent and now takes no action. Previously the flag was
-  silently ignored.
-* To support the Haskell Foundation's
-  [Haskell Error Index](https://errors.haskell.org/) initiative, all Stack
-  error messages generated by Stack itself begin with an unique code in the
-  form `[S-nnnn]`, where `nnnn` is a four-digit number.
-* Test suite executables that seek input on the standard input stream (`stdin`)
-  will not throw an exception. Previously, they would thow an exception,
-  consistent with Cabal's 'exitcode-stdio-1.0' test suite interface
-  specification. Pass the flag `--no-tests-allow-stdin` to `stack build` to
-  enforce Cabal's specification. See
-  [#5897](https://github.com/commercialhaskell/stack/issues/5897)
-
-Other enhancements:
-
-* Help documentation for `stack upgrade` warns that if GHCup is used to install
-  Stack, only GHCup should be used to upgrade Stack. That is because GHCup uses
-  an executable named `stack` to manage versions of Stack, that Stack will
-  likely overwrite on upgrade.
-* Add `stack ls dependencies cabal` command, which lists dependencies in the
-  format of exact Cabal constraints.
-* Add `STACK_XDG` environment variable to use the XDG Base Directory
-  Specification for the Stack root and Stack's global YAML configuration file,
-  if the Stack root location is not set on the command line or by using the
-  `STACK_ROOT` environment variable.
-* Add `stack path --global-config`, to yield the full path of Stack's
-  user-specific global YAML configuration file (`config.yaml`).
-* Experimental: Add option `allow-newer-deps`, which allows users to specify a
-  subset of dependencies for which version bounds should be ignored
-  (`allow-newer-deps: ['foo', 'bar']`). This key has no effect unless
-  `allow-newer` is enabled.
-
-Bug fixes:
-
-* Fix ambiguous module name `Distribution.PackageDescription`, if compiling
-  `StackSetupShim` with `Cabal-syntax-3.8.1.0` in package database. See
-  [#5886](https://github.com/commercialhaskell/stack/pull/5886).
-* In YAML configuration files, if the `package-indices` key (or the
-  `hackage-security` key of its item) is omitted, the expiration of timestamps
-  is now ignored, as intended. See Pantry
-  [#63](https://github.com/commercialhaskell/pantry/pull/63)
-
-## v2.9.1 - 2022-09-19
-
-**Changes since v2.7.5:**
-
-Release notes:
-
-* After an upgrade from an earlier version of Stack, on first use only,
-  Stack 2.9.1 may warn that it had trouble loading the CompilerPaths cache.
-* The support from the Stack team for executable releases now includes
-  Linux/AArch64 and is limited to:
-
-    * Linux 64-bit/x86_64 (statically-linked)
-    * Linux AArch64 (dynamically-linked)
-    * macOS x86_64
-    * Windows 64-bit/x86_64
-
-Behavior changes:
-
-* `stack build --coverage` will generate a unified coverage report, even if
-  there is only one `*.tix` file, in case a package has tested the library of
-  another package that has not tested its own library. See
-  [#5713](https://github.com/commercialhaskell/stack/issues/5713)
-* `stack --verbose` no longer includes the lengthy raw snapshot layer (rsl) in
-  the debug output by default. The new `stack --[no-]rsl-in-log` flag enables or
-  disables the inclusion of the rsl in the debug output.
-
-Other enhancements:
-
-* Consider GHC 9.2 and 9.4 to be tested compilers and remove warnings.
-* Consider Cabal 3.6 and 3.8 to be a tested libraries and remove warnings.
-* Bump to Hpack 0.35.0.
-* On Windows, the installer now sets `DisplayVersion` in the registry, enabling
-  tools like `winget` to properly read the version number.
-* Adds flag `--script-no-run-compile` (disabled by default) that uses the
-  `--no-run` option with `stack script` (and forces the `--compile` option).
-  This enables a command like `stack --script-no-run-compile Script.hs` to
-  behave like `stack script <arguments> --no-run --compile -- Script.hs` but
-  without having to list all the `<arguments>` in the Stack interpreter options
-  comment in `Script.hs` on the command line. That may help test that scripts
-  compile in CI (continuous integration). See
-  [#5755](https://github.com/commercialhaskell/stack/issues/5755)
-* Fuller help is provided at the command line if a subcommand is missing (for
-  example, `stack ls` now yields the equivalent of `stack ls --help`). See
-  [#809](https://github.com/commercialhaskell/stack/issues/809)
-* Add build option `--cabal-verbosity=VERBOSITY` to specify the Cabal verbosity
-  level (the option accepts Cabal's numerical and extended syntax).
-  See [#1369](https://github.com/commercialhaskell/stack/issues/809)
-* Add the possibility of a `sh` script to customise fully GHC installation. See
-  [#5585](https://github.com/commercialhaskell/stack/pull/5585)
-* `tools` subcommand added to `stack ls`, to list stack's installed tools.
-* `stack uninstall` shows how to uninstall Stack.
-* `--ghc-variant` accepts `int-native` as a variant.
-
-Bug fixes:
-
-* Fix `stack clean --full`, so that the files to be deleted are not in use. See
-  [#5714](https://github.com/commercialhaskell/stack/issues/5714)
-* Fix an inconsistency in the pretty formatting of the output of
-  `stack build --coverage`
-* Fix repeated warning about missing parameters when using `stack new`
-* Include `pantry-0.5.6`: Remove operational and mirror keys from bootstrap key
-  set [#53](https://github.com/commercialhaskell/pantry/pull/53)
-* Pass any CPP options specified via `cpp-options:` in the Cabal file to GHCi
-  using GHC's `-optP` flag. See
-  [#5608](https://github.com/commercialhaskell/stack/pull/5608)
-* On Unix-like operating systems, respect the `with-gcc` option when installing
-  GHC. See [#5609](https://github.com/commercialhaskell/stack/pull/5609)
-* Fixed logic in `get_isa()` in `get-stack.sh` to exclude systems that don't
-  have x86 in their `uname -m` output. See
-  [5792](https://github.com/commercialhaskell/stack/issues/5792).
-* Fixed output of `stack ls snapshots local` on Windows, to behave like that on
-  Unix-like operating systems.
-* Fix non-deterministic test failures when executing a test suite for a
-  multi-project repository with parallelism enabled. See
-  [#5024](https://github.com/commercialhaskell/stack/issues/5024)
-
-## v2.7.5 - 2022-03-06
-
-**Changes since v2.7.3:**
-
-Behavior changes:
-
-* Cloning git repositories isn't per sub-directory anymore, see
-  [#5411](https://github.com/commercialhaskell/stack/issues/5411)
-
-Other enhancements:
-
-* `stack setup` supports installing GHC for macOS/AArch64 (M1)
-* `stack upload` supports authentication with a Hackage API key (via
-  `HACKAGE_KEY` environment variable).
-
-Bug fixes:
-
-* Ensure that `extra-path` works for case-insensitive `PATH`s on Windows.
-  See [rio#237](https://github.com/commercialhaskell/rio/pull/237)
-* Fix handling of overwritten `ghc` and `ghc-pkg` locations.
-  [#5597](https://github.com/commercialhaskell/stack/pull/5597)
-* Fix failure to find package when a dependency is shared between projects.
-  [#5680](https://github.com/commercialhaskell/stack/issues/5680)
-* `stack ghci` now uses package flags in `stack.yaml`
-  [#5434](https://github.com/commercialhaskell/stack/issues/5434)
-
-
-## v2.7.3 - 2021-07-20
-
-**Changes since v2.7.1:**
-
-Other enhancements:
-
-* `stack upgrade` will download from `haskellstack.org` before trying
-  `github.com`. See
-  [#5288](https://github.com/commercialhaskell/stack/issues/5288)
-* `stack upgrade` makes less assumptions about archive format. See
-  [#5288](https://github.com/commercialhaskell/stack/issues/5288)
-* Add a `--no-run` flag to the `script` command when compiling.
-
-Bug fixes:
-
-* GHC source builds work properly for recent GHC versions again. See
-  [#5528](https://github.com/commercialhaskell/stack/issues/5528)
-* `stack setup` always looks for the unpacked directory name to support
-  different tar file naming conventions. See
-  [#5545](https://github.com/commercialhaskell/stack/issues/5545)
-* Bump `pantry` version for better OS support. See
-  [pantry#33](https://github.com/commercialhaskell/pantry/issues/33)
-* When building the sanity check for a new GHC install, make sure to clear
-  `GHC_PACKAGE_PATH`.
-* Specifying GHC RTS flags in the `stack.yaml` no longer fails with an error.
-  [#5568](https://github.com/commercialhaskell/stack/pull/5568)
-* `stack setup` will look in sandboxed directories for executables, not
-  relying on `findExecutables. See
-  [GHC issue 20074](https://gitlab.haskell.org/ghc/ghc/-/issues/20074)
-* Track changes to `setup-config` properly to avoid reconfiguring on every
-  change. See
-  [#5578](https://github.com/commercialhaskell/stack/issues/5578)
-
-
-## v2.7.1 - 2021-05-07
-
-**Changes since v2.5.1.1:**
-
-Behavior changes:
-
-* `stack repl` now always warns about GHCi problems with loading multiple
-  packages. It also sets now proper working directory when invoked with
-  one package. See
-  [#5421](https://github.com/commercialhaskell/stack/issues/5421)
-* `custom-setup` dependencies are now properly initialized for `stack dist`.
-  This makes `explicit-setup-deps` no longer required and that option was
-  removed. See
-  [#4006](https://github.com/commercialhaskell/stack/issues/4006)
-
-Other enhancements:
-
-* Consider GHC 9.0 to be a tested compiler and remove warnings.
-* Consider Cabal 3.6 to be a tested library and remove warnings.
-* Nix integration now passes `ghcVersion` (in addition to existing `ghc`) to
-  `shell-file` as an identifier that can be looked up in a compiler attribute
-  set.
-* Nix integration now allows Nix integration if the user is ready in nix-shell.
-  This gets rid of "In Nix shell but reExecL is False" error.
-* `stack list` is a new command to list package versions in a snapshot.
-  See [#5431](https://github.com/commercialhaskell/stack/pull/5431)
-* `custom-preprocessor-extensions` is a new configuration option for allowing
-  Stack to be aware of any custom preprocessors you have added to `Setup.hs`.
-  See [#3491](https://github.com/commercialhaskell/stack/issues/3491)
-* Added `--candidate` flag to `upload` command to upload a package candidate
-  rather than publishing the package.
-* Error output using `--no-interleaved-output` no longer prepends indenting
-  whitespace. This allows emacs compilation-mode and vim quickfix to locate
-  and track errors. See
-  [#5523](https://github.com/commercialhaskell/stack/pull/5523)
-
-Bug fixes:
-
-* `stack new` now supports branches other than `master` as default for GitHub
-  repositories. See
-  [#5422](https://github.com/commercialhaskell/stack/issues/5422)
-* Ignore all errors from `hi-file-parser`. See
-  [#5445](https://github.com/commercialhaskell/stack/issues/5445) and
-  [#5486](https://github.com/commercialhaskell/stack/issues/5486).
-* Support basic auth in package-indices. See
-  [#5509](https://github.com/commercialhaskell/stack/issues/5509).
-* Add support for parsing `.hi`. files from GHC 8.10 and 9.0. See
-  [hi-file-parser#2](https://github.com/commercialhaskell/hi-file-parser/pull/2).
-
-
-## v2.5.1.1 - 2020-12-09
-
-Hackage-only release:
-
-* Support build with persistent-2.11.x and optparse-applicative-0.16.x
-
-
-## v2.5.1 - 2020-10-15
-
-**Changes since v2.3.3**
-
-Major changes:
-
-* Add the `snapshot-location-base` yaml configuration option, which allows to
-  override the default location of snapshot configuration files. This option
-  affects how snapshot synonyms (LTS/Nightly) are expanded to URLs by the
-  `pantry` library.
-* `docker-network` configuration key added to override docker `--net` arg
-
-Behavior changes:
-
-* File watching now takes into account specified targets, old behavior could be
-  restored using the new flag `--watch-all`
-  [#5310](https://github.com/commercialhaskell/stack/issues/5310)
-
-Other enhancements:
-
-* The output of `stack ls dependencies json` now includes keys `sha256` and
-  `size` for dependencies of `type` `archive` in `location`.
-  [#5280](https://github.com/commercialhaskell/stack/issues/5280)
-* Build failures now show a hint to scroll up to the corresponding section
-  [#5279](https://github.com/commercialhaskell/stack/issues/5279)
-* Customisable output styles (see `stack --help` and the `--stack-colors`
-  option, and `stack ls stack-colors --help`) now include `info`, `debug`,
-  `other-level`, `secondary` and `highlight`, used with verbose output.
-
-Bug fixes:
-
-* Fix `stack test --coverage` when using Cabal 3
-* `stack new` now generates PascalCase'd module name correctly.
-  [#5376](https://github.com/commercialhaskell/stack/issues/5376)
-* Connection issues to Casa server no longer cause builds to failure. Casa acts
-  only as an optimizing cache layer, not a critical piece of infrastructure.
-* Fix modified time busting caches by always calculating sha256 digest during
-  the build process.
-  [#5125](https://github.com/commercialhaskell/stack/issues/5125)
-
-
-## v2.3.3 - 2020-08-06
-
-**Changes since v2.3.1**
-
-Other enhancements:
-
-* Add the `stack-developer-mode` flag
-
-Bug fixes:
-
-* When using the `STACK_YAML` env var with Docker, make the path absolute.
-* Fix the problem of `stack repl foo:test:bar` failing without a project build
-  before that. See
-  [#5213](https://github.com/commercialhaskell/stack/issues/5213)
-* Fix `stack sdist` introducing unnecessary sublibrary syntax when using
-  pvp-bounds. See
-  [#5289](https://github.com/commercialhaskell/stack/issues/5289)
-
-## v2.3.1 - 2020-04-29
-
-Release notes:
-
-* We have reduced the number of platforms that we support with executable
-  releases. The reason behind this is that we've been slowed down in our release
-  process until now with issues trying to build executables for less common
-  platforms. In order to make sure we can address issues more quickly (like
-  supporting new GHC versions), we're limiting support from the Stack team to:
-
-    * Linux 64-bit/x86_64 (statically-linked)
-    * macOS x86_64
-    * Windows 64-bit/x86_64
-
-  If others want to provide additional executables, we will definitely be happy
-  for the support. But since our CI system is currently able to produce these
-  three executables only, that's what we will be providing with the next
-  release.
-
-* Since we no longer have dynamically-linked Linux executables, we are removing
-  the `-static` suffix from the static Linux/x86_64 executables. If you have
-  scripts to download the latest stable Linux/x86_64 executable, update them to
-  use `linux-x86_64` instead of `linux-x86_64-static` (if you are already using
-  the former, nothing needs to change). For this release, both are supported,
-  but the next release will no longer have the `-static` variant.
-
-* We are also deprecating the download links at https://stackage.org/stack. See
-  this page for the current installation instructions:
-  https://docs.haskellstack.org/en/stable/install_and_upgrade/.
-
-* These are the canonical locations to download the latest stable binaries from,
-  and will continue to be supported going forward:
-
-    * Linux 64-bit/x86_64 (static):
-      https://get.haskellstack.org/stable/linux-x86_64.tar.gz
-    * macOS x86_64: https://get.haskellstack.org/stable/osx-x86_64.tar.gz
-    * Windows 64-bit/x86_64:
-      https://get.haskellstack.org/stable/windows-x86_64.zip
-
-  As always, binaries for specific versions are available from the GitHub
-  releases: https://github.com/commercialhaskell/stack/releases.
-
-**Changes since v2.1.3.1**
-
-Major changes:
-
-* `setup-info-locations` yaml configuration now allows overwriting the default
-  locations of `stack-setup-2.yaml`.
-  [#5031](https://github.com/commercialhaskell/stack/pull/5031)
-  [#2983](https://github.com/commercialhaskell/stack/issues/2983)
-  [#2913](https://github.com/commercialhaskell/stack/issues/2913)
-
-* The `setup-info` configuration key now allows overwriting parts of the default
-  `setup-info`
-
-* The `--setup-info-yaml` command line flag now may be used in all Stack
-  commands such as `stack build`, and not only in `stack setup`
-
-* The `--setup-info-yaml` may specify multiple locations for `stack-setup.yaml`
-  files.
-
-* The `stack upload` can read first reads environment Variable
-  `$HACKAGE_USERNAME` and `$HACKAGE_PASSWORD` if they are missing only then asks
-  for `username` or `password`
-
-* Fully remove GHCJS support.
-
-* Remove the `freeze` command. It has been replaced by lock files.
-
-Behavior changes:
-
-* Remove the deprecated `--stack-setup-yaml` command line argument in favor of
-  `--setup-info-yaml`. See
-  [#2647](https://github.com/commercialhaskell/stack/issues/2647)
-
-* We now recommend checking in generated Cabal files for repos. When generating
-  lock files for extra-deps that only include `package.yaml` files, a
-  deprecation warning will be generated. Also, those packages will no longer be
-  included in the generated lock files. See
-  [#5210](https://github.com/commercialhaskell/stack/issues/5210).
-
-Other enhancements:
-
-* Add `build-output-timestamps` flag in yaml. Setting it to true prefixes each
-  build log output line with a timestamp.
-
-* Show warning about `local-programs-path` with spaces on windows when running
-  scripts. See
-  [#5013](https://github.com/commercialhaskell/stack/pull/5013)
-
-* Add `ls dependencies json` which will print dependencies as JSON.
-  `ls dependencies --tree`  is now `ls dependencies tree`. See
-  [#4424](https://github.com/commercialhaskell/stack/pull/4424)
-
-* Remove warning for using Stack with GHC 8.8-8.10, and Cabal 3.0-3.2.
-
-* Allow relative paths in `--setup-info-yaml` and tool paths
-  [#3394](https://github.com/commercialhaskell/stack/issues/3394)
-
-* Added the `--only-locals` flag. See
-  [#5272](https://github.com/commercialhaskell/stack/issues/5272)
-
-Bug fixes:
-
-* Upgrade `pantry`: module mapping insertions into the database are now atomic.
-  Previously, if you SIGTERMed at the wrong time while running a script, you
-  could end up with an inconsistent database state.
-
-* `--resolver global` doesn't retrieve snapshots list from the internet because
-  doesn't need it. See
-  [#5103](https://github.com/commercialhaskell/stack/issues/5103)
-
-* Fix using relative links in haddocks output.  See
-  [#4971](https://github.com/commercialhaskell/stack/issues/4971).
-
-* Do not include generated Cabal file information in lock files. See
-  [#5045](https://github.com/commercialhaskell/stack/issues/5045).
-
-* Use proper Hoogle executable path when installed automatically. See
-  [#4905](https://github.com/commercialhaskell/stack/issues/4905)
-
-* Fix GHC version for batched package unregistration. See
-  [#4951](https://github.com/commercialhaskell/stack/issues/4951)
-
-* Use Hoogle from the snapshot used and not the latest version. See
-  [#4905](https://github.com/commercialhaskell/stack/issues/4905)
-
-* Resolve "'stty' is not recognized". See
-  [#4901](https://github.com/commercialhaskell/stack/issues/4901)
-
-* Fix missing reconfigure check causing errors when a package gets
-  used in multiple projects. See
-  [#5147](https://github.com/commercialhaskell/stack/issues/5147)
-
-## v2.1.3.1 - 2019-07-16
-
-Hackage-only release:
-
-* Support persistent-template-2.7.x
-* Support rio-0.1.11.0
-* Add `stack.yaml` back to hackage sdist, and add `snapshot.yaml`
-
-
-## v2.1.3 - 2019-07-13
-
-**Changes since v2.1.1**
-
-Behavior changes:
-
-* Disable WAL mode for SQLite3 databases, to improve compatibility with some
-  platforms and filesystems. See
-  [#4876](https://github.com/commercialhaskell/stack/issues/4876).
-
-* By default, do not perform expiry checks in Hackage Security. See
-  [#4928](https://github.com/commercialhaskell/stack/issues/4928).
-
-Other enhancements:
-
-* Do not rerun expected test failures. This is mostly a change that will only
-  affect the Stackage Curator use case, but there is now an additional message
-  letting the user know when a previously-failed test case is being rerun.
-
-* Move configure information for project packages back to .stack-work to improve
-  caching. See
-  [#4893](https://github.com/commercialhaskell/stack/issues/4893).
-
-Bug fixes:
-
-* Fix to allow dependencies on specific versions of local git repositories. See
-  [#4862](https://github.com/commercialhaskell/stack/pull/4862)
-
-* Allow Stack commands to be run in Nix mode without having a project file
-  available. See
-  [#4854](https://github.com/commercialhaskell/stack/issues/4864).
-
-* Removes dependency on gnu-tar for OSX and Linux environment. The
-  `--force-local` option was required only for windows environment.
-
-* Properly wait for the `tar` subprocess to complete before returning, thereby
-  avoiding a SIGTERM screwing up GHC installation. See
-  [#4888](https://github.com/commercialhaskell/stack/issues/4888).
-
-* Use package complete locations from lock files when resolving dependencies in
-  `extra-deps`. See
-  [#4887](https://github.com/commercialhaskell/stack/issues/4887).
-
-* Set the `HASKELL_DIST_DIR` environment to a proper package dist directory so
-  `doctest` is able to load modules autogenerated by Cabal.
-
-* Expose package library when running tests.
-
-* Fix support for non-ASCII module names. See
-  [#4938](https://github.com/commercialhaskell/stack/issues/4938)
-
-Other changes:
-
-* Rename `pantry-tmp` package back to `pantry`, now that we have gained
-  maintainership (which had been used by someone else for a candidate-only test
-  that made it look like the name was free but prevented uploading a real
-  package).
-
-
-## v2.1.1.1 - 2019-06-14
-
-Hackage-only release that removes `stack.yaml` from the sdist.  This is because
-`stack.yaml` now defines a multi-package project, whereas Hackage works on the
-basis on individual packages (see
-[#4860](https://github.com/commercialhaskell/stack/issues/4860))
-
-If building a `stack` executable for distribution, please download the source
-code from https://github.com/commercialhaskell/stack/releases/tag/v2.1.1 and
-build it using Stack itself in order to ensure identical behaviour to official
-binaries. This package on Hackage is provided for convenience and bootstrapping
-purposes.
-
-
-## v2.1.1 - 2019-06-13
-
-The Stack 2 release represents a series of significant changes to how Stack
-works internally. For the vast majority of cases, these changes are backwards
-compatible, in that existing projects will continue to build in the same way
-with Stack 2 as they did with Stack 1. The large version bump is due to the
-fundamental internal changes to cache handling, database storage (using SQLite
-in place of binary files), implicit snapshots (which greatly improve the
-precompiled cache), and moving to Pantry. We have also removed some less used
-features, as listed below.
-
-**Changes since v1.9.3**
-
-Major changes:
-
-* Switch over to pantry for managing packages. This is a major change to Stack's
-  internals, and affects user-visible behavior in a few places. Some highlights:
-    * Drop support for multiple package indices and legacy
-      `00-index.tar` style indices. See
-      [#4137](https://github.com/commercialhaskell/stack/issues/4137).
-    * Support for archives and repos in values of the `packages` key has been
-      removed. Instead, you must use the `extra-deps` key for such dependencies.
-      `packages` now only supports local filepaths.
-    * Add support for Git repositories containing (recursive) submodules.
-    * Addition of new configuration options for specifying a "pantry
-      tree" key, which provides more reproducibility around builds,
-      and (in the future) will be used for more efficient package
-      content downloads. You can also specify package name and version
-      for more efficient config parsing.
-          * __NOTE__ The new `stack freeze` command provides support
-            for automatically generating this additional
-            information.
-    * Package contents and metadata are stored in an SQLite database
-      in place of files on the filesystem. The `pantry` library can be
-      used for interacting with these contents.
-    * Internally, Stack has changed many datatypes, including moving
-      to Cabal's definition of many data types. As a result of such
-      changes, existing cache files will in general be invalidated,
-      resulting in Stack needing to rebuild many previously cached
-      builds in the new version. Sorry :(.
-    * A new command, `stack freeze` has been added which outputs
-      project and snapshot definitions with dependencies pinned to
-      their exact versions.
-    * The `ignore-revision-mismatch` setting is no longer needed, and
-      has been removed.
-    * Overriding GHC boot packages results in any other GHC boot
-      packages depending on it being no longer available as a dependency,
-      such packages need to be added explicitly when needed. See
-      [#4510] (https://github.com/commercialhaskell/stack/issues/4510).
-    * Cabal solver integration was not updated to support newer
-      `cabal-install` versions so `stack solver` command was removed as
-      well as a related option `--solver` from `stack new` and
-      `stack init`.
-* Upgrade to Cabal 2.4
-    * Note that, in this process, the behavior of file globbing has
-      been modified to match that of Cabal. In particular, this means
-      that for Cabal spec versions less than 2.4, `*.txt` will
-      match `foo.txt`, but not `foo.2.txt`.
-* Remove the `stack image` command. With the advent of Docker multistage
-  builds, this functionality is no longer useful. For an example, please see
-  [Building Haskell Apps with Docker](https://www.fpcomplete.com/blog/2017/12/building-haskell-apps-with-docker).
-* Experimental: Support building GHC from source
-    * Stack now supports building and installing GHC from source. The built GHC
-      is uniquely identified by a commit id and an Hadrian "flavour" (Hadrian is
-      the newer GHC build system), hence `compiler` can be set to use a GHC
-      built from source with `ghc-git-COMMIT-FLAVOUR`
-* `stack.yaml` now supports a `configure-options`, which are passed directly to
-  the `configure` step in the Cabal build process. See
-  [#1438](https://github.com/commercialhaskell/stack/issues/1438)
-* Remove support for building GHCJS itself. Future releases of Stack
-  may remove GHCJS support entirely.
-* Support for lock files for pinning exact project dependency versions
-
-Behavior changes:
-
-* `stack.yaml` now supports `snapshot`: a synonym for `resolver`. See
-  [#4256](https://github.com/commercialhaskell/stack/issues/4256)
-* `stack script` now passes `-i -idir` in to the `ghc`
-  invocation. This makes it so that the script can import local
-  modules, and fixes an issue where `.hs` files in the current
-  directory could affect interpretation of the script. See
-  [#4538](https://github.com/commercialhaskell/stack/pull/4538)
-* When using `stack script`, custom snapshot files will be resolved
-  relative to the directory containing the script.
-* Remove the deprecated `--upgrade-cabal` flag to `stack setup`.
-* Support the `drop-packages` key in `stack.yaml`
-* Remove the GPG signing code during uploads. The GPG signatures have
-  never been used yet, and there are no plans to implement signature
-  verification.
-* Remove the `--plain` option for the `exec` family of commands
-* Always use the `--exact-configuration` Cabal configuration option when
-  building (should mostly be a non-user-visible enhancement).
-* No longer supports Cabal versions older than `1.19.2`.  This means
-  projects using snapshots earlier than `lts-3.0` or
-  `nightly-2015-05-05` will no longer build.
-* Remove the `stack docker cleanup` command.  Docker itself now has
-  [`docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/)
-  and
-  [`docker container prune`](https://docs.docker.com/engine/reference/commandline/container_prune/),
-  which you can use instead.
-* Interleaved output is now turned on by default, see
-  [#4702](https://github.com/commercialhaskell/stack/issues/4702). In
-  addition, the `packagename> ` prefix is no longer included in
-  interleaved mode when only building a single target.
-* The `-fhide-source-paths` GHC option is now enabled by default and
-  can be disabled via the `hide-source-paths` configuration option in
-  `stack.yaml`. See
-  [#3784](https://github.com/commercialhaskell/stack/issues/3784)
-* Stack will reconfigure a package if you modify your `PATH` environment
-  variable. See
-  [#3138](https://github.com/commercialhaskell/stack/issues/3138).
-* For GHC 8.4 and later, disable the "shadowed dependencies" workaround. This
-  means that Stack will no longer have to force reconfigures as often. See
-  [#3554](https://github.com/commercialhaskell/stack/issues/3554).
-* When building a package, Stack takes a lock on the dist directory in
-  use to avoid multiple runs of Stack from trampling each others'
-  files. See
-  [#2730](https://github.com/commercialhaskell/stack/issues/2730).
-* Stack will check occasionally if there is a new version available and prompt
-  the user to upgrade. This will not incur any additional network traffic, as
-  it will piggy-back on the existing Hackage index updates. You can set
-  `recommend-stack-upgrade: false` to bypass this. See
-  [#1681](https://github.com/commercialhaskell/stack/issues/1681).
-* `stack list-dependencies` has been removed in favour of
-  `stack ls dependencies`.
-* The new default for `--docker-auto-pull` is enabled. See
-  [#3332](https://github.com/commercialhaskell/stack/issues/3332).
-
-Other enhancements:
-
-* Support MX Linux in get-stack.sh. Fixes
-  [#4769](https://github.com/commercialhaskell/stack/issues/4769).
-* Defer loading up of files for project packages. This allows us to get
-  plan construction errors much faster, and avoid some unnecessary
-  work when only building a subset of packages. This is especially
-  useful for the curator use case.
-* Existing global option `--color=WHEN` is now also available as a
-  non-project-specific yaml configuration parameter `color:`.
-* Adopt the standard proposed at http://no-color.org/, that color should not be
-  added by default if the `NO_COLOR` environment variable is present.
-* New command `stack ls stack-colors` lists the styles and the associated 'ANSI'
-  control character sequences that Stack uses to color some of its output. See
-  `stack ls stack-colors --help` for more information.
-* New global option `--stack-colors=STYLES`, also available as a
-  non-project-specific yaml configuration parameter, allows a Stack user to
-  redefine the default styles that Stack uses to color some of its output. See
-  `stack --help` for more information.
-* British English spelling of 'color' (colour) accepted as an alias for
-  `--color`, `--stack-colors`, `stack ls stack-colors` at the command line and
-  for `color:` and `stack-colors:` in yaml configuration files.
-* New build option `--ddump-dir`. (See
-  [#4225](https://github.com/commercialhaskell/stack/issues/4225))
-* Stack parses and respects the `preferred-versions` information from
-  Hackage for choosing latest version of a package in some cases,
-  e.g. `stack unpack packagename`.
-* The components output in the `The main module to load is ambiguous` message
-  now include package names so they can be more easily copy-pasted.
-* Git repos are shared across multiple projects. See
-  [#3551](https://github.com/commercialhaskell/stack/issues/3551)
-* Use en_US.UTF-8 locale by default in pure Nix mode so programs won't
-  crash because of Unicode in their output
-  [#4095](https://github.com/commercialhaskell/stack/issues/4095)
-* Add `--tree` to `ls dependencies` to list dependencies as tree.
-  [#4101](https://github.com/commercialhaskell/stack/issues/4101)
-* Add `--pedantic` to `ghci` to run with `-Wall` and `-Werror`
-  [#4463](https://github.com/commercialhaskell/stack/issues/4463)
-* Add `--cabal-files` flag to `stack ide targets` command.
-* Add `--stdout` flag to all `stack ide` subcommands.
-* Use batches when unregistering packages with `ghc-pkg`.
-  (See [#2662](https://github.com/commercialhaskell/stack/issues/2662))
-* `get-stack` script now works on Windows CI machines of Appveyor,
-  Travis and Azure Pipelines. See
-  [#4535](https://github.com/commercialhaskell/stack/issues/4535)/
-* Show snapshot being used when `stack ghci` is invoked outside of a project
-  directory. See
-  [#3651](https://github.com/commercialhaskell/stack/issues/3651)
-* The script interpreter now accepts a `--extra-dep` flag for adding
-  packages not present in the snapshot. Currently, this only works
-  with packages from Hackage, not Git repos or archives.
-* When using the script interpreter with `--optimize` or `--compile`,
-  Stack will perform an optimization of checking whether a newer
-  executable exists, making reruns significantly faster. There's a
-  downside to this, however: if you have a multifile script, and
-  change one of the dependency modules, Stack will not automatically
-  detect and recompile.
-* `stack clean` will delete the entire `.stack-work/dist` directory,
-  not just the relevant subdirectory for the current GHC version. See
-  [#4480](https://github.com/commercialhaskell/stack/issues/4480).
-* Add `stack purge` as a shortcut for `stack clean --full`. See
-  [#3863](https://github.com/commercialhaskell/stack/issues/3863).
-* Both `stack dot` and `stack ls dependencies` accept a
-  `--global-hints` flag to bypass the need for an installed GHC. See
-  [#4390](https://github.com/commercialhaskell/stack/issues/4390).
-* Add the `stack config env` command for getting shell script environment
-  variables. See [#620](https://github.com/commercialhaskell/stack/issues/620).
-* Less verbose output from `stack setup` on Windows. See
-  [#1212](https://github.com/commercialhaskell/stack/issues/1212).
-* Add an optional `ignore-expiry` key to the `hackage-security` key of
-  `~/.stack/config.yaml`. It allows disabling of timestamp expiration
-  verification just like `cabal --ignore-expiry` does. The flag is not enabled
-  by default so that the default functionality is not changed.
-* Include default values for most command line flags in the `--help` output. See
-  [#893](https://github.com/commercialhaskell/stack/issues/893).
-* Set the `GHC_ENVIRONMENT` environment variable to specify dependency
-  packages explicitly when running test. This is done to prevent
-  ambiguous module name errors in `doctest` tests.
-* `get-stack` script now works on Windows CI machines of Appveyor,
-  Travis and Azure Pipelines. See
-  [#4535](https://github.com/commercialhaskell/stack/issues/4535)
-* Warn when a Docker image does not include a `PATH` environment
-  variable. See
-  [#2472](https://github.com/commercialhaskell/stack/issues/2742)
-* When using `system-ghc: true`, Stack will now find the appropriate GHC
-  installation based on the version suffix, allowing you to more easily switch
-  between various system-installed GHCs. See
-  [#2433](https://github.com/commercialhaskell/stack/issues/2433).
-* `stack init` will now support create a `stack.yaml` file without any local
-  packages. See [#2465](https://github.com/commercialhaskell/stack/issues/2465)
-* Store caches in SQLite database instead of files.
-* No longer use "global" Docker image database (`docker.db`).
-* User config files are respected for the script command. See
-  [#3705](https://github.com/commercialhaskell/stack/issues/3705),
-  [#3887](https://github.com/commercialhaskell/stack/issues/3887).
-* Set the `GHC_ENVIRONMENT` environment variable to `-` to tell GHC to ignore
-  any such files when GHC is new enough (>= 8.4.4), otherwise simply unset the
-  variable. This allows Stack to have control of package databases when running
-  commands like `stack exec ghci`, even in the presence of implicit environment
-  files created by `cabal new-build`. See
-  [#4706](https://github.com/commercialhaskell/stack/issues/4706).
-* Use a database cache table to speed up discovery of installed GHCs
-* You can specify multiple `--test-arguments` options. See
-  [#2226](https://github.com/commercialhaskell/stack/issues/2226)
-* Windows terminal width detection is now done. See
-  [#3588](https://github.com/commercialhaskell/stack/issues/3588)
-* On Windows, informs users if the 'programs' path contains a space character
-  and further warns users if that path does not have an alternative short
-  ('8 dot 3') name, referencing the `local-programs-path` configuration option.
-  See [#4726](https://github.com/commercialhaskell/stack/issues/4726)
-* Add `--docker-mount-mode` option to set the Docker volume mount mode
-  for performance tuning on macOS.
-
-Bug fixes:
-
-* Ignore duplicate files for a single module when a Haskell module was
-  generated from a preprocessor file. See
-  [#4076](https://github.com/commercialhaskell/stack/issues/4076).
-* Only track down components in current directory if there are no
-  hs-source-dirs found. This eliminates a number of false-positive
-  warnings, similar to
-  [#4076](https://github.com/commercialhaskell/stack/issues/4076).
-* Handle a change in GHC's hi-dump format around `addDependentFile`,
-  which now includes a hash. See
-  [yesodweb/yesod#1551](https://github.com/yesodweb/yesod/issues/1551)
-* Fix `subdirs` for git repos in `extra-deps` to match whole directory names.
-  Also fixes for `subdirs: .`. See
-  [#4292](https://github.com/commercialhaskell/stack/issues/4292)
-* Fix for git packages to update submodules to the correct state. See
-  [#4314](https://github.com/commercialhaskell/stack/pull/4314)
-* Add `--cabal-files` flag to `stack ide targets` command.
-* Don't download ghc when using `stack clean`.
-* Support loading in GHCi definitions from symlinked C files. Without this
-  patch, Stack will try to find object files in the directory pointed to
-  by symlinks, while GCC will produce the object files in the original
-  directory. See
-  [#4402](https://github.com/commercialhaskell/stack/pull/4402)
-* Fix handling of GitHub and URL templates on Windows. See
-  [#4394](https://github.com/commercialhaskell/stack/issues/4394)
-* Fix `--file-watch` not responding to file modifications when running
-  inside docker on Mac. See
-  [#4506](https://github.com/commercialhaskell/stack/issues/4506)
-* Using `--ghc-options` with `stack script --compile` now works.
-* Ensure the detailed-0.9 type tests work.
-  See [#4453](https://github.com/commercialhaskell/stack/issues/4453).
-* Extra include and lib dirs are now order-dependent. See
-  [#4527](https://github.com/commercialhaskell/stack/issues/4527).
-* Apply GHC options when building a `Setup.hs` file. See
-  [#4526](https://github.com/commercialhaskell/stack/issues/4526).
-* Stack handles ABI changes in FreeBSD 12 by differentiating that version from
-  previous.
-* Help text for the `templates` subcommand now reflects behaviour in Stack 1.9
-  — that it downloads and shows a help file, rather than listing available
-  templates.
-* Fix detection of AArch64 platform (this broke when we upgraded to a newer
-  Cabal version).
-* Docker: fix detecting and pulling missing images with `--docker-auto-pull`.
-  See
-  [#4598](https://github.com/commercialhaskell/stack/issues/4598)
-* Hackage credentials are not world-readable. See
-  [#2159](https://github.com/commercialhaskell/stack/issues/2159).
-* Warnings are dumped from logs even when color is enabled. See
-  [#2997](https://github.com/commercialhaskell/stack/issues/2997)
-* `stack init` will now work for Cabal files with sublibraries. See
-  [#4408](https://github.com/commercialhaskell/stack/issues/4408)
-* When the Cabal spec version is newer than the global Cabal version, build
-  against the snapshot's Cabal library. See
-  [#4488](https://github.com/commercialhaskell/stack/issues/4488)
-* Docker: fix detection of expected subprocess failures.  This fixes
-  downloading a compatible `stack` executable  when the host `stack` is not
-  compatible with the Docker image (on Linux), and doesn't show an unnecessary
-  extra error when the in-container re-exec'ed `stack` exits with failure.
-* The `stack ghci` command's `--ghc-options` flag now parses multiple options.
-  See [#3315](https://github.com/commercialhaskell/stack/issues/3315).
-
-
-## v1.9.3.1 - 2019-04-18
-
-Hackage-only release with no user facing changes (added compatibility
-with `rio-0.1.9.2`).
-
-
-## v1.9.3 - 2018-12-02
-
-Bug fixes:
-
-* Stack can now be compiled again inside a directory that does not
-  contain a `.git` directory. See
-  [#4364](https://github.com/commercialhaskell/stack/issues/4364#issuecomment-431600841)
-* Handle a change in GHC's hi-dump format around `addDependentFile`,
-  which now includes a hash. See
-  [yesodweb/yesod#1551](https://github.com/yesodweb/yesod/issues/1551)
-* Allow variables to appear in template file names.
-
-
-## v1.9.1.1 - 2018-11-14
-
-Hackage-only release with no user facing changes.
-
-* Stack can now be compiled again inside a directory that does not
-  contain a `.git` directory. See
-  [#4364](https://github.com/commercialhaskell/stack/issues/4364#issuecomment-431600841)
-
-
-## v1.9.1 - 2018-10-17
-
-Release notes:
-
-* Statically-linked Linux executables are back again, thanks to
-  [@nh2](https://github.com/nh2).
-* We will be deleting the Ubuntu, Debian, CentOS, Fedora, and Arch package repos
-  from `download.fpcomplete.com` soon. These have been deprecated for over a
-  year and have not received new releases, but were left in place for
-  compatibility with older scripts.
-
-Major changes:
-
-* Upgrade to Cabal 2.4
-    * Note that, in this process, the behavior of file globbing has
-      been modified to match that of Cabal. In particular, this means
-      that for Cabal spec versions less than 2.4, `*.txt` will
-      match `foo.txt`, but not `foo.2.txt`.
-* `GHCJS` support is being downgraded to 'experimental'. A warning notifying the
-  user of the experimental status of `GHCJS` will be displayed.
-
-Behavior changes:
-
-* `ghc-options` from `stack.yaml` are now appended to `ghc-options` from
-  `config.yaml`, whereas before they would be replaced.
-* `stack build` will now announce when sublibraries of a package are being
-  build, in the same way executables, tests, benchmarks and libraries are
-  announced
-* `stack sdist` will now announce the destination of the generated tarball,
-    regardless of whether or not it passed the sanity checks
-* The `--upgrade-cabal` option to `stack setup` has been
-  deprecated. This feature no longer works with GHC 8.2 and
-  later. Furthermore, the reason for this flag originally being
-  implemented was drastically lessened once Stack started using the
-  snapshot's `Cabal` library for custom setups. See:
-  [#4070](https://github.com/commercialhaskell/stack/issues/4070).
-* With the new namespaced template feature, `stack templates` is no
-  longer able to meaningfully display a list of all templates
-  available. Instead, the command will download and display a
-  [help file](https://github.com/commercialhaskell/stack-templates/blob/master/STACK_HELP.md)
-  with more information on how to discover templates. See:
-  [#4039](https://github.com/commercialhaskell/stack/issues/4039)
-* Tools used during building ('build tools') are now handled in a similar way to
-  `cabal-install`. In particular, for legacy `build-tools` fields, we use a
-  hard-coded list of build tools in place of looking up build tool packages in a
-  tool map. This both brings Stack's behavior closer into line with
-  `cabal-install`, avoids some bugs, and opens up some possible
-  optimizations/laziness. See:
-  [#4125](https://github.com/commercialhaskell/stack/issues/4125).
-* Mustache templating is not applied to large files (over 50kb) to
-  avoid performance degradation. See:
-  [#4133](https://github.com/commercialhaskell/stack/issues/4133).
-* `stack upload` signs the package by default, as documented. `--no-signature`
-  turns the signing off.
-  [#3739](https://github.com/commercialhaskell/stack/issues/3739)
-* In case there is a network connectivity issue while trying to
-  download a template, Stack will check whether that template had
-  been downloaded before. In that case, the cached version will be
-  used. See [#3850](https://github.com/commercialhaskell/stack/issues/3850).
-* In Stack's script interpreter, `-- stack --verbosity=info script` and
-  `-- stack script --verbosity=info` now have the same effect and both override
-  the `--verbosity=error` default in the interpreter. Previously the default
-  meant the former was equivalent to
-  `-- stack --verbosity=info script --verbosity=error` and the latter was
-  equivalent to `-- stack --verbosity=error script --verbosity=info`, with the
-  subcommand's global option having precedence over the Stack command's
-  global option in each case. See
-  [#5326](https://github.com/commercialhaskell/stack/issues/5326).
-
-Other enhancements:
-
-* On Windows before Windows 10, --color=never is the default on terminals that
-  can support ANSI color codes in output only by emulation
-* On Windows, recognise a 'mintty' (false) terminal as a terminal, by default
-* `stack build` issues a warning when `base` is explicitly listed in
-  `extra-deps` of `stack.yaml`
-* `stack build` suggests trying another GHC version should the build
-  plan end up requiring unattainable `base` version.
-* A new sub command `run` has been introduced to build and run a specified
-  executable similar to `cabal run`. If no executable is provided as the first
-  argument, it defaults to the first available executable in the project.
-* `stack build` missing dependency suggestions (on failure to construct a valid
-  build plan because of missing deps) are now printed with their latest Cabal
-  file revision hash. See
-  [#4068](https://github.com/commercialhaskell/stack/pull/4068).
-* Added new `--tar-dir` option to `stack sdist`, that allows to copy
-  the resulting tarball to the specified directory.
-* Introduced the `--interleaved-output` command line option and
-  `build.interleaved-output` config value which causes multiple concurrent
-  builds to dump to stderr at the same time with a `packagename> ` prefix. See
-  [#3225](https://github.com/commercialhaskell/stack/issues/3225).
-* The default retry strategy has changed to exponential backoff.
-  This should help with
-  [#3510](https://github.com/commercialhaskell/stack/issues/3510).
-* `stack new` now allows template names of the form `username/foo` to
-  download from a user other than `commercialstack` on GitHub, and can be
-  prefixed with the service `github:`, `gitlab:`, or `bitbucket:`. See
-  [#4039](https://github.com/commercialhaskell/stack/issues/4039)
-* Switch to `githash` to include some unmerged bugfixes in `gitrev`
-  Suggestion to add `'allow-newer': true` now shows path to user config
-  file where this flag should be put into
-  [#3685](https://github.com/commercialhaskell/stack/issues/3685)
-* `stack ghci` now asks which main target to load before doing the build,
-  rather than after
-* Bump to Hpack 0.29.0
-* With GHC 8.4 and later, Haddock is given the `--quickjump` flag.
-* It is possible to specify the Hackage base URL to upload packages to, instead
-  of the default of `https://hackage.haskell.org/`, by using `hackage-base-url`
-  configuration option.
-* When using Nix, if a specific minor version of GHC is not requested, the
-  latest minor version in the given major branch will be used automatically.
-
-Bug fixes:
-
-* `stack ghci` now does not invalidate `.o` files on repeated runs,
-  meaning any modules compiled with `-fobject-code` will be cached
-  between ghci runs. See
-  [#4038](https://github.com/commercialhaskell/stack/pull/4038).
-* `~/.stack/config.yaml` and `stack.yaml` terminating by newline
-* The previous released caused a regression where some `stderr` from the
-  `ghc-pkg` command showed up in the terminal. This output is now silenced.
-* A regression in recompilation checking introduced in v1.7.1 has been fixed.
-  See [#4001](https://github.com/commercialhaskell/stack/issues/4001)
-* `stack ghci` on a package with internal libraries was erroneously looking
-  for a wrong package corresponding to the internal library and failing to
-  load any module. This has been fixed now and changes to the code in the
-  library and the sublibrary are properly tracked. See
-  [#3926](https://github.com/commercialhaskell/stack/issues/3926).
-* For packages with internal libraries not depended upon, `stack build` used
-  to fail the build process since the internal library was not built but it
-  was tried to be registered. This is now fixed by always building internal
-  libraries. See
-  [#3996](https://github.com/commercialhaskell/stack/issues/3996).
-* `--no-nix` was not respected under NixOS
-* Fix a regression which might use a lot of RAM. See
-  [#4027](https://github.com/commercialhaskell/stack/issues/4027).
-* Order of commandline arguments does not matter anymore.
-  See [#3959](https://github.com/commercialhaskell/stack/issues/3959)
-* When prompting users about saving their Hackage credentials on upload,
-  flush to stdout before waiting for the response so the prompt actually
-  displays. Also fixes a similar issue with ghci target selection prompt.
-* If `cabal` is not on PATH, running `stack solver` now prompts the user
-  to run `stack install cabal-install`
-* `stack build` now succeeds in building packages which contain sublibraries
-  which are dependencies of executables, tests or benchmarks but not of the
-  main library. See
-  [#3787](https://github.com/commercialhaskell/stack/issues/3787).
-* Sublibraries are now properly considered for coverage reports when the test
-  suite depends on the internal library. Before, Stack was erroring when
-  trying to generate the coverage report, see
-  [#4105](https://github.com/commercialhaskell/stack/issues/4105).
-* Sublibraries are now added to the precompiled cache and recovered from there
-  when the snapshot gets updated. Previously, updating the snapshot when there
-  was a package with a sublibrary in the snapshot resulted in broken builds.
-  This is now fixed, see
-  [#4071](https://github.com/commercialhaskell/stack/issues/4071).
-* [#4114](https://github.com/commercialhaskell/stack/issues/4114) Stack pretty
-  prints error messages with proper `error` logging level instead of `warning`
-  now. This also fixes self-executing scripts not piping plan construction
-  errors from runhaskell to terminal (issue
-  [#3942](https://github.com/commercialhaskell/stack/issues/3942)).
-* Fix invalid "While building Setup.hs" when Cabal calls fail. See:
-  [#3934](https://github.com/commercialhaskell/stack/issues/3934)
-* `stack upload` signs the package by default, as documented. `--no-signature`
-  turns the signing off.
-  [#3739](https://github.com/commercialhaskell/stack/issues/3739)
-
-
-## v1.7.1 - 2018-04-27
-
-Release notes:
-
-* AArch64 (64-bit ARM) executables are now available for the first time.
-* Statically-linked Linux executables are no longer available, due to difficulty
-  with GHC 8.2.2 on Alpine Linux.
-* 32-bit Linux GMP4 executables for CentOS 6 are no longer available, since
-  GHC 8.2.2 is no longer being built for that platform.
-
-Major changes:
-
-* Upgrade from Cabal 2.0 to Cabal 2.2
-
-Behavior changes:
-
-* `stack setup` no longer uses different GHC configure options on Linux
-  distributions that use GCC with PIE enabled by default.  GHC detects
-  this itself since ghc-8.0.2, and Stack's attempted workaround for older
-  versions caused more problems than it solved.
-* `stack new` no longer initializes a project if the project template contains
-   a `stack.yaml` file.
-
-Other enhancements:
-
-* A new sub command `ls` has been introduced to Stack to view
-  local and remote snapshots present in the system. Use `stack ls
-  snapshots --help` to get more details about it.
-* `list-dependencies` has been deprecated. The functionality has
-  to accessed through the new `ls dependencies` interface. See
-  [#3669](https://github.com/commercialhaskell/stack/issues/3669)
-  for details.
-* Specify User-Agent HTTP request header on every HTTP request.
-  See [#3628](https://github.com/commercialhaskell/stack/issues/3628) for details.
-* `stack setup` looks for GHC binary distributions and installations by any OS
-  key that is compatible (rather than only checking a single one). This is
-  relevant on Linux where different distributions may have different
-  combinations of libtinfo 5/6, ncurses 5/6, and gmp 4/5, and will allow
-  simplifying the setup-info metadata YAML for future GHC releases.
-* The build progress bar reports names of packages currently building.
-* `stack setup --verbose` causes verbose output of GHC configure process.
-  See [#3716](https://github.com/commercialhaskell/stack/issues/3716)
-* Improve the error message when an `extra-dep` from a path or git reference
-  can't be found. See
-  [#3808](https://github.com/commercialhaskell/stack/pull/3808)
-* Nix integration is now disabled on windows even if explicitly enabled,
-  since it isn't supported. See
-  [#3600](https://github.com/commercialhaskell/stack/issues/3600)
-* `stack build` now supports a new flag `--keep-tmp-files` to retain
-  intermediate files and directories for the purpose of debugging. It is best
-  used with ghc's equivalent flag,
-  i.e. `stack build --keep-tmp-files --ghc-options=-keep-tmp-files`.
-  See [#3857](https://github.com/commercialhaskell/stack/issues/3857)
-* Improved error messages for snapshot parse exceptions
-* `stack unpack` now supports a `--to /target/directory` option to
-  specify where to unpack the package into
-* `stack hoogle` now supports a new flag `--server` that launches local
-  Hoogle server on port 8080. See
-  [#2310](https://github.com/commercialhaskell/stack/issues/2310)
-
-Bug fixes:
-
-* The script interpreter's implicit file arguments are now passed before other
-  arguments. See
-  [#3658](https://github.com/commercialhaskell/stack/issues/3658).
-  In particular, this makes it possible to pass `-- +RTS ... -RTS` to specify
-  RTS arguments used when running the script.
-* Don't ignore the template `year` parameter in config files, and clarify the
-  surrounding documentation. See
-  [#2275](https://github.com/commercialhaskell/stack/issues/2275).
-* Benchmarks used to be run concurrently with other benchmarks
-  and build steps. This is non-ideal because CPU usage of other processes
-  may interfere with benchmarks. It also prevented benchmark output from
-  being displayed by default. This is now fixed. See
-  [#3663](https://github.com/commercialhaskell/stack/issues/3663).
-* `stack ghci` now allows loading multiple packages with the same
-  module name, as long as they have the same filepath. See
-  [#3776](https://github.com/commercialhaskell/stack/pull/3776).
-* `stack ghci` no longer always adds a dependency on `base`. It is
-  now only added when there are no local targets. This allows it to
-  be to load code that uses replacements for `base`. See
-  [#3589](https://github.com/commercialhaskell/stack/issues/3589#issuecomment)
-* `stack ghci` now uses correct paths for autogen files with
-  [#3791](https://github.com/commercialhaskell/stack/issues/3791)
-* When a package contained sublibraries, Stack was always recompiling the
-  package. This has been fixed now, no recompilation is being done because of
-  sublibraries. See
-  [#3899](https://github.com/commercialhaskell/stack/issues/3899).
-* The `get-stack.sh` install script now matches manual instructions
-  when it comes to Debian/Fedora/CentOS install dependencies.
-* Compile Cabal-simple with gmp when using Nix.
-  See [#2944](https://github.com/commercialhaskell/stack/issues/2944)
-* `stack ghci` now replaces the Stack process with ghci. This improves
-  signal handling behavior. In particular, handling of Ctrl-C.  To make
-  this possible, the generated files are now left behind after exit.
-  The paths are based on hashing file contents, and it's stored in the
-  system temporary directory, so this shouldn't result in too much
-  garbage. See
-  [#3821](https://github.com/commercialhaskell/stack/issues/3821).
-
-
-## v1.6.5 - 2018-02-19
-
-Bug fixes:
-
-* Some unnecessary rebuilds when no files were changed are now avoided, by
-  having a separate build cache for each component of a package. See
-  [#3732](https://github.com/commercialhaskell/stack/issues/3732).
-* Correct the behavior of promoting a package from snapshot to local
-  package. This would get triggered when version bounds conflicted in
-  a snapshot, which could be triggered via Hackage revisions for old
-  packages. This also should allow custom snapshots to define
-  conflicting versions of packages without issue. See
-  [Stackage issue #3185](https://github.com/fpco/stackage/issues/3185).
-* When promoting packages from snapshot to local, we were
-  occasionally discarding the actual package location content and
-  instead defaulting to pulling the package from the index. We now
-  correctly retain this information. Note that if you were affected by
-  this bug, you will likely need to delete the binary build cache
-  associated with the relevant custom snapshot. See
-  [#3714](https://github.com/commercialhaskell/stack/issues/3714).
-* `--no-rerun-tests` has been fixed. Previously, after running a test
-  we were forgetting to record the result, which meant that all tests
-  always ran even if they had already passed before. See
-  [#3770](https://github.com/commercialhaskell/stack/pull/3770).
-* Includes a patched version of `hackage-security` which fixes both
-  some issues around asynchronous exception handling, and moves from
-  directory locking to file locking, making the update mechanism
-  resilient against SIGKILL and machine failure. See `hackage-security` issue
-  [#187](https://github.com/haskell/hackage-security/issues/187)
-  and Stack issue
-  [#3073](https://github.com/commercialhaskell/stack/issues/3073).
-
-## v1.6.3.1 - 2018-02-16
-
-Hackage-only release with no user facing changes (updated to build with
-newer version of Hpack dependency).
-
-## v1.6.3 - 2017-12-23
-
-Enhancements:
-
-* In addition to supporting `.tar.gz` and `.zip` files as remote archives,
-  plain `.tar` files are now accepted too. This will additionally help with
-  cases where HTTP servers mistakenly set the transfer encoding to `gzip`. See
-  [#3647](https://github.com/commercialhaskell/stack/issues/3647).
-* Links to docs.haskellstack.org ignore Stack version patchlevel.
-* Downloading Docker-compatible `stack` executable ignores Stack version
-  patchlevel.
-
-Bug fixes:
-
-* For versions of Cabal before 1.24, ensure that the dependencies of
-  non-buildable components are part of the build plan to work around an old
-  Cabal bug. See
-  [#3631](https://github.com/commercialhaskell/stack/issues/3631).
-* Run the Cabal file checking in the `sdist` command more reliably by
-  allowing the Cabal library to flatten the
-  `GenericPackageDescription` itself.
-
-## v1.6.1.1 - 2017-12-20
-
-Hackage-only release with no user facing changes (updated to build with
-newer dependency versions).
-
-## v1.6.1 - 2017-12-07
-
-Major changes:
-
-* Complete overhaul of how snapshots are defined, the `packages` and
-  `extra-deps` keys, and a number of related items. For full
-  details, please see the
-  [writeup](https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots)
-  on these changes.
-  [PR #3249](https://github.com/commercialhaskell/stack/pull/3249),
-  see the PR description for a number of related issues.
-* Upgraded to version 2.0 of the Cabal library.
-
-Behavior changes:
-
-* The `--install-ghc` flag is now on by default. For example, if you
-  run `stack build` in a directory requiring a GHC that you do not
-  currently have, Stack will automatically download and install that
-  GHC. You can explicitly set `install-ghc: false` or pass the flag
-  `--no-install-ghc` to regain the previous behavior.
-* `stack ghci` no longer loads modules grouped by package. This is
-  always an improvement for plain ghci - it makes loading faster and
-  less noisy. For intero, this has the side-effect that it will no
-  longer load multiple packages that depend on TH loading relative
-  paths.  TH relative paths will still work when loading a single
-  package into intero. See
-  [#3309](https://github.com/commercialhaskell/stack/issues/3309)
-* Setting GHC options for a package via `ghc-options:` in your
-  `stack.yaml` will promote it to a local package, providing for more
-  consistency with flags and better reproducibility. See:
-  [#849](https://github.com/commercialhaskell/stack/issues/849)
-* The `package-indices` setting with Hackage no longer works with the
-  `00-index.tar.gz` tarball, but must use the `01-index.tar.gz` file
-  to allow revised packages to be found.
-* Options passed via `--ghci-options` are now passed to the end of the
-  invocation of ghci, instead of the middle.  This allows using `+RTS`
-  without an accompanying `-RTS`.
-* When auto-detecting `--ghc-build`, `tinfo6` is now preferred over
-  `standard` if both versions of libtinfo are installed
-* Addition of `stack build --copy-compiler-tool`, to allow tools like
-  intero to be installed globally for a particular compiler.
-  [#2643](https://github.com/commercialhaskell/stack/issues/2643)
-* Stack will ask before saving hackage credentials to file. This new
-  prompt can be avoided by using the `save-hackage-creds` setting. Please
-  see [#2159](https://github.com/commercialhaskell/stack/issues/2159).
-* The `GHCRTS` environment variable will no longer be passed through to
-  every program Stack runs. Instead, it will only be passed through
-  commands like `exec`, `runghc`, `script`, `ghci`, etc.
-  See [#3444](https://github.com/commercialhaskell/stack/issues/3444).
-* `ghc-options:` for specific packages will now come after the options
-  specified for all packages / particular sets of packages. See
-  [#3573](https://github.com/commercialhaskell/stack/issues/3573).
-* The `pvp-bounds` feature is no longer fully functional, due to some
-  issues with the Cabal library's printer. See
-  [#3550](https://github.com/commercialhaskell/stack/issues/3550).
-
-Other enhancements:
-
-* The `with-hpack` configuration option specifies an Hpack executable to use
-  instead of the Hpack bundled with Stack. Please
-  see [#3179](https://github.com/commercialhaskell/stack/issues/3179).
-* It's now possible to skip tests and benchmarks using `--skip`
-  flag
-* `GitSHA1` is now `StaticSHA256` and is implemented using the
-  `StaticSize 64 ByteString` for improved performance. See
-  [#3006](https://github.com/commercialhaskell/stack/issues/3006)
-* Dependencies via HTTP(S) archives have been generalized to allow
-  local file path archives, as well as to support setting a
-  cryptographic hash (SHA256) of the contents for better
-  reproducibility.
-* Allow specifying `--git-branch` when upgrading
-* When running `stack upgrade` from a file which is different from the
-  default executable path (e.g., on POSIX systems,
-  `~/.local/bin/stack`), it will now additionally copy the new
-  executable over the currently running `stack` executable. If
-  permission is denied (such as in `/usr/local/bin/stack`), the user
-  will be prompted to try again using `sudo`. This is intended to
-  assist with the user experience when the `PATH` environment variable
-  has not been properly configured, see
-  [#3232](https://github.com/commercialhaskell/stack/issues/3232).
-* `stack setup` for ghcjs will now install `alex` and `happy` if
-  they are not present.  See
-  [#3109](https://github.com/commercialhaskell/stack/issues/3232).
-* Added `stack ghci --only-main` flag, to skip loading / importing
-  all but main modules. See the ghci documentation page
-  for further info.
-* Allow GHC's colored output to show through. GHC colors output
-  starting with version 8.2.1, for older GHC this does nothing.
-  Sometimes GHC's heuristics would work fine even before this change,
-  for example in `stack ghci`, but this override's GHC's heuristics
-  when they're broken by our collecting and processing GHC's output.
-* Extended the `ghc-options` key to support `$locals`, `$targets`,
-  and `$everything`. See:
-  [#3329](https://github.com/commercialhaskell/stack/issues/3329)
-* Better error message for case that `stack ghci` file targets are
-  combined with invalid package targets. See:
-  [#3342](https://github.com/commercialhaskell/stack/issues/3342)
-* For profiling now uses `-fprof-auto -fprof-cafs` instead of
-  the deprecated `-auto-all -caf-all`. See:
-  [#3360](https://github.com/commercialhaskell/stack/issues/3360)
-* Better descriptions are now available for `stack upgrade --help`. See:
-  [#3070](https://github.com/commercialhaskell/stack/issues/3070)
-* When using Nix, nix-shell now depends always on gcc to prevent build errors
-  when using the FFI. As ghc depends on gcc anyway, this doesn't increase the
-  dependency footprint.
-* `--cwd DIR` can now be passed to `stack exec` in order to execute the
-  program in a different directory. See:
-  [#3264](https://github.com/commercialhaskell/stack/issues/3264)
-* Plan construction will detect if you add an executable-only package
-  as a library dependency, resulting in much clearer error
-  messages. See:
-  [#2195](https://github.com/commercialhaskell/stack/issues/2195).
-* Addition of `--ghc-options` to `stack script` to pass options directly
-  to GHC. See:
-  [#3454](https://github.com/commercialhaskell/stack/issues/3454)
-* Add Hpack `package.yaml` to build Stack itself
-* Add `ignore-revision-mismatch` setting. See:
-  [#3520](https://github.com/commercialhaskell/stack/issues/3520).
-* Log when each individual test suite finishes. See:
-  [#3552](https://github.com/commercialhaskell/stack/issues/3552).
-* Avoid spurious rebuilds when using `--file-watch` by not watching files for
-  executable, test and benchmark components that aren't a target. See:
-  [#3483](https://github.com/commercialhaskell/stack/issues/3483).
-* Stack will now try to detect the width of the running terminal
-  (only on POSIX for the moment) and use that to better display
-  output messages. Work is ongoing, so some messages will not
-  be optimal yet. The terminal width can be overridden with the
-  new `--terminal-width` command-line option (this works even on
-  non-POSIX).
-* Passing non local packages as targets to `stack ghci` will now
-  cause them to be used as `-package` args along with package
-  hiding.
-* Detect when user changed Cabal file instead of `package.yaml`. This
-  was implemented upstream in Hpack. See
-  [#3383](https://github.com/commercialhaskell/stack/issues/3383).
-* Automatically run `autoreconf -i` as necessary when a `configure`
-  script is missing. See
-  [#3534](https://github.com/commercialhaskell/stack/issues/3534)
-* GHC binary distributions can now be identified by their SHA256 checksum in
-  addition to their SHA1 checksum, allowing for more security in download.
-* For filesystem setup-info paths, it's no longer assumed that the
-  directory is writable, instead a temp dir is used.  See
-  [#3188](https://github.com/commercialhaskell/stack/issues/3188).
-
-Bug fixes:
-
-* `stack hoogle` correctly generates Hoogle databases. See:
-  [#3362](https://github.com/commercialhaskell/stack/issues/3362)
-* `stack --docker-help` is now clearer about --docker implying
-   system-ghc: true, rather than both --docker and --no-docker.
-* `stack haddock` now includes package names for all modules in the
-   Haddock index page. See:
-  [#2886](https://github.com/commercialhaskell/stack/issues/2886)
-* Fixed an issue where Stack wouldn't detect missing Docker images
-  properly with newer Docker versions.
-  [#3171](https://github.com/commercialhaskell/stack/pull/3171)
-* Previously, Cabal files with just test-suite could cause build to fail
-  ([#2862](https://github.com/commercialhaskell/stack/issues/2862))
-* If an invalid snapshot file has been detected (usually due to
-  mismatched hashes), Stack will delete the downloaded file and
-  recommend either retrying or filing an issue upstream. See
-  [#3319](https://github.com/commercialhaskell/stack/issues/3319).
-* Modified the flag parser within Stack to match the behavior of
-  Cabal's flag parser, which allows multiple sequential dashes. See
-  [#3345](https://github.com/commercialhaskell/stack/issues/3345)
-* Now clears the hackage index cache if it is older than the
-  downloaded index.  Fixes potential issue if Stack was interrupted when
-  updating index.
-  See [#3033](https://github.com/commercialhaskell/stack/issues/3033)
-* The Stack install script now respects the `-d` option.
-  See [#3366](https://github.com/commercialhaskell/stack/pull/3366).
-* `stack script` can now handle relative paths to source files.
-  See [#3372](https://github.com/commercialhaskell/stack/issues/3372).
-* Fixes explanation of why a target is needed by the build plan, when the
-  target is an extra-dep from the commandline.
-  See [#3378](https://github.com/commercialhaskell/stack/issues/3378).
-* Previously, if you delete a yaml file from ~/.stack/build-plan, it would
-  trust the etag and not re-download.  Fixed in this version.
-* Invoking `stack --docker` in parallel now correctly locks the sqlite database.
-  See [#3400](https://github.com/commercialhaskell/stack/issues/3400).
-* docs.haskellstack.org RTD documentation search is replaced by the mkdocs
-  search. Please see
-  [#3376](https://github.com/commercialhaskell/stack/issues/3376).
-* `stack clean` now works with nix.  See
-  [#3468](https://github.com/commercialhaskell/stack/issues/3376).
-* `stack build --only-dependencies` no longer builds local project packages
-  that are depended on. See
-  [#3476](https://github.com/commercialhaskell/stack/issues/3476).
-* Properly handle relative paths stored in the precompiled cache files. See
-  [#3431](https://github.com/commercialhaskell/stack/issues/3431).
-* In some cases, Cabal does not realize that it needs to reconfigure, and must
-  be told to do so automatically. This would manifest as a "shadowed
-  dependency" error message. We now force a reconfigure whenever a dependency is
-  built, even if the package ID remained the same. See
-  [#2781](https://github.com/commercialhaskell/stack/issues/2781).
-* When `--pvp-bounds` is enabled for sdist or upload, internal
-  dependencies could cause errors when uploaded to hackage.  This is
-  fixed, see [#3290](https://github.com/commercialhaskell/stack/issues/3290)
-* Fixes a bug where nonexistent hackage versions would cause Stack to
-  suggest the same package name, without giving version info. See
-  [#3562](https://github.com/commercialhaskell/stack/issues/3562)
-* Fixes a bug that has existed since 1.5.0, where
-  `stack setup --upgrade-cabal` would say that Cabal is already the latest
-  version, when it wasn't.
-* Ensure that an `extra-dep` from a local directory is not treated as
-  a `$locals` for GHC options purposes. See
-  [#3574](https://github.com/commercialhaskell/stack/issues/3574).
-* Building all executables only happens once instead of every
-  time. See
-  [#3229](https://github.com/commercialhaskell/stack/issues/3229) for
-  more info.
-
-## 1.5.1 - 2017-08-05
-
-Bug fixes:
-
-* Stack eagerly tries to parse all Cabal files related to a
-  snapshot. Starting with Stackage Nightly 2017-07-31, snapshots are
-  using GHC 8.2.1, and the `ghc.cabal` file implicitly referenced uses
-  the (not yet supported) Cabal 2.0 file format. Future releases of
-  Stack will both be less eager about Cabal file parsing and support
-  Cabal 2.0. This patch simply bypasses the error for invalid parsing.
-
-## 1.5.0 - 2017-07-25
-
-Behavior changes:
-
-* `stack profile` and `stack trace` now add their extra RTS arguments for
-  benchmarks and tests to the beginning of the args, instead of the end.
-  See [#2399](https://github.com/commercialhaskell/stack/issues/2399)
-* Support for Git-based indices has been removed.
-
-Other enhancements:
-
-* `stack setup` allow to control options passed to ghcjs-boot with
-  `--ghcjs-boot-options` (one word at a time) and `--[no-]ghcjs-boot-clean`
-* `stack setup` now accepts a `--install-cabal VERSION` option which
-  will install a specific version of the Cabal library globally.
-* Updates to store-0.4.1, which has improved performance and better error
-  reporting for version tags.  A side-effect of this is that all of
-  stack's binary caches will be invalidated.
-* `stack solver` will now warn about unexpected `cabal-install` versions.
-  See [#3044](https://github.com/commercialhaskell/stack/issues/3044)
-* Upstream packages unpacked to a temp dir are now deleted as soon as
-  possible to avoid running out of space in `/tmp`.
-  See [#3018](https://github.com/commercialhaskell/stack/issues/3018)
-* Add short synonyms for `test-arguments` and `benchmark-arguments` options.
-* Adds `STACK_WORK` environment variable, to specify work dir.
-  See [#3063](https://github.com/commercialhaskell/stack/issues/3063)
-* Can now use relative paths for `extra-include-dirs` and `extra-lib-dirs`.
-  See [#2830](https://github.com/commercialhaskell/stack/issues/2830)
-* Improved bash completion for many options, including `--ghc-options`,
-  `--flag`, targets, and project executables for `exec`.
-* `--haddock-arguments` is actually used now when `haddock` is invoked
-  during documentation generation.
-* `--[no-]haddock-hyperlink-source` flag added which allows toggling
-  of sources being included in Haddock output.
-  See [#3099](https://github.com/commercialhaskell/stack/issues/3099)
-* `stack ghci` will now skip building all local targets, even if they have
-  downstream deps, as long as it's registered in the DB.
-* The `pvp-bounds` feature now supports adding `-revision` to the end of each
-  value, e.g. `pvp-bounds: both-revision`. This means that, when uploading to
-  Hackage, Stack will first upload your tarball with an unmodified Cabal file,
-  and then upload a Cabal file revision with the PVP bounds added. This can be
-  useful - especially combined with the
-  [Stackage no-revisions feature](http://www.snoyman.com/blog/2017/04/stackages-no-revisions-field) - as
-  a method to ensure PVP compliance without having to proactively fix bounds
-  issues for Stackage maintenance.
-* Expose a `save-hackage-creds` configuration option
-* On GHC <= 7.8, filters out spurious linker warnings on windows
-  See [#3127](https://github.com/commercialhaskell/stack/pull/3127)
-* Better error messages when creating or building packages which alias
-  wired-in packages. See
-  [#3172](https://github.com/commercialhaskell/stack/issues/3172).
-* MinGW bin folder now is searched for dynamic libraries. See
-  [#3126](https://github.com/commercialhaskell/stack/issues/3126)
-* When using Nix, nix-shell now depends always on git to prevent runtime errors
-  while fetching metadata
-* Experimental: The `stack unpack` command now accepts a form where an explicit
-  Hackage revision hash is specified, e.g.
-  `stack unpack foo-1.2.3@gitsha1:deadbeef`. Note that Stack will likely move
-  towards a different hash format in the future.
-* Binary "stack upgrade" will now warn if the installed executable is not
-  on the PATH or shadowed by another entry.
-* Allow running tests on tarball created by sdist and upload
-  [#717](https://github.com/commercialhaskell/stack/issues/717).
-
-Bug fixes:
-
-* Fixes case where `stack build --profile` might not cause executables /
-  tests / benchmarks to be rebuilt.
-  See [#2984](https://github.com/commercialhaskell/stack/issues/2984)
-* `stack ghci file.hs` now loads the file even if it isn't part of
-  your project.
-* `stack clean --full` now works when docker is enabled.
-  See [#2010](https://github.com/commercialhaskell/stack/issues/2010)
-* Fixes an issue where cyclic deps can cause benchmarks or tests to be run
-  before they are built.
-  See [#2153](https://github.com/commercialhaskell/stack/issues/2153)
-* Fixes `stack build --file-watch` in cases where a directory is removed
-  See [#1838](https://github.com/commercialhaskell/stack/issues/1838)
-* Fixes `stack dot` and `stack list-dependencies` to use info from the
-  package database for wired-in-packages (ghc, base, etc).
-  See [#3084](https://github.com/commercialhaskell/stack/issues/3084)
-* Fixes `stack --docker build` when user is part of libvirt/libvirtd
-  groups on Ubuntu Yakkety (16.10).
-  See [#3092](https://github.com/commercialhaskell/stack/issues/3092)
-* Switching a package between extra-dep and local package now forces
-  rebuild (previously it wouldn't if versions were the same).
-  See [#2147](https://github.com/commercialhaskell/stack/issues/2147)
-* `stack upload` no longer reveals your password when you type it on
-  MinTTY-based Windows shells, such as Cygwin and MSYS2.
-  See [#3142](https://github.com/commercialhaskell/stack/issues/3142)
-* `stack script`'s import parser will now properly parse files that
-  have Windows-style line endings (CRLF)
-
-
-## 1.4.0 - 2017-03-15
-
-Release notes:
-
-* Docker images:
-  [fpco/stack-full](https://hub.docker.com/r/fpco/stack-full/) and
-  [fpco/stack-run](https://hub.docker.com/r/fpco/stack-run/)
-  are no longer being built for LTS 8.0 and above.
-  [fpco/stack-build](https://hub.docker.com/r/fpco/stack-build/)
-  images continue to be built with a
-  [simplified process](https://github.com/commercialhaskell/stack/tree/master/etc/dockerfiles/stack-build).
-  [#624](https://github.com/commercialhaskell/stack/issues/624)
-
-Major changes:
-
-* A new command, `script`, has been added, intended to make the script
-  interpreter workflow more reliable, easier to use, and more
-  efficient. This command forces the user to provide a `--resolver`
-  value, ignores all config files for more reproducible results, and
-  optimizes the existing package check to make the common case of all
-  packages already being present much faster. This mode does require
-  that all packages be present in a snapshot, however.
-  [#2805](https://github.com/commercialhaskell/stack/issues/2805)
-
-Behavior changes:
-
-* The default package metadata backend has been changed from Git to
-  the 01-index.tar.gz file, from the hackage-security project. This is
-  intended to address some download speed issues from GitHub for
-  people in certain geographic regions. There is now full support for
-  checking out specific Cabal file revisions from downloaded tarballs
-  as well. If you manually specify a package index with only a Git
-  URL, Git will still be used. See
-  [#2780](https://github.com/commercialhaskell/stack/issues/2780)
-* When you provide the `--resolver` argument to the `stack unpack`
-  command, any packages passed in by name only will be looked up in
-  the given snapshot instead of taking the latest version. For
-  example, `stack --resolver lts-7.14 unpack mtl` will get version
-  2.2.1 of `mtl`, regardless of the latest version available in the
-  package indices. This will also force the same Cabal file revision
-  to be used as is specified in the snapshot.
-
-    Unpacking via a package identifier (e.g. `stack --resolver lts-7.14
-    unpack mtl-2.2.1`) will ignore any settings in the snapshot and take
-    the most recent revision.
-
-    For backwards compatibility with tools relying on the presence of a
-    `00-index.tar`, Stack will copy the `01-index.tar` file to
-    `00-index.tar`. Note, however, that these files are different; most
-    importantly, 00-index contains only the newest revisions of Cabal
-    files, while 01-index contains all versions. You may still need to
-    update your tooling.
-* Passing `--(no-)nix-*` options now no longer implies `--nix`, except for
-  `--nix-pure`, so that the user preference whether or not to use Nix is
-  honored even in the presence of options that change the Nix behavior.
-
-Other enhancements:
-
-* Internal cleanup: configuration types are now based much more on lenses
-* `stack build` and related commands now allow the user to disable debug symbol
-  stripping with new `--no-strip`, `--no-library-stripping`, and
-  `--no-executable-shipping` flags, closing
-  [#877](https://github.com/commercialhaskell/stack/issues/877). Also turned
-  error message for missing targets more readable
-  ([#2384](https://github.com/commercialhaskell/stack/issues/2384))
-* `stack haddock` now shows index.html paths when documentation is already up to
-  date. Resolved [#781](https://github.com/commercialhaskell/stack/issues/781)
-* Respects the `custom-setup` stanza introduced in Cabal 1.24. This supercedes
-  any `explicit-setup-deps` settings in your `stack.yaml` and trusts the
-  package's Cabal file to explicitly state all its dependencies.
-* If system package installation fails, `get-stack.sh` will fail as well. Also
-  shows warning suggesting to run `apt-get update` or similar, depending on the
-  OS.
-  ([#2898](https://github.com/commercialhaskell/stack/issues/2898))
-* When `stack ghci` is run with a config with no packages (e.g. global project),
-  it will now look for source files in the current work dir.
-  ([#2878](https://github.com/commercialhaskell/stack/issues/2878))
-* Bump to Hpack 0.17.0 to allow `custom-setup` and `!include "..."` in
-  `package.yaml`.
-* The script interpreter will now output error logging.  In particular,
-  this means it will output info about plan construction errors.
-  ([#2879](https://github.com/commercialhaskell/stack/issues/2879))
-* `stack ghci` now takes `--flag` and `--ghc-options` again (inadvertently
-  removed in 1.3.0).
-  ([#2986](https://github.com/commercialhaskell/stack/issues/2986))
-* `stack exec` now takes `--rts-options` which passes the given arguments inside
-  of `+RTS ... args .. -RTS` to the executable. This works around Stack itself
-  consuming the RTS flags on Windows.
-  ([#2640](https://github.com/commercialhaskell/stack/issues/2640))
-* Upgraded `http-client-tls` version, which now offers support for the
-  `socks5://` and `socks5h://` values in the `http_proxy` and `https_proxy`
-  environment variables.
-
-Bug fixes:
-
-* Bump to Hpack 0.16.0 to avoid character encoding issues when reading and
-  writing on non-UTF8 systems.
-* `stack ghci` will no longer ignore hsSourceDirs that contain `..`.
-  ([#2895](https://github.com/commercialhaskell/stack/issues/2895))
-* `stack list-dependencies --license` now works for wired-in-packages,
-  like base. ([#2871](https://github.com/commercialhaskell/stack/issues/2871))
-* `stack setup` now correctly indicates when it uses system ghc
-  ([#2963](https://github.com/commercialhaskell/stack/issues/2963))
-* Fix to `stack config set`, in 1.3.2 it always applied to
-  the global project.
-  ([#2709](https://github.com/commercialhaskell/stack/issues/2709))
-* Previously, Cabal files without exe or lib would fail on the "copy" step.
-  ([#2862](https://github.com/commercialhaskell/stack/issues/2862))
-* `stack upgrade --git` now works properly.  Workaround for affected
-  versions (>= 1.3.0) is to instead run `stack upgrade --git --source-only`.
-  ([#2977](https://github.com/commercialhaskell/stack/issues/2977))
-* Added support for GHC 8's slightly different warning format for
-  dumping warnings from logs.
-* Work around a bug in Cabal/GHC in which package IDs are not unique
-  for different source code, leading to Stack not always rebuilding
-  packages depending on local packages which have
-  changed. ([#2904](https://github.com/commercialhaskell/stack/issues/2904))
-
-## 1.3.2 - 2016-12-27
-
-Bug fixes:
-
-* `stack config set` can now be used without a compiler installed
-  [#2852](https://github.com/commercialhaskell/stack/issues/2852).
-* `get-stack.sh` now installs correct executable on ARM for generic Linux and
-  raspbian, closing
-  [#2856](https://github.com/commercialhaskell/stack/issues/2856).
-* Correct the testing of whether a package database exists by checking
-  for the `package.cache` file itself instead of the containing
-  directory.
-* Revert a change in the previous release which made it impossible to
-  set local extra-dep packages as targets. This was overkill; we
-  really only wanted to disable their test suites, which was already
-  handled by a later
-  patch. [#2849](https://github.com/commercialhaskell/stack/issues/2849)
-* `stack new` always treats templates as being UTF-8 encoding,
-  ignoring locale settings on a local machine. See
-  [Yesod mailing list discussion](https://groups.google.com/d/msg/yesodweb/ZyWLsJOtY0c/aejf9E7rCAAJ)
-
-## 1.3.0 - 2016-12-12
-
-Release notes:
-
-* For the _next_ Stack release after this one, we are planning changes to our
-  Linux releases, including dropping our Ubuntu, Debian, CentOS, and Fedora
-  package repositories and switching to statically-linked executables. See
-  [#2534](https://github.com/commercialhaskell/stack/issues/2534).
-  Note that upgrading without a package manager has gotten easier with new
-  binary upgrade support in `stack upgrade` (see the Major Changes section below
-  for more information). In addition, the get.haskellstack.org script no longer
-  installs from Ubuntu, Debian, CentOS, or Fedora package repositories. Instead
-  it places a generic executable in /usr/local/bin.
-
-Major changes:
-
-* Stack will now always use its own GHC installation, even when a suitable GHC
-  installation is available on the PATH. To get the old behaviour, use
-  the `--system-ghc` flag or run `stack config set system-ghc --global true`.
-  Docker- and Nix-enabled projects continue to use the GHC installations
-  in their environment by default.
-
-    NB: Scripts that previously used Stack in combination with a system GHC
-    installation should now include a `stack setup` line or use the
-    `--install-ghc` flag.
-    [#2221](https://github.com/commercialhaskell/stack/issues/2221)
-
-* `stack ghci` now defaults to skipping the build of target packages, because
-  support has been added for invoking "initial build steps", which create
-  autogen files and run preprocessors. The `--no-build` flag is now deprecated
-  because it should no longer be necessary. See
-  [#1364](https://github.com/commercialhaskell/stack/issues/1364)
-
-* Stack is now capable of doing binary upgrades instead of always recompiling a
-  new version from source. Running `stack upgrade` will now default to
-  downloading a Stack executable from the most recent release, if one is
-  available. See `stack upgrade --help` for more options.
-  [#1238](https://github.com/commercialhaskell/stack/issues/1238)
-
-Behavior changes:
-
-* Passing `--resolver X` with a Stack command which forces creation of a global
-  project config, will pass resolver X into the initial config.
-  See [#2579](https://github.com/commercialhaskell/stack/issues/2229).
-
-* Switch the "Run from outside project" messages to debug-level, to
-  avoid spamming users in the normal case of non-project usage
-
-* If a remote package is specified (such as a Git repo) without an explicit
-  `extra-dep` setting, a warning is given to the user to provide one
-  explicitly.
-
-Other enhancements:
-
-* `stack haddock` now supports `--haddock-internal`. See
-  [#2229](https://github.com/commercialhaskell/stack/issues/2229)
-* Add support for `system-ghc` and `install-ghc` subcommands to
-  `stack config set` command.
-* Add `ghc-build` option to override autodetected GHC build to use (e.g. gmp4,
-  tinfo6, nopie) on Linux.
-* `stack setup` detects systems where gcc enables PIE by default (such as Ubuntu
-  16.10 and Hardened Gentoo) and adjusts the GHC `configure` options
-  accordingly. [#2542](https://github.com/commercialhaskell/stack/issues/2542)
-* Upload to Hackage with HTTP digest instead of HTTP basic.
-* Make `stack list-dependencies` understand all of the `stack dot` options too.
-* Add the ability for `stack list-dependencies` to list dependency licenses by
-  passing the `--license` flag.
-* Dump logs that contain warnings for any local non-dependency packages
-  [#2545](https://github.com/commercialhaskell/stack/issues/2545)
-* Add the `dump-logs` config option and `--dump-logs` command line
-  option to get full build output on the
-  console. [#426](https://github.com/commercialhaskell/stack/issues/426)
-* Add the `--open` option to "stack hpc report" command, causing the report to
-  be opened in the browser.
-* The `stack config set` command now accepts a `--global` flag for suitable
-  subcommands which causes it to modify the global user configuration
-  (`~/.stack/config.yaml`) instead of the project configuration.
-  [#2675](https://github.com/commercialhaskell/stack/pull/2675)
-* Information on the latest available snapshots is now downloaded from S3
-  instead of stackage.org, increasing reliability in case of stackage.org
-  outages. [#2653](https://github.com/commercialhaskell/stack/pull/2653)
-* `stack dot` and `stack list-dependencies` now take targets and flags.
-  [#1919](https://github.com/commercialhaskell/stack/issues/1919)
-* Deprecate `stack setup --stack-setup-yaml` for `--setup-info-yaml` based
-  on discussion in
-  [#2647](https://github.com/commercialhaskell/stack/issues/2647).
-* The `--main-is` flag for GHCI now implies the TARGET, fixing
-  [#1845](https://github.com/commercialhaskell/stack/issues/1845).
-* `stack ghci` no longer takes all build options, as many weren't useful
-  [#2199](https://github.com/commercialhaskell/stack/issues/2199)
-* `--no-time-in-log` option, to make verbose logs more diffable
-  [#2727](https://github.com/commercialhaskell/stack/issues/2727)
-* `--color` option added to override auto-detection of ANSI support
-  [#2725](https://github.com/commercialhaskell/stack/issues/2725)
-* Missing extra-deps are now warned about, adding a degree of typo detection
-  [#1521](https://github.com/commercialhaskell/stack/issues/1521)
-* No longer warns about missing build-tools if they are on the PATH.
-  [#2235](https://github.com/commercialhaskell/stack/issues/2235)
-* Replace enclosed-exceptions with safe-exceptions.
-  [#2768](https://github.com/commercialhaskell/stack/issues/2768)
-* The install location for GHC and other programs can now be configured with the
-  `local-programs-path` option in `config.yaml`.
-  [#1644](https://github.com/commercialhaskell/stack/issues/1644)
-* Added option to add nix dependencies as nix GC roots
-* Proper pid 1 (init) process for `stack exec` with Docker
-* Dump build logs if they contain warnings.
-  [#2545](https://github.com/commercialhaskell/stack/issues/2545)
-* Docker: redirect stdout of `docker pull` to stderr so that
-  it will not interfere with output of other commands.
-* Nix & docker can be activated at the same time, in order to run Stack in a
-  nix-shell in a container, preferably from an image already containing the nix
-  dependencies in its /nix/store
-* Stack/nix: Dependencies can be added as nix GC roots, so they are not removed
-  when running `nix-collect-garbage`
-
-Bug fixes:
-
-* Fixed a gnarly bug where programs and package tarballs sometimes have
-  corrupted downloads. See
-  [#2657](https://github.com/commercialhaskell/stack/issues/2568).
-* Add proper support for non-ASCII characters in file paths for the `sdist`
-  command. See [#2549](https://github.com/commercialhaskell/stack/issues/2549)
-* Never treat `extra-dep` local packages as targets. This ensures
-  things like test suites are not run for these packages, and that
-  build output is not hidden due to their presence.
-* Fix a resource leak in `sinkProcessStderrStdout` which could affect
-  much of the codebase, in particular copying precompiled
-  packages. [#1979](https://github.com/commercialhaskell/stack/issues/1979)
-* Docker: ensure that interrupted extraction process does not cause corrupt file
-  when downloading a Docker-compatible Stack executable
-  [#2568](https://github.com/commercialhaskell/stack/issues/2568)
-* Fixed running `stack hpc report` on package targets.
-  [#2664](https://github.com/commercialhaskell/stack/issues/2664)
-* Fix a long-standing performance regression where Stack would parse the
-  `.dump-hi` files of the library components of local packages twice.
-  [#2658](https://github.com/commercialhaskell/stack/pull/2658)
-* Fixed a regression in "stack ghci --no-load", where it would prompt for a main
-  module to load. [#2603](https://github.com/commercialhaskell/stack/pull/2603)
-* Build Setup.hs files with the threaded RTS, mirroring the behavior of
-  `cabal-install` and enabling more complex build systems in those files.
-* Fixed a bug in passing along `--ghc-options` to ghcjs.  They were being
-  provided as `--ghc-options` to Cabal, when it needs to be `--ghcjs-options`.
-  [#2714](https://github.com/commercialhaskell/stack/issues/2714)
-* Launch Docker from the project root regardless of the working
-  directory Stack is invoked from. This means paths relative to the project root
-  (e.g. environment files) can be specified in `stack.yaml`'s docker `run-args`.
-* `stack setup --reinstall` now behaves as expected.
-  [#2554](https://github.com/commercialhaskell/stack/issues/2554)
-
-## 1.2.0 - 2016-09-16
-
-Release notes:
-
-* On many Un*x systems, Stack can now be installed with a simple
-  one-liner:
-
-        wget -qO- https://get.haskellstack.org/ | sh
-
-* The fix for
-  [#2175](https://github.com/commercialhaskell/stack/issues/2175)
-  entails that Stack must perform a full clone of a large Git repo of
-  Hackage meta-information. The total download size is about 200 MB.
-  Please be aware of this when upgrading your Stack installation.
-
-* If you use Mac OS X, you may want to delay upgrading to macOS Sierra as there
-  are reports of GHC panics when building some packages (including Stack
-  itself). See [#2577](https://github.com/commercialhaskell/stack/issues/2577)
-
-* This version of Stack does not build on ARM or PowerPC systems (see
-  [store#37](https://github.com/fpco/store/issues/37)).  Please stay with
-  version 1.1.2 for now on those architectures.  This will be rectified soon!
-
-* We are now releasing a statically-linked Stack executable for
-  [64-bit Linux](https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz).
-  Please try it and let us know if you run into any trouble on your platform.
-  The executable is linked against a version of the GNU Multiple Precision
-  Arithmetic Library (GMP), which is licensed under the GNU Lesser General
-  Public License, Version 3, 29 June 2007 (LGPL).
-
-* We are planning some changes to our Linux releases, including dropping our
-  Ubuntu, Debian, CentOS, and Fedora package repositories and switching to
-  statically-linked executables. We would value your feedback in
-  [#2534](https://github.com/commercialhaskell/stack/issues/2534).
-
-Major changes:
-
-* Add `stack hoogle` command.
-  [#55](https://github.com/commercialhaskell/stack/issues/55)
-* Support for absolute file path in `url` key of `setup-info` or `--ghc-bindist`
-* Add support for rendering GHCi scripts targeting different GHCi like
-  applications
-  [#2457](https://github.com/commercialhaskell/stack/pull/2457)
-
-Behavior changes:
-
-* Remove `stack ide start` and `stack ide load-targets` commands.
-  [#2178](https://github.com/commercialhaskell/stack/issues/2178)
-* Support .buildinfo files in `stack ghci`.
-  [#2242](https://github.com/commercialhaskell/stack/pull/2242)
-* Support -ferror-spans syntax in GHC error messages.
-* Avoid unpacking ghc to `/tmp`
-  [#996](https://github.com/commercialhaskell/stack/issues/996)
-* The Linux `gmp4` GHC binary distribution is no longer considered a
-  full-fledged GHC variant and can no longer be specified using the
-  `ghc-variant` option, and instead is treated more like a slightly different
-  platform.
-
-Other enhancements:
-
-* Use the `store` package for binary serialization of most caches.
-* Only require minor version match for Docker Stack exe.
-  This way, we can make patch releases for version bounds and similar
-  build issues without needing to upload new binaries for Docker.
-* Stack/Nix: Passes the right ghc derivation as an argument to the `shell.nix`
-  when a custom `shell.nix` is used. See
-  [#2243](https://github.com/commercialhaskell/stack/issues/2243)
-* Stack/Nix: Sets `LD_LIBRARY_PATH` so packages using C libs for Template
-  Haskell can work (See _e.g._
-  [this HaskellR issue](https://github.com/tweag/HaskellR/issues/253))
-* Parse CLI arguments and configuration files into less permissive types,
-  improving error messages for bad inputs.
-  [#2267](https://github.com/commercialhaskell/stack/issues/2267)
-* Add the ability to explicitly specify a gcc executable.
-  [#593](https://github.com/commercialhaskell/stack/issues/593)
-* Nix: No longer uses LTS mirroring in nixpkgs. Gives to nix-shell a derivation
-  like `haskell.compiler.ghc801`
-  See [#2259](https://github.com/commercialhaskell/stack/issues/2259)
-* Perform some subprocesses during setup concurrently, slightly speeding up most
-  commands. [#2346](https://github.com/commercialhaskell/stack/pull/2346)
-* `stack setup` no longer unpacks to the system temp dir on posix systems.
-  [#996](https://github.com/commercialhaskell/stack/issues/996)
-* `stack setup` detects libtinfo6 and ncurses6 and can download alternate GHC
-  binary distributions
-  [#257](https://github.com/commercialhaskell/stack/issues/257)
-  [#2302](https://github.com/commercialhaskell/stack/issues/2302).
-* `stack setup` detects Linux ARMv7 downloads appropriate GHC binary
-  distribution
-  [#2103](https://github.com/commercialhaskell/stack/issues/2103)
-* Custom `stack` binaries list dependency versions in output for `--version`.
-  See [#2222](https://github.com/commercialhaskell/stack/issues/2222)
-  and [#2450](https://github.com/commercialhaskell/stack/issues/2450).
-* Use a pretty printer to output dependency resolution errors.
-  [#1912](https://github.com/commercialhaskell/stack/issues/1912)
-* Remove the `--os` flag
-  [#2227](https://github.com/commercialhaskell/stack/issues/2227)
-* Add 'netbase' and 'ca-certificates' as dependency for .deb packages.
-  [#2293](https://github.com/commercialhaskell/stack/issues/2293).
-* Add `stack ide targets` command.
-* Enhance debug logging with subprocess timings.
-* Pretty-print YAML parse errors
-  [#2374](https://github.com/commercialhaskell/stack/issues/2374)
-* Clarify confusing `stack setup` output
-  [#2314](https://github.com/commercialhaskell/stack/issues/2314)
-* Delete `Stack.Types` multimodule to improve build times
-  [#2405](https://github.com/commercialhaskell/stack/issues/2405)
-* Remove spurious newlines in build logs
-  [#2418](https://github.com/commercialhaskell/stack/issues/2418)
-* Interpreter: Provide a way to hide implicit packages
-  [#1208](https://github.com/commercialhaskell/stack/issues/1208)
-* Check executability in exec lookup
-  [#2489](https://github.com/commercialhaskell/stack/issues/2489)
-
-Bug fixes:
-
-* Fix Cabal warning about use of a deprecated Cabal flag
-  [#2350](https://github.com/commercialhaskell/stack/issues/2350)
-* Support most executable extensions on Windows
-  [#2225](https://github.com/commercialhaskell/stack/issues/2225)
-* Detect resolver change in `stack solver`
-  [#2252](https://github.com/commercialhaskell/stack/issues/2252)
-* Fix a bug in docker image creation where the wrong base image was
-  selected
-  [#2376](https://github.com/commercialhaskell/stack/issues/2376)
-* Ignore special entries when unpacking tarballs
-  [#2361](https://github.com/commercialhaskell/stack/issues/2361)
-* Fixes src directory pollution of `style.css` and `highlight.js` with GHC 8's
-  haddock [#2429](https://github.com/commercialhaskell/stack/issues/2429)
-* Handle filepaths with spaces in `stack ghci`
-  [#2266](https://github.com/commercialhaskell/stack/issues/2266)
-* Apply ghc-options to snapshot packages
-  [#2289](https://github.com/commercialhaskell/stack/issues/2289)
-* `stack sdist`: Fix timestamp in tarball
-  [#2394](https://github.com/commercialhaskell/stack/pull/2394)
-* Allow global Stack arguments with a script
-  [#2316](https://github.com/commercialhaskell/stack/issues/2316)
-* Inconsistency between ToJSON and FromJSON instances of PackageLocation
-  [#2412](https://github.com/commercialhaskell/stack/pull/2412)
-* Perform Unicode normalization on filepaths
-  [#1810](https://github.com/commercialhaskell/stack/issues/1810)
-* Solver: always keep ghc wired-in as hard constraints
-  [#2453](https://github.com/commercialhaskell/stack/issues/2453)
-* Support OpenBSD's tar where possible, require GNU tar for xz support
-  [#2283](https://github.com/commercialhaskell/stack/issues/2283)
-* Fix using --coverage with Cabal-1.24
-  [#2424](https://github.com/commercialhaskell/stack/issues/2424)
-* When marking exe installed, remove old version
-  [#2373](https://github.com/commercialhaskell/stack/issues/2373)
-* Stop truncating `all-cabal-hashes` git repo
-  [#2175](https://github.com/commercialhaskell/stack/issues/2175)
-* Handle non-ASCII filenames on Windows
-  [#2491](https://github.com/commercialhaskell/stack/issues/2491)
-* Avoid using multiple versions of a package in script interpreter
-  by passing package-id to ghc/runghc
-  [#1957](https://github.com/commercialhaskell/stack/issues/1957)
-* Only pre-load compiler version when using nix integration
-  [#2459](https://github.com/commercialhaskell/stack/issues/2459)
-* Solver: parse Cabal errors also on Windows
-  [#2502](https://github.com/commercialhaskell/stack/issues/2502)
-* Allow exec and ghci commands in interpreter mode.
-  Scripts can now automatically open in the repl by using `exec ghci`
-  instead of `runghc` in the shebang command.
-  [#2510](https://github.com/commercialhaskell/stack/issues/2510)
-* Now consider a package to be dirty when an extra-source-file is changed.
-  See [#2040](https://github.com/commercialhaskell/stack/issues/2040)
-
-## 1.1.2 - 2016-05-20
-
-Release notes:
-
-* Official FreeBSD binaries are
-  [now available](http://docs.haskellstack.org/en/stable/install_and_upgrade/#freebsd)
-  [#1253](https://github.com/commercialhaskell/stack/issues/1253).
-
-Major changes:
-
-* Extensible custom snapshots implemented. These allow you to define snapshots
-which extend other snapshots. See
-[#863](https://github.com/commercialhaskell/stack/issues/863). Local file custom
-snapshots can now be safely updated without changing their name.  Remote custom
-snapshots should still be treated as immutable.
-
-Behavior changes:
-
-* `stack path --compiler` was added in the last release, to yield a path to the
-  compiler. Unfortunately, `--compiler` is a global option that is useful to use
-  with `stack path`. The same functionality is now provided by `stack path
-  --compiler-exe`. See
-  [#2123](https://github.com/commercialhaskell/stack/issues/2123)
-* For packages specified in terms of a git or hg repo, the hash used in the
-  location has changed.  This means that existing downloads from older stack
-  versions won't be used.  This is a side-effect of the fix to
-  [#2133](https://github.com/commercialhaskell/stack/issues/2133)
-* `stack upgrade` no longer pays attention to local `stack.yaml` files, just the
-  global config and CLI options.
-  [#1392](https://github.com/commercialhaskell/stack/issues/1392)
-* `stack ghci` now uses `:add` instead of `:load`, making it potentially work
-  better with user scripts. See
-  [#1888](https://github.com/commercialhaskell/stack/issues/1888)
-
-Other enhancements:
-
-* Grab Cabal files via Git SHA to avoid regressions from Hackage revisions
-  [#2070](https://github.com/commercialhaskell/stack/pull/2070)
-* Custom snapshots now support `ghc-options`.
-* Package git repos are now re-used rather than re-cloned. See
-  [#1620](https://github.com/commercialhaskell/stack/issues/1620)
-* `DESTDIR` is filtered from environment when installing GHC. See
-  [#1460](https://github.com/commercialhaskell/stack/issues/1460)
-* `stack haddock` now supports `--haddock-arguments`. See
-  [#2144](https://github.com/commercialhaskell/stack/issues/2144)
-* Signing: warn if GPG_TTY is not set as per `man gpg-agent`
-
-Bug fixes:
-
-* Now ignore project config when doing `stack init` or `stack new`. See
-  [#2110](https://github.com/commercialhaskell/stack/issues/2110)
-* Packages specified by git repo can now have submodules. See
-  [#2133](https://github.com/commercialhaskell/stack/issues/2133)
-* Fix of hackage index fetch retry. See re-opening of
-  [#1418](https://github.com/commercialhaskell/stack/issues/1418#issuecomment-217633843)
-* HPack now picks up changes to filesystem other than package.yaml.  See
-  [#2051](https://github.com/commercialhaskell/stack/issues/2051)
-* "stack solver" no longer suggests --omit-packages. See
-  [#2031](https://github.com/commercialhaskell/stack/issues/2031)
-* Fixed an issue with building Cabal's Setup.hs. See
-  [#1356](https://github.com/commercialhaskell/stack/issues/1356)
-* Package dirtiness now pays attention to deleted files. See
-  [#1841](https://github.com/commercialhaskell/stack/issues/1841)
-* `stack ghci` now uses `extra-lib-dirs` and `extra-include-dirs`. See
-  [#1656](https://github.com/commercialhaskell/stack/issues/1656)
-* Relative paths outside of source dir added via `qAddDependentFile` are now
-  checked for dirtiness. See
-  [#1982](https://github.com/commercialhaskell/stack/issues/1982)
-* Signing: always use `--with-fingerprints`
-
-## 1.1.0 - 2016-05-04
-
-Release notes:
-
-* Added Ubuntu 16.04 LTS (xenial) Apt repo.
-* No longer uploading new versions to Fedora 21 repo.
-
-Behavior changes:
-
-* Snapshot packages are no longer built with executable profiling. See
-  [#1179](https://github.com/commercialhaskell/stack/issues/1179).
-* `stack init` now ignores symlinks when searching for Cabal files. It also now
-  ignores any directory that begins with `.` (as well as `dist` dirs) - before
-  it would only ignore `.git`, `.stack-work`, and `dist`.
-* The Stack executable is no longer built with `-rtsopts`.  Before, when
-  `-rtsopts` was enabled, Stack would process `+RTS` options even when intended
-  for some other program, such as when used with `stack exec -- prog +RTS`.
-  See [#2022](https://github.com/commercialhaskell/stack/issues/2022).
-* The `stack path --ghc-paths` option is deprecated and renamed to `--programs`.
-  `--compiler` is added, which points directly at the compiler used in
-  the current project.  `--compiler-bin` points to the compiler's bin dir.
-* For consistency with the `$STACK_ROOT` environment variable, the
-  `stack path --global-stack-root` flag and the `global-stack-root` field
-  in the output of `stack path` are being deprecated and replaced with the
-  `stack-root` flag and output field.
-  Additionally, the Stack root can now be specified via the
-  `--stack-root` command-line flag. See
-  [#1148](https://github.com/commercialhaskell/stack/issues/1148).
-* `stack sig` GPG-related sub-commands were removed (folded into `upload` and
-  `sdist`)
-* GPG signing of packages while uploading to Hackage is now the default. Use
-  `upload --no-signature` if you would rather not contribute your package
-  signature. If you don't yet have a GPG keyset, read this
-  [blog post on GPG keys](https://fpcomplete.com/blog/2016/05/stack-security-gnupg-keys).
-  We can add a `stack.yaml` config setting to disable signing if some people
-  desire it. We hope that people will sign. Later we will be adding GPG
-  signature verification options.
-* `stack build pkg-1.2.3` will now build even if the snapshot has a different
-  package version - it is treated as an extra-dep. `stack build local-pkg-1.2.3`
-  is an error even if the version number matches the local package
-  [#2028](https://github.com/commercialhaskell/stack/issues/2028).
-* A `nix` key in a Stack YAML configuration file no longer implies enabling a
-  Nix build. This allows the user to globally configure whether Nix is used
-  (unless the project overrides the default explicitly). See
-  [#1924](https://github.com/commercialhaskell/stack/issues/1924).
-* Remove deprecated `valid-wanted` key.
-* Docker: mount home directory in container
-  [#1949](https://github.com/commercialhaskell/stack/issues/1949).
-* Deprecate `stack path --local-bin-path`; instead use `--local-bin`.
-* `stack image`: allow absolute source paths for `add`.
-
-Other enhancements:
-
-* `stack haddock --open [PACKAGE]` opens the local haddocks in the browser.
-* Fix too much rebuilding when enabling/disabling profiling flags.
-* `stack build pkg-1.0` will now build `pkg-1.0` even if the snapshot specifies
-  a different version (it introduces a temporary extra-dep)
-* Experimental: Support for `--split-objs` added
-  [#1284](https://github.com/commercialhaskell/stack/issues/1284).
-* `git` packages with submodules are supported by passing the `--recursive`
-  flag to `git clone`.
-* When using [Hpack](https://github.com/sol/hpack), only regenerate Cabal files
-  when Hpack files change.
-* Hpack files can now be used in templates
-* `stack ghci` now runs ghci as a separate process
-  [#1306](https://github.com/commercialhaskell/stack/issues/1306)
-* Retry when downloading snapshots and package indices
-* Many build options are configurable now in `stack.yaml`:
-
-  ~~~yaml
-  build:
-    library-profiling: true
-    executable-profiling: true
-    haddock: true
-    haddock-deps: true
-    copy-bins: true
-    prefetch: true
-    force-dirty: true
-    keep-going: true
-    test: true
-    test-arguments:
-      rerun-tests: true
-      additional-args: ['-fprof']
-      coverage: true
-      no-run-tests: true
-    bench: true
-    benchmark-opts:
-      benchmark-arguments: -O2
-      no-run-benchmarks: true
-    reconfigure: true
-    cabal-verbose: true
-  ~~~
-
-* A number of URLs are now configurable, useful for firewalls. See
-  [#1794](https://github.com/commercialhaskell/stack/issues/1884).
-* Suggest causes when executables are missing.
-* Allow `--omit-packages` even without `--solver`.
-* Improve the generated `stack.yaml`.
-* Improve ghci results after :load Main module collision with main file path.
-* Only load the hackage index if necessary
-  [#1883](https://github.com/commercialhaskell/stack/issues/1883),
-  [#1892](https://github.com/commercialhaskell/stack/issues/1892).
-* init: allow local packages to be deps of deps
-  [#1965](https://github.com/commercialhaskell/stack/issues/1965).
-* Always use full fingerprints from GPG
-  [#1952](https://github.com/commercialhaskell/stack/issues/1952).
-* Default to using `gpg2` and fall back to `gpg`
-  [#1976](https://github.com/commercialhaskell/stack/issues/1976).
-* Add a flag for --verbosity silent.
-* Add `haddock --open` flag
-  [#1396](https://github.com/commercialhaskell/stack/issues/1396).
-
-Bug fixes:
-
-* Package tarballs would fail to unpack.
-  [#1884](https://github.com/commercialhaskell/stack/issues/1884).
-* Fixed errant warnings about missing modules, after deleted and removed from
-  Cabal file [#921](https://github.com/commercialhaskell/stack/issues/921)
-  [#1805](https://github.com/commercialhaskell/stack/issues/1805).
-* Now considers a package to dirty when the Hpack file is changed
-  [#1819](https://github.com/commercialhaskell/stack/issues/1819).
-* Nix: cancelling a Stack build now exits properly rather than dropping into a
-  nix-shell [#1778](https://github.com/commercialhaskell/stack/issues/1778).
-* `allow-newer: true` now causes `--exact-configuration` to be passed to Cabal.
-  See [#1579](https://github.com/commercialhaskell/stack/issues/1579).
-* `stack solver` no longer fails with `InvalidRelFile` for relative package
-  paths including `..`. See
-  [#1954](https://github.com/commercialhaskell/stack/issues/1954).
-* Ignore emacs lock files when finding Cabal files
-  [#1897](https://github.com/commercialhaskell/stack/issues/1897).
-* Use lenient UTF-8 decode for build output
-  [#1945](https://github.com/commercialhaskell/stack/issues/1945).
-* Clear index cache whenever index updated
-  [#1962](https://github.com/commercialhaskell/stack/issues/1962).
-* Fix: Building a container image drops a .stack-work dir in the current working
-  (sub)directory
-  [#1975](https://github.com/commercialhaskell/stack/issues/1975).
-* Fix: Rebuilding when disabling profiling
-  [#2023](https://github.com/commercialhaskell/stack/issues/2023).
-
-## 1.0.4.3 - 2016-04-07
-
-Bug fixes:
-
-* Don't delete contents of ~/.ssh when using `stack clean --full` with Docker
-  enabled [#2000](https://github.com/commercialhaskell/stack/issues/2000)
-
-## 1.0.4.2 - 2016-03-09
-
-Build with `path-io-1.0.0`. There are no changes in behaviour from 1.0.4, so no
-binaries are released for this version.
-
-## 1.0.4.1 - 2016-02-21
-
-Fixes build with `aeson-0.11.0.0`. There are no changes in behaviour from 1.0.4,
-so no binaries are released for this version.
-
-## 1.0.4 - 2016-02-20
-
-Major changes:
-
-* Some notable changes in `stack init`:
-    * Overall it should now be able to initialize almost all existing Cabal
-      packages out of the box as long as the package itself is consistently
-      defined.
-    * Choose the best possible snapshot and add extra-deps on top
-      of a snapshot other than a compiler snapshot -
-      [#1583](https://github.com/commercialhaskell/stack/pull/1583)
-    * Automatically omit a package (`--omit-packages`) when it is compiler
-      incompatible or when there are packages with conflicting dependency
-      requirements. See
-      [#1674](https://github.com/commercialhaskell/stack/pull/1674).
-    * Some more changes for a better user experience. Please refer to
-      the doc guide for details.
-* Add support for Hpack, alternative package description format
-  [#1679](https://github.com/commercialhaskell/stack/issues/1679)
-
-Other enhancements:
-
-* Docker: pass ~/.ssh and SSH auth socket into container, so that git repos
-  work [#1358](https://github.com/commercialhaskell/stack/issues/1358).
-* Docker: strip suffix from docker --version.
-  [#1653](https://github.com/commercialhaskell/stack/issues/1653)
-* Docker: pass USER and PWD environment variables into container.
-* On each run, Stack will test the Stack root directory (~/.stack), and the
-  project and package work directories (.stack-work) for whether they are
-  owned by the current user and abort if they are not. This precaution can
-  be disabled with the `--allow-different-user` flag or `allow-different-user`
-  option in the global config (~/.stack/config.yaml).
-  [#471](https://github.com/commercialhaskell/stack/issues/471)
-* Added `stack clean --full` option for full working dir cleanup.
-* YAML config: support Zip archives.
-* Redownload build plan if parsing fails
-  [#1702](https://github.com/commercialhaskell/stack/issues/1702).
-* Give mustache templates access to a 'year' tag
-  [#1716](https://github.com/commercialhaskell/stack/pull/1716).
-* Have "stack ghci" warn about module name aliasing.
-* Add "stack ghci --load-local-deps".
-* Build Setup.hs with -rtsopts
-  [#1687](https://github.com/commercialhaskell/stack/issues/1687).
-* `stack init` accepts a list of directories.
-* Add flag infos to DependencyPlanFailures (for better error output in case of
-  flags) [#713](https://github.com/commercialhaskell/stack/issues/713)
-* `stack new --bare` complains for overwrites, and add `--force` option
-  [#1597](https://github.com/commercialhaskell/stack/issues/1597).
-
-Bug fixes:
-
-* Previously, `stack ghci` would fail with `cannot satisfy -package-id` when the
-  implicit build step changes the package key of some dependency.
-* Fix: Building with ghcjs: "ghc-pkg: Prelude.chr: bad argument: 2980338"
-  [#1665](https://github.com/commercialhaskell/stack/issues/1665).
-* Fix running test / bench with `--profile` / `--trace`.
-* Fix: build progress counter is no longer visible
-  [#1685](https://github.com/commercialhaskell/stack/issues/1685).
-* Use "-RTS" w/ profiling to allow extra args
-  [#1772](https://github.com/commercialhaskell/stack/issues/1772).
-* Fix withUnpackedTarball7z to find name of srcDir after unpacking
-  (fixes `stack setup` fails for ghcjs project on windows)
-  [#1774](https://github.com/commercialhaskell/stack/issues/1774).
-* Add space before auto-generated bench opts (makes profiling options work
-  uniformly for applications and benchmark suites)
-  [#1771](https://github.com/commercialhaskell/stack/issues/1771).
-* Don't try to find plugin if it resembles flag.
-* Setup.hs changes cause package dirtiness
-  [#1711](https://github.com/commercialhaskell/stack/issues/1711).
-* Send "stack templates" output to stdout
-  [#1792](https://github.com/commercialhaskell/stack/issues/1792).
-
-## 1.0.2 - 2016-01-18
-
-Release notes:
-
-- Arch Linux: Stack has been adopted into the
-  [official community repository](https://www.archlinux.org/packages/community/x86_64/stack/),
-  so we will no longer be updating the AUR with new versions. See the
-  [install/upgrade guide](http://docs.haskellstack.org/en/stable/install_and_upgrade/#arch-linux)
-  for current download instructions.
-
-Major changes:
-
-- `stack init` and `solver` overhaul
-  [#1583](https://github.com/commercialhaskell/stack/pull/1583)
-
-Other enhancements:
-
-- Disable locale/codepage hacks when GHC >=7.10.3
-  [#1552](https://github.com/commercialhaskell/stack/issues/1552)
-- Specify multiple images to build for `stack image container`
-  [docs](http://docs.haskellstack.org/en/stable/yaml_configuration/#image)
-- Specify which executables to include in images for `stack image container`
-  [docs](http://docs.haskellstack.org/en/stable/yaml_configuration/#image)
-- Docker: pass supplementary groups and umask into container
-- If git fetch fails wipe the directory and try again from scratch
-  [#1418](https://github.com/commercialhaskell/stack/issues/1418)
-- Warn if newly installed executables won't be available on the PATH
-  [#1362](https://github.com/commercialhaskell/stack/issues/1362)
-- `stack.yaml`: for `stack image container`, specify multiple images to
-  generate, and which executables should be added to those images
-- GHCI: add interactive Main selection
-  [#1068](https://github.com/commercialhaskell/stack/issues/1068)
-- Care less about the particular name of a GHCJS sdist folder
-  [#1622](https://github.com/commercialhaskell/stack/issues/1622)
-- Unified Enable/disable help messaging
-  [#1613](https://github.com/commercialhaskell/stack/issues/1613)
-
-Bug fixes:
-
-- Don't share precompiled packages between GHC/platform variants and Docker
-  [#1551](https://github.com/commercialhaskell/stack/issues/1551)
-- Properly redownload corrupted downloads with the correct file size.
-  [Mailing list discussion](https://groups.google.com/d/msg/haskell-stack/iVGDG5OHYxs/FjUrR5JsDQAJ)
-- Gracefully handle invalid paths in error/warning messages
-  [#1561](https://github.com/commercialhaskell/stack/issues/1561)
-- Nix: select the correct GHC version corresponding to the snapshot
-  even when an abstract resolver is passed via `--resolver` on the
-  command-line.
-  [#1641](https://github.com/commercialhaskell/stack/issues/1641)
-- Fix: Stack does not allow using an external package from ghci
-  [#1557](https://github.com/commercialhaskell/stack/issues/1557)
-- Disable ambiguous global '--resolver' option for 'stack init'
-  [#1531](https://github.com/commercialhaskell/stack/issues/1531)
-- Obey `--no-nix` flag
-- Fix: GHCJS Execute.hs: Non-exhaustive patterns in lambda
-  [#1591](https://github.com/commercialhaskell/stack/issues/1591)
-- Send file-watch and sticky logger messages to stderr
-  [#1302](https://github.com/commercialhaskell/stack/issues/1302)
-  [#1635](https://github.com/commercialhaskell/stack/issues/1635)
-- Use globaldb path for querying Cabal version
-  [#1647](https://github.com/commercialhaskell/stack/issues/1647)
-
-## 1.0.0 - 2015-12-24
-
-Release notes:
-
-*  We're calling this version 1.0.0 in preparation for Stackage
-   LTS 4.  Note, however, that this does not mean the code's API
-   will be stable as this is primarily an end-user tool.
-
-Enhancements:
-
-* Added flag `--profile` flag: passed with `stack build`, it will
-  enable profiling, and for `--bench` and `--test` it will generate a
-  profiling report by passing `+RTS -p` to the executable(s). Great
-  for using like `stack build --bench --profile` (remember that
-  enabling profile will slow down your benchmarks by >4x). Run `stack
-  build --bench` again to disable the profiling and get proper speeds
-* Added flag `--trace` flag: just like `--profile`, it enables
-  profiling, but instead of generating a report for `--bench` and
-  `--test`, prints out a stack trace on exception. Great for using
-  like `stack build --test --trace`
-* Nix: all options can be overridden on command line
-  [#1483](https://github.com/commercialhaskell/stack/issues/1483)
-* Nix: build environments (shells) are now pure by default.
-* Make verbosity silent by default in script interpreter mode
-  [#1472](https://github.com/commercialhaskell/stack/issues/1472)
-* Show a message when resetting git commit fails
-  [#1453](https://github.com/commercialhaskell/stack/issues/1453)
-* Improve Unicode handling in project/package names
-  [#1337](https://github.com/commercialhaskell/stack/issues/1337)
-* Fix ambiguity between a Stack command and a filename to execute (prefer
-  `stack` subcommands)
-  [#1471](https://github.com/commercialhaskell/stack/issues/1471)
-* Support multi line interpreter directive comments
-  [#1394](https://github.com/commercialhaskell/stack/issues/1394)
-* Handle space separated pids in ghc-pkg dump (for GHC HEAD)
-  [#1509](https://github.com/commercialhaskell/stack/issues/1509)
-* Add ghci --no-package-hiding option
-  [#1517](https://github.com/commercialhaskell/stack/issues/1517)
-* `stack new` can download templates from URL
-  [#1466](https://github.com/commercialhaskell/stack/issues/1466)
-
-Bug fixes:
-
-* Nix: `stack exec` options are passed properly to the Stack sub process
-  [#1538](https://github.com/commercialhaskell/stack/issues/1538)
-* Nix: specifying a shell-file works in any current working directory
-  [#1547](https://github.com/commercialhaskell/stack/issues/1547)
-* Nix: use `--resolver` argument
-* Docker: fix missing image message and '--docker-auto-pull'
-* No HTML escaping for "stack new" template params
-  [#1475](https://github.com/commercialhaskell/stack/issues/1475)
-* Set permissions for generated .ghci script
-  [#1480](https://github.com/commercialhaskell/stack/issues/1480)
-* Restrict commands allowed in interpreter mode
-  [#1504](https://github.com/commercialhaskell/stack/issues/1504)
-* `stack ghci` doesn't see preprocessed files for executables
-  [#1347](https://github.com/commercialhaskell/stack/issues/1347)
-* All test suites run even when only one is requested
-  [#1550](https://github.com/commercialhaskell/stack/pull/1550)
-* Edge cases in broken templates give odd errors
-  [#1535](https://github.com/commercialhaskell/stack/issues/1535)
-* Fix test coverage bug on windows
-
-## 0.1.10.1 - 2015-12-13
-
-Bug fixes:
-
-* `stack image container` did not actually build an image
-  [#1473](https://github.com/commercialhaskell/stack/issues/1473)
-
-## 0.1.10.0 - 2015-12-04
-
-Release notes:
-
-* The Stack home page is now at [haskellstack.org](http://haskellstack.org),
-  which shows the documentation rendered by readthedocs.org. Note: this
-  has necessitated some changes to the links in the documentation's markdown
-  source code, so please check the links on the website before submitting a PR
-  to fix them.
-* The locations of the
-  [Ubuntu](http://docs.haskellstack.org/en/stable/install_and_upgrade/#ubuntu)
-  and
-  [Debian](http://docs.haskellstack.org/en/stable/install_and_upgrade/#debian)
-  package repositories have changed to have correct URL semantics according to
-  Debian's guidelines
-  [#1378](https://github.com/commercialhaskell/stack/issues/1378). The old
-  locations will continue to work for some months, but we suggest that you
-  adjust your `/etc/apt/sources.list.d/fpco.list` to the new location to avoid
-  future disruption.
-* [openSUSE and SUSE Linux Enterprise](http://docs.haskellstack.org/en/stable/install_and_upgrade/#suse)
-  packages are now available, thanks to [@mimi1vx](https://github.com/mimi1vx).
-  Note: there will be some lag before these pick up new versions, as they are
-  based on Stackage LTS.
-
-Major changes:
-
-* Support for building inside a Nix-shell providing system dependencies
-  [#1285](https://github.com/commercialhaskell/stack/pull/1285)
-* Add optional GPG signing on `stack upload --sign` or with
-  `stack sig sign ...`
-
-Other enhancements:
-
-* Print latest applicable version of packages on conflicts
-  [#508](https://github.com/commercialhaskell/stack/issues/508)
-* Support for packages located in Mercurial repositories
-  [#1397](https://github.com/commercialhaskell/stack/issues/1397)
-* Only run benchmarks specified as build targets
-  [#1412](https://github.com/commercialhaskell/stack/issues/1412)
-* Support git-style executable fall-through (`stack something` executes
-  `stack-something` if present)
-  [#1433](https://github.com/commercialhaskell/stack/issues/1433)
-* GHCi now loads intermediate dependencies
-  [#584](https://github.com/commercialhaskell/stack/issues/584)
-* `--work-dir` option for overriding `.stack-work`
-  [#1178](https://github.com/commercialhaskell/stack/issues/1178)
-* Support `detailed-0.9` tests
-  [#1429](https://github.com/commercialhaskell/stack/issues/1429)
-* Docker: improved POSIX signal proxying to containers
-  [#547](https://github.com/commercialhaskell/stack/issues/547)
-
-Bug fixes:
-
-* Show absolute paths in error messages in multi-package builds
-  [#1348](https://github.com/commercialhaskell/stack/issues/1348)
-* Docker-built binaries and libraries in different path
-  [#911](https://github.com/commercialhaskell/stack/issues/911)
-  [#1367](https://github.com/commercialhaskell/stack/issues/1367)
-* Docker: `--resolver` argument didn't effect selected image tag
-* GHCi: Spaces in filepaths caused module loading issues
-  [#1401](https://github.com/commercialhaskell/stack/issues/1401)
-* GHCi: cpp-options in Cabal files weren't used
-  [#1419](https://github.com/commercialhaskell/stack/issues/1419)
-* Benchmarks couldn't be run independently of each other
-  [#1412](https://github.com/commercialhaskell/stack/issues/1412)
-* Send output of building setup to stderr
-  [#1410](https://github.com/commercialhaskell/stack/issues/1410)
-
-## 0.1.8.0 - 2015-11-20
-
-Major changes:
-
-* GHCJS can now be used with stackage snapshots via the new `compiler` key.
-* Windows installers are now available:
-  [download them here](http://docs.haskellstack.org/en/stable/install_and_upgrade/#windows)
-  [#613](https://github.com/commercialhaskell/stack/issues/613)
-* Docker integration works with non-FPComplete generated images
-  [#531](https://github.com/commercialhaskell/stack/issues/531)
-
-Other enhancements:
-
-* Added an `allow-newer` config option
-  [#922](https://github.com/commercialhaskell/stack/issues/922)
-  [#770](https://github.com/commercialhaskell/stack/issues/770)
-* When a Hackage revision invalidates a build plan in a snapshot, trust the
-  snapshot [#770](https://github.com/commercialhaskell/stack/issues/770)
-* Added a `stack config set resolver RESOLVER` command. Part of work on
-  [#115](https://github.com/commercialhaskell/stack/issues/115)
-* `stack setup` can now install GHCJS on windows. See
-  [#1145](https://github.com/commercialhaskell/stack/issues/1145) and
-  [#749](https://github.com/commercialhaskell/stack/issues/749)
-* `stack hpc report` command added, which generates reports for HPC tix files
-* `stack ghci` now accepts all the flags accepted by `stack build`. See
-  [#1186](https://github.com/commercialhaskell/stack/issues/1186)
-* `stack ghci` builds the project before launching GHCi. If the build fails,
-  try to launch GHCi anyway. Use `stack ghci --no-build` option to disable
-  [#1065](https://github.com/commercialhaskell/stack/issues/1065)
-* `stack ghci` now detects and warns about various circumstances where it is
-  liable to fail. See
-  [#1270](https://github.com/commercialhaskell/stack/issues/1270)
-* Added `require-docker-version` configuration option
-* Packages will now usually be built along with their tests and benchmarks. See
-  [#1166](https://github.com/commercialhaskell/stack/issues/1166)
-* Relative `local-bin-path` paths will be relative to the project's root
-  directory, not the current working directory.
-  [#1340](https://github.com/commercialhaskell/stack/issues/1340)
-* `stack clean` now takes an optional `[PACKAGE]` argument for use in
-  multi-package projects. See
-  [#583](https://github.com/commercialhaskell/stack/issues/583)
-* Ignore cabal_macros.h as a dependency
-  [#1195](https://github.com/commercialhaskell/stack/issues/1195)
-* Pad timestamps and show local time in --verbose output
-  [#1226](https://github.com/commercialhaskell/stack/issues/1226)
-* GHCi: Import all modules after loading them
-  [#995](https://github.com/commercialhaskell/stack/issues/995)
-* Add subcommand aliases: `repl` for `ghci`, and `runhaskell` for `runghc`
-  [#1241](https://github.com/commercialhaskell/stack/issues/1241)
-* Add typo recommendations for unknown package identifiers
-  [#158](https://github.com/commercialhaskell/stack/issues/158)
-* Add `stack path --local-hpc-root` option
-* Overhaul dependencies' haddocks copying
-  [#1231](https://github.com/commercialhaskell/stack/issues/1231)
-* Support for extra-package-dbs in 'stack ghci'
-  [#1229](https://github.com/commercialhaskell/stack/pull/1229)
-* `stack new` disallows package names with "words" consisting solely of numbers
-  [#1336](https://github.com/commercialhaskell/stack/issues/1336)
-* `stack build --fast` turns off optimizations
-* Show progress while downloading package index
-  [#1223](https://github.com/commercialhaskell/stack/issues/1223).
-
-Bug fixes:
-
-* Fix: Haddocks not copied for dependencies
-  [#1105](https://github.com/commercialhaskell/stack/issues/1105)
-* Fix: Global options did not work consistently after subcommand
-  [#519](https://github.com/commercialhaskell/stack/issues/519)
-* Fix: 'stack ghci' doesn't notice that a module got deleted
-  [#1180](https://github.com/commercialhaskell/stack/issues/1180)
-* Rebuild when Cabal file is changed
-* Fix: Paths in GHC warnings not canonicalized, nor those for packages in
-  subdirectories or outside the project root
-  [#1259](https://github.com/commercialhaskell/stack/issues/1259)
-* Fix: unlisted files in tests and benchmarks trigger extraneous second build
-  [#838](https://github.com/commercialhaskell/stack/issues/838)
-
-## 0.1.6.0 - 2015-10-15
-
-Major changes:
-
-* `stack setup` now supports building and booting GHCJS from source tarball.
-* On Windows, build directories no longer display "pretty" information
-  (like x86_64-windows/Cabal-1.22.4.0), but rather a hash of that
-  content. The reason is to avoid the 260 character path limitation on
-  Windows. See
-  [#1027](https://github.com/commercialhaskell/stack/pull/1027)
-* Rename config files and clarify their purposes
-  [#969](https://github.com/commercialhaskell/stack/issues/969)
-    * `~/.stack/stack.yaml` --> `~/.stack/config.yaml`
-    * `~/.stack/global` --> `~/.stack/global-project`
-    * `/etc/stack/config` --> `/etc/stack/config.yaml`
-    * Old locations still supported, with deprecation warnings
-* New command "stack eval CODE", which evaluates to "stack exec ghc -- -e CODE".
-
-Other enhancements:
-
-* No longer install `git` on Windows
-  [#1046](https://github.com/commercialhaskell/stack/issues/1046). You
-  can still get this behavior by running the following yourself:
-  `stack exec -- pacman -Sy --noconfirm git`.
-* Typing enter during --file-watch triggers a rebuild
-  [#1023](https://github.com/commercialhaskell/stack/pull/1023)
-* Use Haddock's `--hyperlinked-source` (crosslinked source), if available
-  [#1070](https://github.com/commercialhaskell/stack/pull/1070)
-* Use Stack-installed GHCs for `stack init --solver`
-  [#1072](https://github.com/commercialhaskell/stack/issues/1072)
-* Experimental: Add `stack query` command
-  [#1087](https://github.com/commercialhaskell/stack/issues/1087)
-* By default, Stack no longer rebuilds a package due to GHC options changes.
-  This behavior can be tweaked with the `rebuild-ghc-options` setting.
-  [#1089](https://github.com/commercialhaskell/stack/issues/1089)
-* By default, ghc-options are applied to all local packages, not just targets.
-  This behavior can be tweaked with the `apply-ghc-options` setting.
-  [#1089](https://github.com/commercialhaskell/stack/issues/1089)
-* Docker: download or override location of Stack executable to re-run in
-  container [#974](https://github.com/commercialhaskell/stack/issues/974)
-* Docker: when Docker Engine is remote, don't run containerized processes as
-  host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
-* Docker: `set-user` option to enable/disable running containerized processes as
-  host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
-* Custom Setup.hs files are now precompiled instead of interpreted. This should
-  be a major performance win for certain edge cases (biggest example:
-  [building Cabal itself](https://github.com/commercialhaskell/stack/issues/1041))
-  while being either neutral or a minor slowdown for more common cases.
-* `stack test --coverage` now also generates a unified coverage report for
-  multiple test-suites / packages.  In the unified report, test-suites can
-  contribute to the coverage of other packages.
-
-Bug fixes:
-
-* Ignore stack-built executables named `ghc`
-  [#1052](https://github.com/commercialhaskell/stack/issues/1052)
-* Fix quoting of output failed command line arguments
-* Mark executable-only packages as installed when copied from cache
-  [#1043](https://github.com/commercialhaskell/stack/pull/1043)
-* Canonicalize temporary directory paths
-  [#1047](https://github.com/commercialhaskell/stack/pull/1047)
-* Put code page fix inside the build function itself
-  [#1066](https://github.com/commercialhaskell/stack/issues/1066)
-* Add `explicit-setup-deps` option
-  [#1110](https://github.com/commercialhaskell/stack/issues/1110), and change
-  the default to the old behavior of using any package in the global and
-  snapshot database
-  [#1025](https://github.com/commercialhaskell/stack/issues/1025)
-* Precompiled cache checks full package IDs on Cabal < 1.22
-  [#1103](https://github.com/commercialhaskell/stack/issues/1103)
-* Pass -package-id to ghci
-  [#867](https://github.com/commercialhaskell/stack/issues/867)
-* Ignore global packages when copying precompiled packages
-  [#1146](https://github.com/commercialhaskell/stack/issues/1146)
-
-## 0.1.5.0 - 2015-09-24
-
-Major changes:
-
-* On Windows, we now use a full MSYS2 installation in place of the previous
-  PortableGit. This gives you access to the pacman package manager for more
-  easily installing libraries.
-* Support for custom GHC binary distributions
-  [#530](https://github.com/commercialhaskell/stack/issues/530)
-    * `ghc-variant` option in `stack.yaml` to specify the variant (also
-      `--ghc-variant` command-line option)
-    * `setup-info` in `stack.yaml`, to specify where to download custom binary
-      distributions (also `--ghc-bindist` command-line option)
-    * Note: On systems with libgmp4 (aka `libgmp.so.3`), such as CentOS 6, you
-      may need to re-run `stack setup` due to the centos6 GHC binary
-      distribution being treated like a variant
-* A new `--pvp-bounds` flag to the sdist and upload commands allows automatic
-  adding of PVP upper and/or lower bounds to your dependencies
-
-Other enhancements:
-
-* Adapt to upcoming Cabal installed package identifier format change
-  [#851](https://github.com/commercialhaskell/stack/issues/851)
-* `stack setup` takes a `--stack-setup-yaml` argument
-* `--file-watch` is more discerning about which files to rebuild for
-  [#912](https://github.com/commercialhaskell/stack/issues/912)
-* `stack path` now supports `--global-pkg-db` and `--ghc-package-path`
-* `--reconfigure` flag
-  [#914](https://github.com/commercialhaskell/stack/issues/914)
-  [#946](https://github.com/commercialhaskell/stack/issues/946)
-* Cached data is written with a checksum of its structure
-  [#889](https://github.com/commercialhaskell/stack/issues/889)
-* Fully removed `--optimizations` flag
-* Added `--cabal-verbose` flag
-* Added `--file-watch-poll` flag for polling instead of using filesystem events
-  (useful for running tests in a Docker container while modifying code in the
-  host environment. When code is injected into the container via a volume, the
-  container won't propagate filesystem events).
-* Give a preemptive error message when `-prof` is given as a GHC option
-  [#1015](https://github.com/commercialhaskell/stack/issues/1015)
-* Locking is now optional, and will be turned on by setting the `STACK_LOCK`
-  environment variable to `true`
-  [#950](https://github.com/commercialhaskell/stack/issues/950)
-* Create default `stack.yaml` with documentation comments and commented out
-  options [#226](https://github.com/commercialhaskell/stack/issues/226)
-* Out of memory warning if Cabal exits with -9
-  [#947](https://github.com/commercialhaskell/stack/issues/947)
-
-Bug fixes:
-
-* Hacky workaround for optparse-applicative issue with `stack exec --help`
-  [#806](https://github.com/commercialhaskell/stack/issues/806)
-* Build executables for local extra-deps
-  [#920](https://github.com/commercialhaskell/stack/issues/920)
-* copyFile can't handle directories
-  [#942](https://github.com/commercialhaskell/stack/pull/942)
-* Support for spaces in Haddock interface files
-  [fpco/minghc#85](https://github.com/fpco/minghc/issues/85)
-* Temporarily building against a "shadowing" local package?
-  [#992](https://github.com/commercialhaskell/stack/issues/992)
-* Fix `Setup.exe` name for `--upgrade-cabal` on Windows
-  [#1002](https://github.com/commercialhaskell/stack/issues/1002)
-* Unlisted dependencies no longer trigger extraneous second build
-  [#838](https://github.com/commercialhaskell/stack/issues/838)
-
-## 0.1.4.1 - 2015-09-04
-
-Fix stack's own Haddocks.  No changes to functionality (only comments updated).
-
-## 0.1.4.0 - 2015-09-04
-
-Major changes:
-
-* You now have more control over how GHC versions are matched, e.g. "use exactly
-  this version," "use the specified minor version, but allow patches," or "use
-  the given minor version or any later minor in the given major release." The
-  default has switched from allowing newer later minor versions to a specific
-  minor version allowing patches. For more information, see
-  [#736](https://github.com/commercialhaskell/stack/issues/736) and
-  [#784](https://github.com/commercialhaskell/stack/pull/784).
-* Support added for compiling with GHCJS
-* Stack can now reuse prebuilt binaries between snapshots. That means that, if
-  you build package foo in LTS-3.1, that binary version can be reused in
-  LTS-3.2, assuming it uses the same dependencies and flags.
-  [#878](https://github.com/commercialhaskell/stack/issues/878)
-
-Other enhancements:
-
-* Added the `--docker-env` argument, to set environment variables in Docker
-  container.
-* Set locale environment variables to UTF-8 encoding for builds to avoid
-  "commitBuffer: invalid argument" errors from GHC
-  [#793](https://github.com/commercialhaskell/stack/issues/793)
-* Enable transliteration for encoding on stdout and stderr
-  [#824](https://github.com/commercialhaskell/stack/issues/824)
-* By default, `stack upgrade` automatically installs GHC as necessary
-  [#797](https://github.com/commercialhaskell/stack/issues/797)
-* Added the `ghc-options` key to `stack.yaml`
-  [#796](https://github.com/commercialhaskell/stack/issues/796)
-* Added the `extra-path` key to `stack.yaml`
-* Code page changes on Windows only apply to the build command (and its
-  synonyms), and can be controlled via a command line flag (still defaults to
-  on) [#757](https://github.com/commercialhaskell/stack/issues/757)
-* Implicitly add packages to extra-deps when a flag for them is set
-  [#807](https://github.com/commercialhaskell/stack/issues/807)
-* Use a precompiled Setup.hs for simple build types
-  [#801](https://github.com/commercialhaskell/stack/issues/801)
-* Set --enable-tests and --enable-benchmarks optimistically
-  [#805](https://github.com/commercialhaskell/stack/issues/805)
-* `--only-configure` option added
-  [#820](https://github.com/commercialhaskell/stack/issues/820)
-* Check for duplicate local package names
-* Stop nagging people that call `stack test`
-  [#845](https://github.com/commercialhaskell/stack/issues/845)
-* `--file-watch` will ignore files that are in your VCS boring/ignore files
-  [#703](https://github.com/commercialhaskell/stack/issues/703)
-* Add `--numeric-version` option
-
-Bug fixes:
-
-* `stack init --solver` fails if `GHC_PACKAGE_PATH` is present
-  [#860](https://github.com/commercialhaskell/stack/issues/860)
-* `stack solver` and `stack init --solver` check for test suite and benchmark
-  dependencies [#862](https://github.com/commercialhaskell/stack/issues/862)
-* More intelligent logic for setting UTF-8 locale environment variables
-  [#856](https://github.com/commercialhaskell/stack/issues/856)
-* Create missing directories for `stack sdist`
-* Don't ignore Cabal files with extra periods
-  [#895](https://github.com/commercialhaskell/stack/issues/895)
-* Deprecate unused `--optimizations` flag
-* Truncated output on slow terminals
-  [#413](https://github.com/commercialhaskell/stack/issues/413)
-
-## 0.1.3.1 - 2015-08-12
-
-Bug fixes:
-
-* Ignore disabled executables
-  [#763](https://github.com/commercialhaskell/stack/issues/763)
-
-## 0.1.3.0 - 2015-08-12
-
-Major changes:
-
-* Detect when a module is compiled but not listed in the Cabal file
-  ([#32](https://github.com/commercialhaskell/stack/issues/32))
-    * A warning is displayed for any modules that should be added to
-      `other-modules` in the Cabal file
-    * These modules are taken into account when determining whether a package
-      needs to be built
-* Respect TemplateHaskell addDependentFile dependency changes
-  ([#105](https://github.com/commercialhaskell/stack/issues/105))
-    * TH dependent files are taken into account when determining whether a
-      package needs to be built.
-* Overhauled target parsing, added `--test` and `--bench` options
-  [#651](https://github.com/commercialhaskell/stack/issues/651)
-    * For details, see
-      [Build commands documentation](http://docs.haskellstack.org/en/stable/build_command/)
-
-Other enhancements:
-
-* Set the `HASKELL_DIST_DIR` environment variable
-  [#524](https://github.com/commercialhaskell/stack/pull/524)
-* Track build status of tests and benchmarks
-  [#525](https://github.com/commercialhaskell/stack/issues/525)
-* `--no-run-tests` [#517](https://github.com/commercialhaskell/stack/pull/517)
-* Targets outside of root dir don't build
-  [#366](https://github.com/commercialhaskell/stack/issues/366)
-* Upper limit on number of flag combinations to test
-  [#543](https://github.com/commercialhaskell/stack/issues/543)
-* Fuzzy matching support to give better error messages for close version numbers
-  [#504](https://github.com/commercialhaskell/stack/issues/504)
-* `--local-bin-path` global option. Use to change where binaries get placed on a
-  `--copy-bins` [#342](https://github.com/commercialhaskell/stack/issues/342)
-* Custom snapshots [#111](https://github.com/commercialhaskell/stack/issues/111)
-* --force-dirty flag: Force treating all local packages as having dirty files
-  (useful for cases where Stack can't detect a file change)
-* GHC error messages: display file paths as absolute instead of relative for
-  better editor integration
-* Add the `--copy-bins` option
-  [#569](https://github.com/commercialhaskell/stack/issues/569)
-* Give warnings on unexpected config keys
-  [#48](https://github.com/commercialhaskell/stack/issues/48)
-* Remove Docker `pass-host` option
-* Don't require `cabal-install` to upload
-  [#313](https://github.com/commercialhaskell/stack/issues/313)
-* Generate indexes for all deps and all installed snapshot packages
-  [#143](https://github.com/commercialhaskell/stack/issues/143)
-* Provide `--resolver global` option
-  [#645](https://github.com/commercialhaskell/stack/issues/645)
-    * Also supports `--resolver nightly`, `--resolver lts`, and
-      `--resolver lts-X`
-* Make `stack build --flag` error when flag or package is unknown
-  [#617](https://github.com/commercialhaskell/stack/issues/617)
-* Preserve file permissions when unpacking sources
-  [#666](https://github.com/commercialhaskell/stack/pull/666)
-* `stack build` etc work outside of a project
-* `list-dependencies` command
-  [#638](https://github.com/commercialhaskell/stack/issues/638)
-* `--upgrade-cabal` option to `stack setup`
-  [#174](https://github.com/commercialhaskell/stack/issues/174)
-* `--exec` option [#651](https://github.com/commercialhaskell/stack/issues/651)
-* `--only-dependencies` implemented correctly
-  [#387](https://github.com/commercialhaskell/stack/issues/387)
-
-Bug fixes:
-
-* Extensions from the Cabal `other-extensions` field no longer enabled by
-  default [#449](https://github.com/commercialhaskell/stack/issues/449)
-* Fix: haddock forces rebuild of empty packages
-  [#452](https://github.com/commercialhaskell/stack/issues/452)
-* Don't copy over executables excluded by component selection
-  [#605](https://github.com/commercialhaskell/stack/issues/605)
-* Fix: Stack fails on Windows with git package in `stack.yaml` and no git
-  executable on the PATH
-  [#712](https://github.com/commercialhaskell/stack/issues/712)
-* Fixed GHCi issue: Specifying explicit package versions (#678)
-* Fixed GHCi issue: Specifying -odir and -hidir as .stack-work/odir (#529)
-* Fixed GHCi issue: Specifying A instead of A.ext for modules (#498)
-
-## 0.1.2.0 - 2015-07-05
-
-* Add `--prune` flag to `stack dot`
-  [#487](https://github.com/commercialhaskell/stack/issues/487)
-* Add `--[no-]external`,`--[no-]include-base` flags to `stack dot`
-  [#437](https://github.com/commercialhaskell/stack/issues/437)
-* Add `--ignore-subdirs` flag to init command
-  [#435](https://github.com/commercialhaskell/stack/pull/435)
-* Handle attempt to use non-existing resolver
-  [#436](https://github.com/commercialhaskell/stack/pull/436)
-* Add `--force` flag to `init` command
-* exec style commands accept the `--package` option (see
-  [Reddit discussion](http://www.reddit.com/r/haskell/comments/3bd66h/stack_runghc_turtle_as_haskell_script_solution/))
-* `stack upload` without arguments doesn't do anything
-  [#439](https://github.com/commercialhaskell/stack/issues/439)
-* Print latest version of packages on conflicts
-  [#450](https://github.com/commercialhaskell/stack/issues/450)
-* Flag to avoid rerunning tests that haven't changed
-  [#451](https://github.com/commercialhaskell/stack/issues/451)
-* Stack can act as a script interpreter (see [Script interpreter]
-  (https://github.com/commercialhaskell/stack/wiki/Script-interpreter) and
-  [Reddit discussion](http://www.reddit.com/r/haskell/comments/3bd66h/stack_runghc_turtle_as_haskell_script_solution/))
-* Add the __`--file-watch`__ flag to auto-rebuild on file changes
-  [#113](https://github.com/commercialhaskell/stack/issues/113)
-* Rename `stack docker exec` to `stack exec --plain`
-* Add the `--skip-msys` flag
-  [#377](https://github.com/commercialhaskell/stack/issues/377)
-* `--keep-going`, turned on by default for tests and benchmarks
-  [#478](https://github.com/commercialhaskell/stack/issues/478)
-* `concurrent-tests: BOOL`
-  [#492](https://github.com/commercialhaskell/stack/issues/492)
-* Use hashes to check file dirtiness
-  [#502](https://github.com/commercialhaskell/stack/issues/502)
-* Install correct GHC build on systems with libgmp.so.3
-  [#465](https://github.com/commercialhaskell/stack/issues/465)
-* `stack upgrade` checks version before upgrading
-  [#447](https://github.com/commercialhaskell/stack/issues/447)
-
-## 0.1.1.0 - 2015-06-26
-
-* Remove GHC uncompressed tar file after installation
-  [#376](https://github.com/commercialhaskell/stack/issues/376)
-* Put stackage snapshots JSON on S3
-  [#380](https://github.com/commercialhaskell/stack/issues/380)
-* Specifying flags for multiple packages
-  [#335](https://github.com/commercialhaskell/stack/issues/335)
-* single test suite failure should show entire log
-  [#388](https://github.com/commercialhaskell/stack/issues/388)
-* valid-wanted is a confusing option name
-  [#386](https://github.com/commercialhaskell/stack/issues/386)
-* `stack init` in multi-package project should use local packages for dependency
-  checking [#384](https://github.com/commercialhaskell/stack/issues/384)
-* Display information on why a snapshot was rejected
-  [#381](https://github.com/commercialhaskell/stack/issues/381)
-* Give a reason for unregistering packages
-  [#389](https://github.com/commercialhaskell/stack/issues/389)
-* `stack exec` accepts the `--no-ghc-package-path` parameter
-* Don't require build plan to upload
-  [#400](https://github.com/commercialhaskell/stack/issues/400)
-* Specifying test components only builds/runs those tests
-  [#398](https://github.com/commercialhaskell/stack/issues/398)
-* `STACK_EXE` environment variable
-* Add the `stack dot` command
-* `stack upgrade` added
-  [#237](https://github.com/commercialhaskell/stack/issues/237)
-* `--stack-yaml` command line flag
-  [#378](https://github.com/commercialhaskell/stack/issues/378)
-* `--skip-ghc-check` command line flag
-  [#423](https://github.com/commercialhaskell/stack/issues/423)
-
-Bug fixes:
-
-* Haddock links to global packages no longer broken on Windows
-  [#375](https://github.com/commercialhaskell/stack/issues/375)
-* Make flags case-insensitive
-  [#397](https://github.com/commercialhaskell/stack/issues/397)
-* Mark packages uninstalled before rebuilding
-  [#365](https://github.com/commercialhaskell/stack/issues/365)
-
-## 0.1.0.0 - 2015-06-23
-
-* Fall back to Cabal dependency solver when a snapshot can't be found
-* Basic implementation of `stack new`
-  [#137](https://github.com/commercialhaskell/stack/issues/137)
-* `stack solver` command
-  [#364](https://github.com/commercialhaskell/stack/issues/364)
-* `stack path` command
-  [#95](https://github.com/commercialhaskell/stack/issues/95)
-* Haddocks [#143](https://github.com/commercialhaskell/stack/issues/143):
-    * Build for dependencies
-    * Use relative links
-    * Generate module contents and index for all packages in project
-
-## 0.0.3 - 2015-06-17
-
-* `--prefetch`
-  [#297](https://github.com/commercialhaskell/stack/issues/297)
-* `upload` command ported from stackage-upload
-  [#225](https://github.com/commercialhaskell/stack/issues/225)
-* `--only-snapshot`
-  [#310](https://github.com/commercialhaskell/stack/issues/310)
-* `--resolver` [#224](https://github.com/commercialhaskell/stack/issues/224)
-* `stack init` [#253](https://github.com/commercialhaskell/stack/issues/253)
-* `--extra-include-dirs` and `--extra-lib-dirs`
-  [#333](https://github.com/commercialhaskell/stack/issues/333)
-* Specify intra-package target
-  [#201](https://github.com/commercialhaskell/stack/issues/201)
-
-## 0.0.2 - 2015-06-14
-
-* Fix some Windows specific bugs
-  [#216](https://github.com/commercialhaskell/stack/issues/216)
-* Improve output for package index updates
-  [#227](https://github.com/commercialhaskell/stack/issues/227)
-* Automatically update indices as necessary
-  [#227](https://github.com/commercialhaskell/stack/issues/227)
-* --verbose flag [#217](https://github.com/commercialhaskell/stack/issues/217)
-* Remove packages (HTTPS and Git)
-  [#199](https://github.com/commercialhaskell/stack/issues/199)
-* Config values for system-ghc and install-ghc
-* Merge `stack deps` functionality into `stack build`
-* `install` command
-  [#153](https://github.com/commercialhaskell/stack/issues/153) and
-  [#272](https://github.com/commercialhaskell/stack/issues/272)
-* overriding architecture value (useful to force 64-bit GHC on Windows, for
-  example)
-* Overhauled test running (allows cycles, avoids unnecessary recompilation, etc)
-
-## 0.0.1 - 2015-06-09
-
-* First public release, beta quality
+../ChangeLog.md
doc/README.md view
@@ -1,17 +1,22 @@ <div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
 
-# The Haskell Tool Stack
+# Welcome to Stack
 
-Welcome to the [Haskell](https://www.haskell.org/) programming language and the
-Haskell Tool Stack (Stack)! Stack is a program for developing Haskell projects.
-It is aimed at new and experienced users of Haskell and seeks to support
-them fully on Linux, macOS and Windows.
+Welcome to the [Haskell](https://www.haskell.org/) programming language and
+Stack! Stack is an established program for developing Haskell projects.[^1] It
+is aimed at new and experienced users of Haskell and seeks to support them fully
+on Linux, macOS and Windows.
 
+[^1]:
+    The project's first public commit was on 29 April 2015. It changed its name
+    to the Haskell Tool Stack on 18 May 2015. It is now widely known simply as
+    Stack.
+
 Haskell code is compiled by the
 [Glasgow Haskell Compiler](https://www.haskell.org/ghc/) (GHC), which can also
 be used interactively.
 
-<img src="https://i.imgur.com/WW69oTj.gif" width="50%" align="right">
+<img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/stack-welcome.gif" width="50%" align="right">
 
 Stack features include:
 
@@ -243,8 +248,8 @@ 3.  Build the template project and create an executable named `my-project-exe`.
 
     First, if necessary, Stack will download a version of GHC in an isolated
-    location. That won't interfere with other GHC installations on your system.
-    (On Windows, if necessary, Stack will also download
+    location. That will not interfere with other GHC installations on your
+    system. (On Windows, if necessary, Stack will also download
     [MSYS2](https://www.msys2.org/). MSYS2 is a project that provides popular
     tools for developers on Windows.)
 
@@ -374,9 +379,9 @@ -   :fontawesome-solid-trowel-bricks:{ .lg .middle } __Cabal build system__
 
     A specification for defining Haskell packages and a library for performing
-    builds.[^1]
+    builds.[^2]
 
-    [^1]:
+    [^2]:
         Cabal is also the name of a tool used for building Haskell code,
         provided by the `cabal-install` package. This guide distinguishes
         between them by Cabal (the library) and Cabal (the tool).
doc/build_overview.md view
@@ -52,8 +52,8 @@ 
 ## Find the `stack.yaml` file
 
-* Check for a `--stack-yaml` CLI arg, and use that
-* Check for a `STACK_YAML` env var
+* Check for a `--stack-yaml` or `-w` command line argument, and use that
+* Check for a `STACK_YAML` environment variable
 * Look for a `stack.yaml` in this directory or ancestor directories
 * Fall back to the default global project
 
@@ -94,8 +94,8 @@   snapshot packages that have been replaced.
 * Apply the `flags` and `ghc-options` by name to these packages overwriting
   any previous values coming from a snapshot. If any values are specified
-  but no matching package is found, it's an error. If a flag is not defined
-  in the corresponding package cabal file, it's an error.
+  but no matching package is found, it is an error. If a flag is not defined
+  in the corresponding package cabal file, it is an error.
 * We are now left with the following:
     * A wanted compiler version
     * A map from package name to immutable packages with package config (flags,
@@ -160,13 +160,13 @@ 
 Named CLI flags are applied to specific packages by updating the
 config in one of the four maps. If a flag is specified and no package
-is found, it's an error. Note that flag settings are added _on top of_
+is found, it is an error. Note that flag settings are added _on top of_
 previous settings in this case, and does not replace them. That is, if
 previously we have `singleton (FlagName "foo") True` and now add
 `singleton (FlagName "bar") True`, both `foo` and `bar` will now be
 true. If any flags are specified but no matching package is found,
-it's an error. If a flag is not defined in the corresponding package
-cabal file, it's an error.
+it is an error. If a flag is not defined in the corresponding package
+Cabal file, it is an error.
 
 ## Apply CLI GHC options
 
@@ -182,7 +182,7 @@ 
 General options are divided into the following categories:
 
-* `$locals` is deprecated, it's now a synonym for `$project`
+* `$locals` is deprecated, it is now a synonym for `$project`
 * `$project` applies to all project packages, not to any dependencies
 * `$targets` applies to all project packages that are targets, not to any
   dependencies or non-target project packages. This is the default option
@@ -199,9 +199,8 @@ Use some deterministic binary serialization and SHA256 thereof to get
 a hash of the following information:
 
-* Actual compiler (GHC version, path, *FIXME* probably some other
-  unique info from GHC, I've heard that `ghc --info` gives you
-  something)
+* Actual compiler (GHC version, path, *FIXME* probably some other unique info
+  from GHC, I have heard that `ghc --info` gives you something)
 * Global database map
 * Immutable dependency map
 
@@ -234,9 +233,9 @@   all enabled components (using the fun backwards compat logic for
   `build-tools`)
 * Apply the logic recursively to come up with a full build plan
-* If a task depends exclusively on immutable packages, mark it as
-  immutable. Otherwise, it's mutable. The former go into the snapshot
-  database, the latter into the local database.
+* If a task depends exclusively on immutable packages, mark it as immutable.
+  Otherwise, it is mutable. The former go into the snapshot database, the latter
+  into the local database.
 
 We now have a set of tasks of packages/components to build, with full
 config information for each package, and dependencies that must be
@@ -244,9 +243,9 @@ 
 !!! bug "To do"
 
-    There's some logic to deal with cyclic dependencies between test suites and
+    There is some logic to deal with cyclic dependencies between test suites and
     benchmarks, where a task can be broken up into individual components versus
-    be kept as a single task. Need to document this better. Currently it's the
+    be kept as a single task. Need to document this better. Currently it is the
     "all in one" logic.
 
 ## Unregister local modified packages
@@ -269,7 +268,7 @@ * If all good: do nothing
 * Otherwise, for immutable tasks: check the precompiled cache for an
   identical package installation (same GHC, dependencies, etc). If
-  present: copy that over, and we're done.
+  present: copy that over, and we are done.
 * Otherwise, perform the build, register, write to the Stack specific
   "is installed" stuff, and (for immutable tasks) register to the
   precompiled cache
doc/commands/build_command.md view
@@ -120,10 +120,10 @@ 
 !!! note
 
-    Stackage snapshots do not include directly most boot packages but some
-    snapshots may include directly some boot packages. In particular, some
-    snapshots include directly `Win32` (which is a boot package on Windows)
-    while others do not.
+    Stackage snapshots are not expected to include directly any boot packages
+    but some such snapshots may include directly some boot packages. In
+    particular, some snapshots include directly `Win32` (which is a boot package
+    on Windows) while most do not.
 
     For example, if `Cabal` (a boot package) is not a project package or an
     extra-dep, then `stack build Cabal` with Stackage snapshot LTS Haskell 20.25
@@ -237,7 +237,7 @@ If a package description specifies a custom build type, it must also specify a
 custom setup. That should list the dependencies needed to compile `Setup.hs`.
 Stack further customises the setup, using the `Cabal` package. If that package
-is not listed, Stack will warn and add the GHC boot package as a dependency. 
+is not listed, Stack will warn and add the GHC boot package as a dependency.
 
 In addition to specifying targets, you can also control what gets built, or
 retained, with the flags and options listed below. You can also affect what gets
@@ -334,16 +334,17 @@ 
 Default: Disabled
 
-Set the flag to force rebuild of packages even when it doesn't seem necessary
+Set the flag to force rebuild of packages even when it does not seem necessary
 based on file dirtiness.
 
 ### `--[no-]haddock` flag
 
 Default: Disabled
 
+The [`stack haddock`](haddock_command.md) synonym sets this flag.
+
 Set the flag to build Haddock documentation. This may cause a lot of packages to
-get re-built, so that the documentation links work. The `stack haddock` synonym
-sets this flag.
+get re-built, so that the documentation links work.
 
 Stack applies Haddock's `--gen-contents` and `--gen-index` flags to generate a
 single HTML contents and index for multiple sets of Haddock documentation.
@@ -363,8 +364,10 @@ 
 ### `--haddock-arguments` option
 
-`stack haddock --haddock-arguments <haddock_argument(s)>` passes the specified
-arguments to the Haddock tool.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag),
+`--haddock-arguments <haddock_argument(s)>` passes the specified arguments to
+the Haddock tool.
 
 Specified arguments are separated by spaces. Arguments can be unquoted (if they
 do not contain space or `"` characters) or quoted (`""`). Quoted arguments can
@@ -377,9 +380,11 @@ 
 ### `--[no-]haddock-deps` flag
 
-Default: Enabled (if building Haddock documnentation)
+Default: Enabled (if building Haddock documentation)
 
-Unset the flag to disable building Haddock documentation for dependencies.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), unset the flag to disable building
+documentation for dependencies.
 
 ### `--[no-]haddock-for-hackage` flag
 
@@ -389,9 +394,10 @@ 
 Default: Disabled
 
-Set the flag to build project packages with flags to generate Haddock
-documentation suitable for upload to Hackage. The form of the Haddock
-documentation generated for other packages is unaffected.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), set the flag to build project
+packages with flags to generate documentation suitable for upload to Hackage.
+The form of the documentation generated for other packages is unaffected.
 
 For each project package, the generated Haddock documentation files are in
 directory `doc\html\<package_version>-docs\`, relative to Stack's dist work
@@ -438,9 +444,11 @@ 
 ### `--[no-]haddock-hyperlink-source` flag
 
-Default: Enabled
+Default: Enabled (if building Haddock documentation)
 
-Unset the flag to disable building building hyperlinked source for Haddock.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), unset the flag to disable building
+documentation with hyperlinked sources.
 
 If the [`--haddock-for-hackage`](#-no-haddock-for-hackage-flag) flag is passed,
 this flag is ignored.
@@ -449,8 +457,9 @@ 
 Default: Disabled
 
-Set the flag to enable building Haddock documentation for benchmark components
-of packages.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), set the flag to enable building
+documentation for benchmark components of packages.
 
 If the [`--haddock-for-hackage`](#-no-haddock-for-hackage-flag) flag is passed,
 this flag is ignored.
@@ -472,8 +481,9 @@ 
 Default: Disabled
 
-Set the flag to enable building Haddock documentation for executable components
-of packages.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), set the flag to enable building
+documentation for executable components of packages.
 
 If the [`--haddock-for-hackage`](#-no-haddock-for-hackage-flag) flag is passed,
 this flag is ignored.
@@ -495,7 +505,9 @@ 
 Default: Disabled
 
-Set the flag to enable building Haddock documentation for internal modules.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), set the flag to enable building
+documentation for internal modules.
 
 If the [`--haddock-for-hackage`](#-no-haddock-for-hackage-flag) flag is passed,
 this flag is ignored.
@@ -504,8 +516,9 @@ 
 Default: Disabled
 
-Set the flag to enable building Haddock documentation for test suite components
-of packages.
+When building Haddock documentation (see the
+[`--[no-]haddock`](#-no-haddock-flag) flag), set the flag to enable building
+documentation for test suite components of packages.
 
 If the [`--haddock-for-hackage`](#-no-haddock-for-hackage-flag) flag is passed,
 this flag is ignored.
@@ -530,7 +543,7 @@ Default (`stack test` or `stack bench`): Enabled
 
 Set the flag to continue building packages even after some build step fails.
-The packages which depend upon the failed build won't get built.
+The packages which depend upon the failed build will not get built.
 
 ### `--[no-]keep-tmp-files` flag
 
@@ -571,7 +584,7 @@ 
 Default: Disabled
 
-Set the flag to force reconfiguration even when it doesn't seem necessary based
+Set the flag to force reconfiguration even when it does not seem necessary based
 on file dirtiness. This is sometimes useful with custom `Setup.hs` files, in
 particular when they depend on external data files.
 
@@ -581,7 +594,7 @@ project package. It allows you to skip test suites and benchmark without
 specifying other components (e.g. `stack test --skip long-test-suite` will run
 the tests without the `long-test-suite` test suite). Be aware that skipping
-executables won't work the first time the package is built due to an issue in
+executables will not work the first time the package is built due to an issue in
 [Cabal](https://github.com/commercialhaskell/stack/issues/3229).
 
 This option can be specified multiple times to skip multiple components.
doc/commands/clean_command.md view
@@ -5,7 +5,7 @@ Either
 
 ~~~text
-stack clean [PACKAGE]
+stack clean [PACKAGE] [--[no-]omit-this]
 ~~~
 
 or
@@ -14,8 +14,17 @@ stack clean --full
 ~~~
 
-`stack clean` deletes build artefacts for one or more project packages specified
-as arguments. If no project packages are specified, all project packages are
-cleaned.
+`stack clean` deletes build artefacts for one or more project packages.
 
-`stack clean --full` deletes the project's Stack working directory.
+By default:
+
+* all project packages are cleaned. Pass one or more project package names to
+  specify individual project packages; and
+
+* the `dist` directory and all of its subdirectories in the Stack work directory
+  for each relevant project package are deleted. Pass the flag `--omit-this` to
+  omit, from cleaning, the `dist` work directory (see `stack path --dist-dir`)
+  and its subdirectories currently in use.
+
+`stack clean --full` deletes the Stack work directories of the project and its
+project packages.
doc/commands/dot_command.md view
@@ -49,52 +49,59 @@     to use a hint file for global packages. If a hint file is used, GHC does not
     need to be installed.
 
+All GHC wired-in packages are identified by a rectangular box.
+
+Nodes with no dependencies in the graph are given the maximum rank in the DOT
+language (that is, the `dot` executable will place those nodes on the bottom row
+of the diagram).
+
 ## Examples
 
-The following examples are based on a version of the
-[`wreq` package](https://hackage.haskell.org/package/wreq). In each case, the
-output from `stack dot` is piped as an input into Graphviz's `dot` executable,
-and `dot` produces output in the form of a PNG file named `wreq.png`.
+The following examples are based on the package
+[`wreq-0.5.4.3`](https://hackage.haskell.org/package/wreq-0.5.4.3) and the boot
+packages of GHC 9.10.3. In each case, the output from `stack dot` is piped as an
+input into Graphviz's `dot` or `twopi` executables, and the executable produces
+output in the form of a SVG file named `wreq-example*.svg`.
 
 *   A simple example:
 
     ~~~text
-    stack dot | dot -Tpng -o wreq.png
+    stack dot | dot -Tsvg -o wreq-example1.svg
     ~~~
 
-    [![wreq](https://cloud.githubusercontent.com/assets/591567/8478591/ae10a418-20d2-11e5-8945-55246dcfac62.png)](https://cloud.githubusercontent.com/assets/591567/8478591/ae10a418-20d2-11e5-8945-55246dcfac62.png)
+    [![wreq-example1.svg](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example1.svg)](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example1.svg)
 
 *   Include external dependencies:
 
     ~~~text
-    stack dot --external | dot -Tpng -o wreq.png
+    stack dot --external | dot -Tsvg -o wreq-example2.svg
     ~~~
 
-    [![wreq_ext](https://cloud.githubusercontent.com/assets/591567/8478621/d247247e-20d2-11e5-993d-79096e382abd.png)](https://cloud.githubusercontent.com/assets/591567/8478621/d247247e-20d2-11e5-993d-79096e382abd.png)
+    [![wreq-example2.svg](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example2.svg)](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example2.svg)
 
 *   Include external dependencies, limit the depth and save the output from
-    `stack dot` as an intermediate file (`wreq.dot`).
+    `stack dot` as an intermediate file (`wreq-example3.dot`).
 
     ~~~text
-    stack dot --external --depth 1 > wreq.dot
-    dot -Tpng -o wreq.png wreq.dot
+    stack dot --external --depth 2 > wreq-example3.dot
+    dot -Tsvg -o wreq-example3.svg wreq-example3.dot
     ~~~
 
 *   Include external dependencies, exclude `base` and limit the depth:
 
     ~~~text
-    stack dot --no-include-base --external --depth 1 | dot -Tpng -o wreq.png
+    stack dot --no-include-base --external --depth 2 | dot -Tsvg -o wreq-example4.svg
     ~~~
 
-    [![wreq_depth](https://cloud.githubusercontent.com/assets/591567/8484310/45b399a0-20f7-11e5-8068-031c2b352961.png)](https://cloud.githubusercontent.com/assets/591567/8484310/45b399a0-20f7-11e5-8068-031c2b352961.png)
+    [![wreq-example4.svg](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example4.svg)](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example4.svg)
 
 *   Include external dependencies and prune `base` and other packages:
 
     ~~~text
-    stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | dot -Tpng -o wreq.png
+    stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | dot -Tsvg -o wreq-example5.svg
     ~~~
 
-    [![wreq_pruned](https://cloud.githubusercontent.com/assets/591567/8478768/adbad280-20d3-11e5-9992-914dc24fe569.png)](https://cloud.githubusercontent.com/assets/591567/8478768/adbad280-20d3-11e5-9992-914dc24fe569.png)
+    [![wreq-example5.svg](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example5.svg)](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example5.svg)
 
 *   Include external dependencies, prune `base` and other packages, and use a
     different Graphviz executable to draw the graph:
@@ -102,7 +109,7 @@     Graphviz's `twopi` executable draws graphs in a radial layout.
 
     ~~~text
-    stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | twopi -Groot=wreq -Goverlap=false -Tpng -o wreq.png
+    stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | twopi -Groot=wreq -Goverlap=false -Tsvg -o wreq-example6.svg
     ~~~
 
-    [![wreq_pruned](https://cloud.githubusercontent.com/assets/591567/8495538/9fae1184-216e-11e5-9931-99e6147f8aed.png)](https://cloud.githubusercontent.com/assets/591567/8495538/9fae1184-216e-11e5-9931-99e6147f8aed.png)
+    [![wreq-example6.svg](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example6.svg)](https://cdn.jsdelivr.net/gh/commercialhaskell/stack@master/doc/img/dot_command/wreq-example6.svg)
doc/commands/ghci_command.md view
@@ -94,13 +94,13 @@ 
         The `--only-main` flag can be useful if:
 
-        1.  You're loading the project in order to run it in GHCi (e.g. via
+        1.  You are loading the project in order to run it in GHCi (e.g. via
             `main`), and you intend to reload while developing. Without flag,
             you will need to quit and restart GHCi whenever a module gets
             deleted. With the flag, reloading should work fine in this case.
 
-        2.  If many of your modules have exports named the same thing, then
-            you'll need to refer to them using qualified names. To avoid this,
+        2.  If many of your modules have exports named the same thing, then you 
+            will need to refer to them using qualified names. To avoid this,
             use the `--only-main` flag to start with a blank slate and just
             import the modules you are interested in.
 
@@ -114,7 +114,7 @@ 
     Combining GHC options should work out when packages share similar
     conventions. However, conflicts may arise, such as when one component
-    defines default extensions which aren't assumed by another. For example,
+    defines default extensions which are not assumed by another. For example,
     specifying `NoImplicitPrelude` in one component but not another is likely to
     cause failures. GHCi will be run with `-XNoImplicitPrelude`, but it is
     likely that modules in the other component assume that the `Prelude` is
@@ -156,7 +156,7 @@ 
 !!! note
 
-    Running `stack ghci` on a pristine copy of the code doesn't currently build
+    Running `stack ghci` on a pristine copy of the code does not currently build
     libraries
     (issue [#2790](https://github.com/commercialhaskell/stack/issues/2790)) or
     internal libraries
doc/commands/haddock_command.md view
@@ -26,5 +26,5 @@ ~~~
 
 `stack haddock` is a synonym for `stack build --haddock`. For further
-information, see the documentation for the [`stack build`](build_command.md)
-command.
+information, see the documentation for the
+[`stack build`](build_command.md#-no-haddock-flag) command.
doc/commands/hpc_command.md view
@@ -67,7 +67,7 @@ coverage from `A` and `B`'s test suites. It will also log the path to the HTML
 for the corresponding full report.
 
-This command also supports taking extra `.tix` files.  If you've also built an
+This command also supports taking extra `.tix` files.  If you have also built an
 executable, against exactly the same library versions of `A`, `B`, and `C`, then
 you could command the following:
 
@@ -95,7 +95,7 @@ 2.  These test suites link against your library, rather than building the
     library directly. Coverage information is only given for libraries, ignoring
     the modules which get compiled directly into your executable. A common case
-    where this doesn't happen is when your test suite and library both have
+    where this does not happen is when your test suite and library both have
     something like `hs-source-dirs: src/`. In this case, when building your test
     suite you may also be compiling your library, instead of just linking
     against it.
@@ -140,8 +140,8 @@    will then get loaded, modified, and outputted to
    `pkg-name/test-name/test-name.tix` in the local HPC root directory.
 
-   The `.tix` file gets modified to remove coverage file that isn't associated
-   with a library. So, this means that you won't get coverage information for
+   The `.tix` file gets modified to remove coverage file that is not associated
+   with a library. So, this means that you will not get coverage information for
    the modules compiled in the `executable` or `test-suite` stanza of your Cabal
    file. This makes it possible to directly union multiple `*.tix` files from
    different executables (assuming they are using the exact same versions of the
doc/commands/list_command.md view
@@ -45,17 +45,17 @@          tasty, retry, path, pretty, pasty, xattr, alloy, para, pappy and
          alure.
 
-stack --snapshot lts-23.24 list base unix Win32 acme-missiles pantry
+stack --snapshot lts-24.24 list base unix Win32 acme-missiles pantry
 Error: [S-4926]
        * Package does not appear in snapshot (directly or indirectly): acme-missiles.
 
-stack --snapshot lts-23.24 list base unix Win32 pantry
-base-4.19.2.0
-unix-2.8.6.0
-Win32-2.13.4.0
+stack --snapshot lts-24.24 list base unix Win32 pantry
+base-4.20.2.0
+unix-2.8.7.0
+Win32-2.14.1.0
 pantry-0.10.1
 
-stack --snapshot lts-23.24 list
+stack --snapshot lts-24.24 list
 AC-Angle-1.0
 ALUT-2.4.0.3
 ...
doc/commands/new_command.md view
@@ -31,6 +31,15 @@ 
 !!! note
 
+    `stack new` will decline to accept a package name that is a GHC wired-in
+    package for a version of GHC that is supported by Stack.
+
+    Stack treats the following as the names of 'wired-in' packages: `base`,
+    `ghc-bignum`, `ghc-prim`, `ghc`, `ghc-internal`, `integer-gmp`,
+    `integer-simple`, `interactive`, `rts` and `template-haskell`.
+
+!!! note
+
     In the case of Hackage and acceptable package names, an alphanumeric
     character is limited to one of `A` to `Z`, `a` to `z`, and `0` to `9`.
 
@@ -56,22 +65,23 @@ ## Project templates
 
 A project template file can be located in a repository named `stack-templates`
-on GitHub, GitLab or Bitbucket; at a URL; or on the local file system.
+on GitHub, GitLab, Bitbucket or Codeberg; at a URL; or on the local file system.
 
 Project template file names have the extension `.hsfiles`. The extension does
 not need to be specified with `stack new`.
 
 A project template file `my-template.hsfiles` in a repository
-`username/stack-templates` on GitHub, GitLab or Bitbucket can be specified
-with `stack new` as:
+`username/stack-templates` on GitHub, GitLab, Bitbucket or Codeberg can be
+specified with `stack new` as:
 
 ~~~test
 <service>:username/my-template
 ~~~
 
 where `<service>` is one of `github` for [GitHub](https://github.com/),
-`gitlab` for [GitLab](https://gitlab.com), or `bitbucket` for
-[Bitbucket](https://bitbucket.com).
+`gitlab` for [GitLab](https://gitlab.com), `bitbucket` for
+[Bitbucket](https://bitbucket.com), or `codeberg:` for
+[Codeberg](https://codeberg.org).
 
 The default service is GitHub, the default username is `commercialhaskell` and
 the default project template name is `new-template`.
doc/commands/script_command.md view
@@ -49,7 +49,7 @@ For example:
 
 ~~~text
-stack script --snapshot lts-23.24 MyScript.hs
+stack script --snapshot lts-24.24 MyScript.hs
 ~~~
 
 An immutable extra-dep can be added to the snapshot on the command line with the
@@ -211,7 +211,7 @@ can be compiled and run, with arguments, with:
 
 ~~~text
-stack --snapshot lts-23.24 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!"
+stack --snapshot lts-24.24 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!"
 ~~~
 
 `acme-missiles-0.3` (the most recent version in the package index) will be used.
@@ -231,7 +231,7 @@ 
 ~~~haskell
 {- stack script
-   -- snapshot lts-23.24
+   -- snapshot lts-24.24
    -- extra-dep acme-missiles-0.2
    -- package acme-missiles
 -}
@@ -333,7 +333,7 @@ 
 ~~~haskell
 {- stack script
-   --snapshot lts-23.24
+   --snapshot lts-24.24
 -}
 
 {-# LANGUAGE OverloadedStrings #-}
doc/commands/setup_command.md view
@@ -13,7 +13,7 @@ 
 * the version of GHC is the one required by the project. Specify the version of
   GHC as an argument to attempt to install a different version of GHC. For
-  example `stack setup 9.8.4` will attempt to install GHC 9.8.4; and
+  example `stack setup 9.10.3` will attempt to install GHC 9.10.3; and
 
 * an attempt to install is made only if the version of GHC is not already
   available to Stack. Pass the flag `--reinstall` (disabled by default) to
doc/commands/templates_command.md view
@@ -14,13 +14,14 @@ [`commercialhaskell/stack-templates`](https://github.com/commercialhaskell/stack-templates#project-template-format)
 repository on GitHub.
 
-Any GitHub, GitLab or Bitbucket repository named `stack-templates` can provide
-project template files. For example, a template file
+Any GitHub, GitLab, Bitbucket or Codeberg repository named `stack-templates`
+can provide project template files. For example, a template file
 `username/stack-templates/my-template.hsfiles` on GitHub can be identified as
 `username/my-template` when using `stack new`. The relevant service can be
 specified by a prefix: `github:` for [GitHub](https://github.com/) (the default
-service), `gitlab:` for [GitLab](https://gitlab.com), or `bitbucket:` for
-[Bitbucket](https://bitbucket.com).
+service), `gitlab:` for [GitLab](https://gitlab.com), `bitbucket:` for
+[Bitbucket](https://bitbucket.com), or `codeberg:` for
+[Codeberg](https://codeberg.org).
 
 [`commercialhaskell/stack-templates`](https://github.com/commercialhaskell/stack-templates#project-template-format)
 on GitHub is the default repository for project templates. Its username
doc/commands/unpack_command.md view
@@ -23,11 +23,11 @@ 
 !!! note
 
-    Stackage snapshots do not include directly most GHC boot packages (packages
-    that come with GHC and are included in GHC's global package database) but
-    some snapshots may include directly some boot packages. In particular, some
-    snapshots include directly `Win32` (which is a boot package on Windows)
-    while others do not.
+    Stackage snapshots are not expected to include directly GHC boot packages
+    (packages that come with GHC and are included in GHC's global package
+    database) but some such snapshots may include directly some boot packages.
+    In particular, some snapshots include directly `Win32` (which is a boot
+    package on Windows) while most do not.
 
 Otherwise, a target should specify a package name and version (for example,
 `acme-missiles-0.3`). In the case of package versions from the package index,
doc/configure/customisation_scripts.md view
@@ -27,7 +27,7 @@   installation.
 
 When `install-ghc: false`, the script is still run. That allows you to ensure
-that only your script will install GHC and Stack won't default to its own
+that only your script will install GHC and Stack will not default to its own
 installation logic, even when the script fails.
 
 The following environment variables are always available to the script:
@@ -61,7 +61,7 @@ 		#   command install $HOOK_GHC_VERSION >/dev/null
 		;;
 	git)
-		>&2 echo "Hook doesn't support installing from source"
+		>&2 echo "Hook does not support installing from source"
 		exit 1
 		;;
 	*)
@@ -83,19 +83,28 @@ set -eu
 
 case $HOOK_GHC_TYPE in
-    bindist)
-        ghcdir=$(ghcup whereis --directory ghc "$HOOK_GHC_VERSION" || ghcup run --ghc "$HOOK_GHC_VERSION" --install) || exit 3
-        printf "%s/ghc" "${ghcdir}"
-        ;;
-    git)
-        # TODO: should be somewhat possible
-        >&2 echo "Hook doesn't support installing from source"
-        exit 1
-        ;;
-    *)
-        >&2 echo "Unsupported GHC installation type: $HOOK_GHC_TYPE"
-        exit 2
-        ;;
+  bindist)
+    ghc_path=$(
+      ghcup whereis ghc "$HOOK_GHC_VERSION" ||
+      {
+        ghcup install ghc "$HOOK_GHC_VERSION" >/dev/null &&
+        ghcup whereis ghc "$HOOK_GHC_VERSION"
+      }
+    ) || {
+      >&2 echo "Installing $HOOK_GHC_VERSION via ghcup failed"
+      exit 3
+    }
+    printf "%s" "${ghc_path}"
+    ;;
+  git)
+    # TODO: should be somewhat possible
+    >&2 echo "Hook doesn't support installing from source"
+    exit 1
+    ;;
+  *)
+    >&2 echo "Unsupported GHC installation type: $HOOK_GHC_TYPE"
+    exit 2
+    ;;
 esac
 ~~~
 
doc/configure/environment_variables.md view
@@ -167,7 +167,7 @@ [project-level configuration](yaml/index.md).
 
 Overridden by: Stack's global
-[`--stack-yaml`](global_flags.md#-stack-yaml-option) option.
+[`--stack-yaml`](global_flags.md#-stack-yaml-or-w-option) option.
 
 The environment variable `STACK_YAML` can be used to specify Stack's
 project-level configuration file.
doc/configure/global_flags.md view
@@ -54,9 +54,10 @@ 
 ## `--compiler` option
 
-Pass the option `--compiler <compiler>` to specify the compiler. For further
-information, see the [`compiler`](yaml/non-project.md#compiler) non-project
-specific configuration option documentation.
+Pass the option `--compiler <compiler>` to specify the compiler (and,
+implicitly, its boot packages). For further information, see the
+[`compiler`](yaml/non-project.md#compiler) non-project specific configuration
+option documentation.
 
 ## `--custom-preprocessor-extensions` option
 
@@ -130,9 +131,10 @@ 
 Default: Disabled
 
-By default, Hpack 0.20.0 or later will decline to overwrite a Cabal file that
-has been modified manually. Pass the flag `--hpack-force` to allow Hpack to
-overwrite such a Cabal file.
+By default, Hpack 0.12.0 or later will decline to overwrite a Cabal file that
+was created by a more recent version of Hpack and Hpack 0.20.0 or later will
+decline to overwrite a Cabal file that has been modified manually. Pass the flag
+`--hpack-force` to allow Hpack to overwrite such a Cabal file.
 
 ## `--hpack-numeric-version` flag
 
@@ -172,8 +174,8 @@ Pass the option `--jobs <number_of_jobs>` to specify the number of concurrent
 jobs (Stack actions during building) to run.
 
-When [building GHC from source](yaml/non-project.md#building-ghc-from-source),
-specifies the `-j[<n>]` flag of GHC's Hadrian build system.
+When [building GHC from source](../topics/GHC_from_source.md), specifies the
+`-j[<n>]` flag of GHC's Hadrian build system.
 
 By default, Stack specifies a number of concurrent jobs equal to the number of
 CPUs (cores) that the machine has. In some circumstances, that default can cause
@@ -323,7 +325,7 @@ path to the [Stack root](../topics/stack_root.md) directory. The path must be an
 absolute one.
 
-## `--stack-yaml` option
+## `--stack-yaml` or `-w` option
 
 Default: `stack.yaml`
 
doc/configure/index.md view
@@ -1,5 +1,5 @@ ---
-Title: Configure
+title: Configure
 ---
 <div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
 
doc/configure/yaml/index.md view
@@ -73,7 +73,7 @@ Stack obtains project-level configuration from one of the following (in order of
 preference):
 
-1. A file specified by the `--stack-yaml` command line option.
+1. A file specified by the `--stack-yaml` or `-w` command line option.
 2. A file specified by the `STACK_YAML` environment variable.
 3. A file named `stack.yaml` in the current directory or an ancestor directory.
 4. A file name `stack.yaml` in the `global-project` directory in the
doc/configure/yaml/non-project.md view
@@ -293,175 +293,25 @@ 
 Command line equivalent (takes precedence): `--compiler` option
 
-Overrides the compiler version in the snapshot. Note that the `compiler-check`
-flag also applies to the version numbers. This uses the same syntax as compiler
-snapshots like `ghc-9.8.4`. This can be used to override the compiler for a
+Overrides the version of the compiler (and, implicitly, its boot packages) in
+the snapshot. Note that the `compiler-check` flag also applies to the version
+numbers. This uses the same syntax as compiler snapshots like `ghc-9.10.3`. This
+can be used to override the compiler (and, implicitly, its boot packages) for a
 Stackage snapshot, like this:
 
 ~~~yaml
-snapshot: lts-23.24
-compiler: ghc-9.8.3
+snapshot: lts-24.24
+compiler: ghc-9.10.2
 compiler-check: match-exact
 ~~~
 
-### Building GHC from source
-
 :octicons-beaker-24: Experimental
 
 [:octicons-tag-24: 2.1.1](https://github.com/commercialhaskell/stack/releases/tag/v2.1.1)
 
-Stack supports building the GHC compiler from source, using
-[Hadrian](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md) (the
-build system for GHC). The GHC version to build and to use is defined by a a Git
-commit ID and a Hadrian "flavour", with the following syntax:
-
-~~~yaml
-compiler: ghc-git-<commit_id>-<Hadrian_flavour>
-~~~
-
-In the following example the commit ID is "5be7ad..." and the flavour is
-"quick":
-
-~~~yaml
-compiler: ghc-git-5be7ad7861c8d39f60b7101fd8d8e816ff50353a-quick
-~~~
-
-By default, the code is retrieved from the main GHC repository. If you want to
-select another repository, use the `compiler-repository` option:
-
-~~~yaml
-compiler-repository: git://my/ghc/repository
-# default
-# compiler-repository: https://gitlab.haskell.org/ghc/ghc.git
-~~~
-
-Stack does not check the compiler version when it uses a compiler built from
-source. It is assumed that the built compiler is recent enough as Stack doesn't
-enable any known workaround to make older compilers work.
-
-Building the compiler can take a very long time (more than one hour). For faster
-build times, use Hadrian flavours that disable documentation generation.
-
-### Bootstrap compiler
-
-Building GHC from source requires a working GHC (known as the bootstrap
-compiler). As we use a Stack based version of Hadrian (`hadrian/build-stack` in
-GHC sources), the bootstrap compiler is configured into `hadrian/stack.yaml` and
-fully managed by Stack.
-
-!!! note
-
-    For some commit IDs, the snapshot specified in `hadrian/stack.yaml`
-    specifies a version of GHC that cannot be used to build GHC. This results in
-    GHC's `configure` script reporting messages similar to the following before
-    aborting:
-
-    ~~~text
-    checking version of ghc... 9.0.2
-    configure: error: GHC version 9.2 or later is required to compile GHC.
-    ~~~
-
-    The resolution is: (1) to specify an alternative snapshot (one that
-    specifies a sufficiently recent version of GHC) on the command line, using
-    Stack's option `--snapshot <snapshot>`. Stack will use that snapshot when
-    running GHC's `configure` script; and (2) to set the contents of the `STACK`
-    environment variable to be `stack --snapshot <snapshot>`. Hadrian's
-    `build-stack` script wil refer to that environment variable for the Stack
-    command it uses.
-
-### Hadrian prerequisites
-
-The Hadrian build system has certain
-[prerequisites](https://gitlab.haskell.org/ghc/ghc/-/wikis/building/preparation).
-It requires certain versions of the `happy` and `alex` executables on the PATH.
-Stack will build and install `happy` and `alex`, if not already on the PATH.
-
-=== "macOS"
-
-    Hadrian requires, or case use, certain tools or Python packages that do not
-    come with macOS by default and that need to be installed using `brew` or
-    `pip3` (Python). Hadrian's LaTeX documentation also requires the
-    [DejaVu fonts](https://dejavu-fonts.github.io/) to be installed.
-
-    ~~~zsh
-    brew install python@3.11
-    # GHC uses a Python script named `boot`.
-    brew install automake
-    # Tool for generating GNU Standards-compliant Makefiles.
-    brew install texinfo
-    # Official documentation format of the GNU project.
-    pip3 install -U sphinx
-    # Sphinx is the Python documentation generator.
-    brew install --cask mactex
-    # MacTeX: Full TeX Live distribution with GUI applications
-    ~~~
-
-=== "Windows"
-
-    Hadrian requires, or can use, certain MSYS2 or Python packages that do not
-    come with the Stack-supplied MSYS2 by default and need to be installed
-    using `pacman` (MSYS2) or `pip` (Python). Hadrian's LaTeX documentation also
-    requires the [DejaVu fonts](https://dejavu-fonts.github.io/) to be
-    installed.
-
-    ~~~pwsh
-    stack exec -- pacman --sync --refresh
-    # Synchronize MSYS2 package databases
-    stack exec -- pacman --sync mingw-w64-x86_64-python-pip
-    # The PyPA recommended tool (pip) for installing Python packages. Also
-    # installs Python as a dependency. GHC uses a Python script named `boot`.
-    # The package must be the one from the `mingw64` MSYS2 repository, as Python
-    # from the `msys` repository cannot interpret Windows file paths correctly.
-    stack exec -- pacman --sync mingw-w64-x86_64-autotools
-    # The GNU autotools build system, including `autoreconf`, `aclocal`
-    # and `make`. GHC uses a sh script named `configure` which is itself created
-    # from a file named `configure.ac`.
-    stack exec -- pacman --sync patch
-    # A utility to apply patch files to original sources.
-    stack exec -- pacman --sync texinfo
-    # Utilities to work with and produce manuals, ASCII text, and on-line
-    # documentation from a single source file, including `makeinfo`.
-    stack exec -- pacman --sync mingw-w64-x86_64-ca-certificates
-    # Common CA (certificate authority) certificates.
-    stack exec -- pip install -U sphinx
-    # Sphinx is the Python documentation generator.
-    ~~~
-
-    Hadrian may require certain LaTeX packages and may prompt for these to be
-    installed duing the build process.
-
-### Global packages
-
-The GHC compiler you build from sources may depend on unreleased versions of
-some global packages (e.g. Cabal). It may be an issue if a package you try to
-build with this compiler depends on such global packages because Stack may not
-be able to find versions of those packages (on Hackage, etc.) that are
-compatible with the compiler.
-
-The easiest way to deal with this issue is to use the
-[`drop-packages`](project.md#drop-packages) project-specific configuration
-option to drop the offending packages as follows. Instead of using the packages
-specified in the snapshot, the global packages bundled with GHC will be used.
-
-~~~yaml
-drop-packages:
-- Cabal
-- ...
-~~~
-
-Another way to deal with this issue is to add the relevant packages as
-[`extra-deps`](project.md#extra-deps) built from source. To avoid mismatching
-versions, you can use exactly the same commit id you used to build GHC as
-follows:
-
-~~~
-extra-deps:
-- git: https://gitlab.haskell.org/ghc/ghc.git
-  commit: '5be7ad7861c8d39f60b7101fd8d8e816ff50353a'
-  subdirs:
-    - libraries/Cabal/Cabal
-    - libraries/...
-~~~
+Stack also supports building the GHC compiler from source. For further
+information, see the [building GHC from source](../../topics/GHC_from_source.md)
+documentation.
 
 ## compiler-check
 
@@ -594,7 +444,7 @@ Possible values are:
 
 ~~~yaml
-dump-logs: none    # don't dump the content of any log files
+dump-logs: none    # do not dump the content of any log files
 dump-logs: warning # dump the content of any log files that include GHC warnings
 dump-logs: all     # dump the content of all log files
 ~~~
@@ -861,9 +711,11 @@ Command line equivalent (takes precedence):
 [`--hpack-force` option](../global_flags.md#-no-hpack-force-flag)
 
-Whether or not to allow Hpack to overwrite a Cabal file that has been modified
-manually. By default, Hpack 0.20.0 or later will decline to overwrite such a
-Cabal file.
+Whether or not to allow Hpack to overwrite a Cabal file that was created by a
+more recent version of Hpack or has been modified manually. By default,
+Hpack 0.12.0 or later will decline to overwrite a Cabal file that was created by
+a more recent version of Hpack and Hpack 0.20.0 or later will decline to
+overwrite a Cabal file that has been modified manually.
 
 ## ignore-revision-mismatch
 
@@ -912,7 +764,7 @@ Specifies the number of concurrent jobs (principally, Stack actions during
 building - see further below) to run.
 
-When [building GHC from source](#building-ghc-from-source), specifies the
+When [building GHC from source](../../topics/GHC_from_source.md), specifies the
 `-j[<n>]` flag of GHC's Hadrian build system.
 
 In some circumstances, the default can cause some machines to run out of memory
@@ -1108,6 +960,20 @@ If the specified machine architecture value is unknown to Cabal (the library),
 should Stack notify the user of that?
 
+## notify-if-base-not-boot
+
+[:octicons-tag-24: 3.9.1](https://github.com/commercialhaskell/stack/releases/tag/v3.9.1)
+
+Default: `true`
+
+From GHC 9.12.1, `base` is not a GHC wired-in package. When using such GHC
+versions, if the specified `base` package is other than the GHC boot package,
+should Stack notify the user of that?
+
+When using GHC versions where `base` is a GHC wired-in package, Stack will
+always notify the user if the specified `base` package is other than the GHC
+boot package.
+
 ## notify-if-cabal-untested
 
 [:octicons-tag-24: 2.15.1](https://github.com/commercialhaskell/stack/releases/tag/v2.15.1)
@@ -1166,8 +1032,8 @@     keyids:
     - 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d
     - 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42
-    - 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3
     - 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921
+    - c7de58fc6a224b92b5b513f26fbb8b370f2d97c7cfe0075a951314a55734be93
     - fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0
     key-threshold: 3
     ignore-expiry: true
@@ -1193,7 +1059,7 @@ holder has signed.
 
 If the `hackage-security` key is absent, the Hackage Security configuration will
-default to that for the official Hackage server.
+default to that applicable to the official Hackage server since 2025-07-24.
 
 `key-threshold` specifies the minimum number of keyholders that must have signed
 the package index for it to be considered valid.
@@ -1203,6 +1069,10 @@ 
 !!! info
 
+    In the case of Stack 3.7.1 and before, if the `hackage-security` key is
+    absent, the Hackage Security configuration will default to that applicable
+    to the official Hackage server before 2025-07-24.
+
     Before Stack 2.1.3, the default for `ignore-expiry` was `false`. For more
     information, see
     [issue #4928](https://github.com/commercialhaskell/stack/issues/4928).
@@ -1607,7 +1477,7 @@ Command line equivalent (takes precedence): `--[no-]system-ghc` flag
 
 Enables or disables using the GHC available on the PATH. (Make sure PATH is
-explicit, i.e., don't use ~.) Useful to enable if you want to save the time,
+explicit, i.e., do not use ~.) Useful to enable if you want to save the time,
 bandwidth or storage space needed to setup an isolated GHC.
 
 In a Nix-enabled configuration, Stack is incompatible with `system-ghc: false`.
doc/configure/yaml/project.md view
@@ -40,10 +40,10 @@ resolver since a snapshot states how dependencies are resolved. There are
 currently four snapshot types:
 
-* LTS Haskell snapshots, e.g. `snapshot: lts-23.24`
-* Stackage Nightly snapshots, e.g. `snapshot: nightly-2025-06-15`
+* LTS Haskell snapshots, e.g. `snapshot: lts-24.24`
+* Stackage Nightly snapshots, e.g. `snapshot: nightly-2025-12-20`
 * No snapshot, just use packages shipped with the compiler. For GHC this looks
-  like `snapshot: ghc-9.8.4`
+  like `snapshot: ghc-9.10.3`
 * Custom snapshot, via a URL or relative file path. For further information, see
   the [snapshot location](../../topics/snapshot_location.md) documentation.
 
@@ -87,7 +87,7 @@ The `packages` key is optional. The default value, '`.`', means that the
 project has a single project package located in the current directory.
 
-A project package will shaddow a dependency of the same name.
+A project package will shadow a dependency of the same name.
 
 A package version specified in a snapshot can be shadowed by an
 [extra-dep](#extra-deps) of the same name or a [project package](#packages) of
@@ -189,11 +189,11 @@ 
 !!! info "GHC wired-in packages"
 
-    Some Haskell packages published on Hackage, for example `base` and `ghc`,
-    are referred to as 'wired-in' to one or more versions of GHC or as 'magic'.
-    They can be distinguished from normal packages by the contents of their
-    Cabal files: GHC's `-this-unit-id` option is set as the name of the package
-    without a version. For example, the `base.cabal` for `base-4.19.1.0`
+    Some Haskell packages published on Hackage, for example `base < 4.21.0.0`
+    and `ghc`, are referred to as 'wired-in' to one or more versions of GHC or
+    as 'magic'. They can be distinguished from normal packages by the contents
+    of their Cabal files: GHC's `-this-unit-id` option is set as the name of the
+    package without a version. For example, the `base.cabal` for `base-4.20.1.0`
     includes:
 
     ~~~yaml
@@ -207,17 +207,13 @@     boot packages in a build plan may limit what can be specified as an
     extra-dep.
 
-    For example, GHC boot package `ghc-9.8.2` has a dependency on `process`. Its
-    `*.conf` file identifies the dependency as `process-1.6.18.0-4fb7`. If
-    package `ghc-9.8.2` is part of a build plan and a different version of
+    For example, GHC boot package `ghc-9.10.3` has a dependency on `process`. Its
+    `*.conf` file identifies the dependency as `process-1.6.26.1-10ef`. If
+    package `ghc-9.10.3` is part of a build plan and a different version of
     `process` is specified as an extra-dep, during a build, Stack will identify
     that the build plan refers to two versions of `process` and warn that the
     build is likely to fail.
 
-    Stack treats the following as the names of 'wired-in' packages: `base`,
-    `dph-par`, `dph-seq`, `ghc-bignum`, `ghc-prim`, `ghc`, `integer-gmp`,
-    `integer-simple`, `interactive`, `rts` and `template-haskell`.
-
 ## flags
 
 Default: `{}`
@@ -258,7 +254,7 @@ [`snapshot`](#snapshot) or [`resolver`](#resolver) key, should not be included
 in our project. This can be used for a few different purposes, e.g.:
 
-* Ensure that packages you don't want used in your project cannot be used in a
+* Ensure that packages you do not want used in your project cannot be used in a
   `package.yaml` file (e.g., for license reasons)
 * When using a custom GHC build, avoid incompatible packages (see this
   [comment](https://github.com/commercialhaskell/stack/pull/4655#issuecomment-477954429)).
doc/dev_containers.md view
@@ -17,16 +17,16 @@ 
 Stack's Dev Containers provide the following tools:
 
-1.  The
-    [Haskell Toolchain](https://www.haskell.org/ghcup/install/#supported-tools)
-    ([GHC](https://www.haskell.org/ghc), Stack,
-    [Cabal (the tool)](https://cabal.readthedocs.io) and
-    [HLS](https://haskell-language-server.readthedocs.io))
-2.  [Git](https://git-scm.com)
-3.  [HLint](https://hackage.haskell.org/package/hlint)
-4.  [yamllint](https://yamllint.readthedocs.io)
-5.  [ShellCheck](https://www.shellcheck.net)
-6.  [hadolint](https://github.com/hadolint/hadolint)
+1. The
+   [Haskell Toolchain](https://www.haskell.org/ghcup/install/#supported-tools)
+   ([GHC](https://www.haskell.org/ghc), Stack,
+   [Cabal (the tool)](https://cabal.readthedocs.io) and
+   [HLS](https://haskell-language-server.readthedocs.io))
+2. [Git](https://git-scm.com)
+3. [HLint](https://hackage.haskell.org/package/hlint)
+4. [yamllint](https://yamllint.readthedocs.io)
+5. [ShellCheck](https://www.shellcheck.net)
+6. [hadolint](https://github.com/hadolint/hadolint)
 
 The tools in the Haskell Toolchain are installed at `/usr/local/bin`. HLS is
 provided in the default Dev Container only.
@@ -47,7 +47,7 @@   (Default Dev Container only)
 * [GitHub Pull Requests and Issues](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github)
 * [GitLens — Git supercharged](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
-    * Pinned to version 11.7.0 due to unsolicited AI content in recent versions
+  * Pinned to version 11.7.0 due to unsolicited AI content in recent versions
 * [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
 * [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)
 * [hadolint](https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint)
@@ -63,12 +63,13 @@ <nobr>*GHC musl*</nobr> images. They are based on Alpine Linux (that is
 [musl libc](https://musl.libc.org) and [BusyBox](https://www.busybox.net)).
 
-The images contain *unofficial* binary distributions of GHC (that is, ones not
-released by the GHC developers). That is because:
+The images contain *unofficial* and *untested* binary distributions of GHC (that
+is, ones not released by the GHC developers). That is because:
 
-1.  the official GHC binary distributions for Alpine Linux/x86_64 have known
-    bugs; and
-2.  there are no official binary distributions for Alpine Linux/AArch64.
+1. the official GHC binary distributions for Alpine Linux/x86_64 have
+   [known](https://gitlab.haskell.org/ghc/ghc/-/issues/23043)
+   [bugs](https://gitlab.haskell.org/ghc/ghc/-/issues/25093) ~~; and~~
+1. ~~there are no official binary distributions for Alpine Linux/AArch64.~~
 
 Stack's global configuration (`/etc/stack/config.yaml`) sets
 <nobr>`system-ghc: true`</nobr> and <nobr>`install-ghc: false`</nobr>. That
doc/faq.md view
@@ -53,8 +53,8 @@ ??? question "How do I use Stack with sandboxes?"
 
     A 'sandbox' is a development environment that is isolated from other parts
-    of the system. The concept of sandboxing is built in to Stack. All builds
-    are automatically isolated into separate package databases.
+    of the system. The concept of sandboxing is built into Stack. All builds are
+    automatically isolated into separate package databases.
 
 ??? question "Can I run `cabal` commands inside `stack exec`?"
 
@@ -88,7 +88,7 @@     specified by the [`snapshot`](configure/yaml/project.md#snapshot) or
     [`resolver`](configure/yaml/project.md#resolver) key.
 
-    GHC installation doesn't work for all operating systems, so in some cases
+    GHC installation does not work for all operating systems, so in some cases
     you will need to use `system-ghc` and install GHC yourself.
 
 ??? question "When I command `stack ghci` what version of GHC is used?"
@@ -107,15 +107,16 @@     subdirectory of the `stack path --programs` directory for a compatible GHC,
     requesting to install one via `stack setup` if none is found.
 
-    If you are using the [`--system-ghc`](configure/yaml/non-project.md#system-ghc)
-    flag or have configured `system-ghc: true` either in the project `stack.yaml` or
-    the global `config.yaml`, Stack will use the first GHC that it finds on your
-    PATH, falling back on its sandboxed installations only if the found GHC doesn't
-    comply with the various requirements (version, architecture) that your project
-    needs.
+    If you are using the
+    [`--system-ghc`](configure/yaml/non-project.md#system-ghc) flag or have
+    configured `system-ghc: true` either in the project `stack.yaml` or the
+    global `config.yaml`, Stack will use the first GHC that it finds on your
+    PATH, falling back on its sandboxed installations only if the found GHC does
+    not comply with the various requirements (version, architecture) that your
+    project needs.
 
-    See issue [#420](https://github.com/commercialhaskell/stack/issues/420) for a
-    detailed discussion of Stack's behavior when `system-ghc` is enabled.
+    See issue [#420](https://github.com/commercialhaskell/stack/issues/420) for
+    a detailed discussion of Stack's behavior when `system-ghc` is enabled.
 
 ??? question "How can I test that different GHC versions can build my project?"
 
@@ -125,9 +126,9 @@ 
     ~~~text
     myproject/
-      stack-ghc-9.8.4.yaml
+      stack-ghc-9.10.3.yaml
       stack-ghc-9.8.4.yaml
-      stack.yaml --> symlink to stack-ghc-9.8.4.yaml
+      stack.yaml --> symlink to stack-ghc-9.10.3.yaml
       myproject.cabal
       src/
         ...
@@ -139,21 +140,21 @@     === "Unix-like"
 
         ~~~text
-        STACK_YAML=stack-ghc-9.8.4.yaml
+        STACK_YAML=stack-ghc-9.10.3.yaml
         stack build
         ~~~
 
     === "Windows"
 
         ~~~text
-        $Env:STACK_YAML='stack-ghc-9.8.4.yaml'
+        $Env:STACK_YAML='stack-ghc-9.10.3.yaml'
         stack build
         ~~~
 
     === "Windows (Command Prompt)"
 
         ~~~text
-        set STACK_YAML=stack-ghc-9.8.4.yaml
+        set STACK_YAML=stack-ghc-9.10.3.yaml
         stack build
         ~~~
 
@@ -179,11 +180,11 @@     `~/.stack/config.yaml` to a directory on a file system with more free space.
 
     If you use Stack with Nix integration, be aware that Nix uses a `TMPDIR`
-    variable, and if it is not set Nix sets it to some subdirectory of `/run`, which
-    on most Linuxes is a Ramdir. Nix will run the builds in `TMPDIR`, therefore if
-    you don't have enough RAM you will get errors about disk space. If this happens
-    to you, please _manually_ set `TMPDIR` before launching Stack to some directory
-    on the disk.
+    variable, and if it is not set Nix sets it to some subdirectory of `/run`,
+    which on most Linuxes is a Ramdir. Nix will run the builds in `TMPDIR`,
+    therefore if you do not have enough RAM you will get errors about disk
+    space. If this happens to you, please _manually_ set `TMPDIR` before
+    launching Stack to some directory on the disk.
 
 ??? question "On Windows, `stack setup` tells me to add certain paths to the PATH instead of doing it?"
 
@@ -262,16 +263,16 @@     stack update
     ~~~
 
-    However, generally, it's not necessary with Stack: if the package index is
-    missing, or if a snapshot refers to package version that isn't available,
+    However, generally, it is not necessary with Stack: if the package index is
+    missing, or if a snapshot refers to package version that is not available,
     Stack will automatically update the package index and then try again.
 
-    If you run into a situation where Stack doesn't automatically update the
+    If you run into a situation where Stack does not automatically update the
     package index, please report it as a bug.
 
 ??? question "Is it dangerous to update the package index automatically? Can that corrupt build plans?"
 
-    No. Stack is explicit about which packages it's going to build. There are
+    No. Stack is explicit about which packages it is going to build. There are
     three sources of information to tell Stack which packages to install: the
     selected snapshot, the `extra-deps` configuration value, and your project
     packages. The only way to get Stack to change its build plan is to modify
@@ -474,19 +475,19 @@       (on AArch64; the host Stack and the image Stack must have the same version
       number).
 
-??? question "Why doesn't Stack rebuild my project when I specify `--ghc-options` on the command line?"
+??? question "Why does Stack not rebuild my project when I specify `--ghc-options` on the command line?"
 
-    Because GHC options often only affect optimization levels and warning behavior,
-    Stack doesn't recompile when it detects an option change by default. This
-    behavior can be changed though by setting the
+    Because GHC options often only affect optimization levels and warning
+    behavior, Stack does not recompile when it detects an option change by
+    default. This behavior can be changed though by setting the
     [`rebuild-ghc-options` option](configure/yaml/non-project.md#rebuild-ghc-options)
     to `true`.
 
     To force recompilation manually, use the `--force-dirty` flag. If this still
-    doesn't lead to a rebuild, add the `-fforce-recomp` flag to your
+    does not lead to a rebuild, add the `-fforce-recomp` flag to your
     `--ghc-options`.
 
-??? question "Why doesn't Stack apply my `--ghc-options` to my dependencies?"
+??? question "Why does Stack not apply my `--ghc-options` to my dependencies?"
 
     By default, Stack applies command line GHC options only to
     [project packages](configure/yaml/project.md#packages). For an explanation of
@@ -587,8 +588,8 @@     ~~~
 
     This warning is shown when compiler support of `-no-pie` is expected but
-    unavailable. It's possible to bypass the warning for a specific version of GHC
-    by modifying a global setting:
+    unavailable. It is possible to bypass the warning for a specific version of
+    GHC by modifying a global setting:
 
     ~~~bash
     # ~/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/settings
@@ -596,7 +597,8 @@     ++ ("C compiler supports -no-pie", "NO"),
     ~~~
 
-    **Note that we're fixing `ghc-8.2.2` in this case; repeat for other versions as necessary.**
+    **Note that we are fixing `ghc-8.2.2` in this case; repeat for other
+    versions as necessary.**
     You should apply this fix for the version of GHC that matches your snapshot.
 
     Issue [#4009](https://github.com/commercialhaskell/stack/issues/4009) goes into
@@ -613,11 +615,12 @@     Haskell code licensed under permissive BSD3 license, GMP library is licensed
     under LGPL, which means resulting binaries
     [have to be provided with source code or object files](http://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic).
-    That may or may not be acceptable for your situation. Current workaround is to
-    use GHC built with alternative big integer implementation called
-    `integer-simple`, which is free from LGPL limitations as it's pure Haskell and
-    does not use GMP.  Unfortunately it has yet to be available out of the box with
-    Stack. See issue [#399](https://github.com/commercialhaskell/stack/issues/399)
+    That may or may not be acceptable for your situation. The current workaround
+    is to use GHC built with alternative big integer implementation called
+    `integer-simple`, which is free from LGPL limitations as it is pure Haskell
+    and does not use GMP. Unfortunately it has yet to be available out of the
+    box with Stack. See issue
+    [#399](https://github.com/commercialhaskell/stack/issues/399)
     for the ongoing effort and information on workarounds.
 
 ??? question "I have a Windows username with a space in it and problems building"
@@ -633,7 +636,7 @@ 
     Windows is not able to find the necessary C++ libraries from the standard
     prompt because they're not in the PATH environment variable. `stack exec` works
-    because it's modifying PATH to include extra things.
+    because it is modifying PATH to include extra things.
 
     Those libraries are shipped with GHC (and, theoretically in some cases, MSYS2).
     The easiest way to find them is `stack exec which`. For example, command:
doc/glossary.md view
@@ -19,7 +19,7 @@ |FreeBSD             |A Unix-like operating system.                            |
 |GCC                 |The [GNU Compiler Collection](https://gcc.gnu.org/) or its executable `gcc`.|
 |GHC                 |The [Glasgow Haskell Compiler](https://www.haskell.org/ghc/).|
-|GHC boot package    |A package that comes with GHC, is included in GHC's global package database, and is not included in a Stackage snapshot. See the output of command `stack exec -- ghc-pkg list --global`.|
+|GHC boot package    |A package that comes with GHC, is included in GHC's global package database, and is not specified directly in a Stackage snapshot. See the output of command `stack exec -- ghc-pkg list --global`.|
 |GHC wired-in package|A GHC boot package that cannot be shaddowed with different versions of the same package. Also referred to as 'magic'.|
 |GHCi                |GHC's [interactive environment](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html).|
 |GHCJS               |A Haskell to JavaScript [compiler](https://github.com/ghcjs/ghcjs).|
@@ -49,8 +49,8 @@ |REPL                |An interactive (run-eval-print loop) programming environment.|
 |resolver            |A synonym for snapshot.                                  |
 |`Setup.hs`          |A project-specific file used by Cabal to perform setup tasks.|
-|snapshot            |A snapshot defines a GHC version, a set of packages (one version of each), and build flags or other settings.|
-|Stack               |The Haskell Tool Stack project or its executable `stack`.|
+|snapshot            |A snapshot defines a version of GHC (and, implicitly, its boot packages), a set of packages (one version of each), Cabal flags and GHC options.|
+|Stack               |The Stack project or its executable `stack`.|
 |`stack.yaml`        |A project-level configuration file used by Stack, which may also contain non-project-specific options.|
 |Stackage            |A [distribution](https://www.stackage.org/) of compatible Haskell packages.|
 |Stack root          |A directory in which Stack stores important files. See `stack path --stack-root`. On Windows, or if Stack is configured to use the XDG Base Directory Specification, Stack also stores important files outside of the Stack root.|
doc/install_and_upgrade.md view
@@ -26,7 +26,7 @@ 
     Command `stack --version` or `stack --numeric-version`.
 
-??? question "If I don't use GHCup, is there a preferred location for Stack?"
+??? question "If I do not use GHCup, is there a preferred location for Stack?"
 
     You can put the `stack` executable file anywhere on your PATH. However, a
     good location is the directory where Stack itself will install executables.
@@ -40,7 +40,7 @@         $HOME/.local/bin
         ~~~
 
-        If you don't have that directory in your PATH, you may need to update
+        If you do not have that directory in your PATH, you may need to update
         your PATH. That can be done by editing the `~/.bashrc` file.
 
     === "Windows"
@@ -53,7 +53,7 @@ 
         For example: `C:\Users\<user-name>\AppData\Roaming\local\bin`.
 
-        If you don't have that directory in your PATH, you may need to update
+        If you do not have that directory in your PATH, you may need to update
         your PATH. That can be done by searching for 'Edit Environment variables
         for your account' under Start.
 
@@ -67,7 +67,7 @@ 
         For example: `C:\Users\<user-name>\AppData\Roaming\local\bin`.
 
-        If you don't have that directory in your PATH, you may need to update
+        If you do not have that directory in your PATH, you may need to update
         your PATH. That can be done by searching for 'Edit Environment variables
         for your account' under Start.
 
@@ -352,7 +352,7 @@                     ~~~
 
                     Note that the tests fail on NixOS, so disable them with
-                    `--no-check`. Also, Haddock currently doesn't work for
+                    `--no-check`. Also, Haddock currently does not work for
                     Stack, so `--no-haddock` disables it.
 
                 3.  Install Stack to your user profile with the command:
@@ -464,7 +464,7 @@             |GHC version|LLVM versions|
             |-----------|-------------|
             |9.12.2     |11 to 15     |
-            |9.10.1     |11 to 15     |
+            |9.10.3     |11 to 15     |
             |9.8.4      |11 to 15     |
             |9.6.7      |11 to 15     |
             |9.4.8      |10 to 14     |
@@ -729,7 +729,7 @@       latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json
 
     package-index:
-    - download-prefix: http://mirrors.tuna.tsinghua.edu.cn/hackage/
+      download-prefix: http://mirrors.tuna.tsinghua.edu.cn/hackage/
     ~~~
 
 ??? question "What if I am using an HTTP proxy?"
doc/maintainers/archive/releases.md view
@@ -33,7 +33,7 @@ - Check out Stack commit to be released to `~/stack-release` (or elsewhere, in
   which case adjust following instructions)
 
-- `rm -f ~/stack-release/*.cabal`, to ensure it's regenerated
+- `rm -f ~/stack-release/*.cabal`, to ensure it is regenerated
 
 - clone https://github.com/nh2/static-haskell-nix recursively (last known to
   work with commit 725ceb2479637b3b3ab29298a1bc0e48c54984c9)
doc/maintainers/releases.md view
@@ -22,23 +22,27 @@ 
 ## Pre-release checks
 
-1.  Check for any important issues that should be dealt with before release.
+1.  Check that Stack is built against the most recent version of `hpack`
+    released on Hackage. If not, create an issue and/or raise a pull request
+    accordingly.
 
-2.  Check for un-merged pull requests that should be merged before release.
+2.  Check for any important issues that should be dealt with before release.
 
-3.  Ensure the `release` and `stable` branches are merged to the `master`
+3.  Check for un-merged pull requests that should be merged before release.
+
+4.  Ensure the `release` and `stable` branches are merged to the `master`
     branch.
 
-4.  Check the copyright dates, and update if needed.
+5.  Check the copyright dates, and update if needed.
 
-5.  Check the backwards compatibility section of `CONTRIBUTING.md` is up to
+6.  Check the backwards compatibility section of `CONTRIBUTING.md` is up to
     date.
 
-6.  Ensure CI matrices in docs (travis-complex, appveyor, azure) have current
+7.  Ensure CI matrices in docs (travis-complex, appveyor, azure) have current
     stackage snapshots and GHC versions (e.g.
     https://github.com/commercialhaskell/stack/pull/4565/files)
 
-7.  Update any `stack-*.yaml` that uses a `nightly` snapshot to the latest
+8.  Update any `stack-*.yaml` that uses a `nightly` snapshot to the latest
     nightly (go over the extra-deps too) and ensure the project builds and tests
     pass. For example, command:
 
@@ -46,14 +50,14 @@     stack build --stack-yaml=… --haddock --test --bench --no-run-benchmarks
     ~~~
 
-8.  The Windows installer is built using an
+9.  The Windows installer is built using an
     [NSIS compiler](https://nsis.sourceforge.io/Main_Page). Check that the NSIS
     compiler that will be used is capable of handling
     [large strings](https://nsis.sourceforge.io/Special_Builds).
 
-9.  Ensure the integration tests pass on Linux, macOS and Windows.
+10. Ensure the integration tests pass on Linux, macOS and Windows.
 
-10. Some people prefer, or need, to build Stack with Cabal (the tool). Check
+11. Some people prefer, or need, to build Stack with Cabal (the tool). Check
     that `cabal.project` is up to date (the specified `with-compiler:`). Check
     that `cabal.config` is up to date and is not missing dependencies relevant
     on Windows and non-Windows operating systems, following the instructions in
doc/maintainers/stack_errors.md view
@@ -5,7 +5,7 @@ In connection with considering Stack's support of the
 [Haskell Error Index](https://errors.haskell.org/) initiative, this page seeks
 to take stock of the errors that Stack itself can raise, by reference to the
-`master` branch of the Stack repository. Last updated: 2025-05-12.
+`master` branch of the Stack repository. Last updated: 2025-08-16.
 
 *   `Stack.main`: catches exceptions from action `commandLineHandler`.
 
@@ -65,7 +65,7 @@         [S-4639] = NoArgumentsBug
         ~~~
 
-    -   `Stack.Clean.CleanException`
+    -   `Stack.Clean.CleanPrettyException`
 
         ~~~haskell
         [S-9463] = NonLocalPackages [PackageName]
@@ -110,9 +110,14 @@ 
         ~~~haskell
         [S-7071] = DependencyNotFoundBug GhcPkgId
-        [S-7151] | PackageNotFoundBug PackageName
         ~~~
 
+    -   `Stack.DependencyGraph.DependencyGraphPrettyException`
+
+        ~~~haskell
+        [S-7151] | PackageNotFound PackageName
+        ~~~
+
     -   `Stack.Exec.ExecException`
 
         ~~~haskell
@@ -676,7 +681,7 @@ 
     ~~~text
     [S-2804] forbidden upload
-    Usually means: you've already uploaded this package/version combination
+    Usually means: you have already uploaded this package/version combination
     Ignoring error and continuing, full message from Hackage below:
     <Hackage_message>
     ~~~
doc/maintainers/team_process.md view
@@ -5,7 +5,7 @@ ## Purpose of this document
 
 This guide is intended to formalize the process by which the `Stack` maintainer
-team operates. We expect it'll evolve over time as experience makes clearer
+team operates. We expect it will evolve over time as experience makes clearer
 what works best in practice.
 
 Having a well-documented set of processes and responsibilities has been
@@ -41,7 +41,7 @@ ## Issue triage
 
 The maintainer team provides ongoing review and responses to newly-filed GitHub
-issues and pull requests. From experience, we find it's easiest to have a
+issues and pull requests. From experience, we find it is easiest to have a
 single person "on call" at any given time. Therefore, the team rotates shifts
 on a weekly basis. The "on call" triager is responsible for:
 
@@ -118,20 +118,20 @@ Perhaps the requester is unaware of the extent to which his or her change would
 impact other people's workflows or related components in the code. Conversely,
 they may have a deep understanding of its implications and feel strongly that
-it would be a valuable improvement, whereas it's not so clear to the triager.
+it would be a valuable improvement, whereas it is not so clear to the triager.
 
 Discerning which requests should be considered "small" and which warrant
 broader collaboration is admittedly an inexact science. Use your best judgment
-and don't sweat the occasional mistake if you approve something you thought was
-small but ultimately wasn't.
+and do not sweat the occasional mistake if you approve something you thought was
+small but ultimately was not.
 
-In the case of medium-to-large sized feature requests, it's best to solicit
+In the case of medium-to-large sized feature requests, it is best to solicit
 feedback from at least one or two of the core `Stack` developers. You may use
 GitHub @mentions to draw the relevant contributors' attention to the issue in
-question. If you're not sure who's best to consult you should ask on
+question. If you are not sure who's best to consult you should ask on
 `#stack-collaborators`.
 
-Try to be clear to the requester that you're opening the discussion up to more
+Try to be clear to the requester that you are opening the discussion up to more
 participants and that the proposal will require thoughtful consideration
 (probably a majority vote) before any decision is made.
 
@@ -189,7 +189,7 @@ future." Before this policy existed, issues actually meant "maybe someone will
 deal with this someday."
 
-The policy for closing an issue depends entirely on the type of issue we're
+The policy for closing an issue depends entirely on the type of issue we are
 looking at.
 
 When closing an issue, please provide a brief explanation for why the issue was
@@ -201,7 +201,7 @@     The following sections establish rules under which a bug report will be
     closed by the maintainer team. The goal is to avoid a situation where issues
     linger in an indeterminate state. The maintainer team is allowed to
-    disregard these "rules" at any point. In other words: the goal isn't to
+    disregard these "rules" at any point. In other words: the goal is not to
     allow people to "lawyer" issues.
 
 ### Discussion
+ doc/topics/GHC_from_source.md view
@@ -0,0 +1,237 @@+<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
+
+# Building GHC from source
+
+:octicons-beaker-24: Experimental
+
+[:octicons-tag-24: 2.1.1](https://github.com/commercialhaskell/stack/releases/tag/v2.1.1)
+
+Stack supports building the GHC compiler from source, using
+[Hadrian](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md) (the
+build system for GHC). The GHC version to be built and used is defined by a
+Git commit ID and a Hadrian "flavour", with the following syntax in a YAML
+configuration file:
+
+~~~yaml
+compiler: ghc-git-<commit_id>-<Hadrian_flavour>
+~~~
+
+In the following example the commit ID is "5be7ad..." and the flavour is
+"quick":
+
+~~~yaml
+compiler: ghc-git-5be7ad7861c8d39f60b7101fd8d8e816ff50353a-quick
+~~~
+
+The [`-j`, `--jobs` option](../configure/global_flags.md#-jobs-or-j-option) at
+the command line or the [`jobs`](../configure/yaml/non-project.md#jobs) option
+in a YAML configuraton file can be used to specify Hadrian's `-j[<n>]` flag.
+
+By default, the code is retrieved from the main GHC repository. If you want to
+select another repository, use the `compiler-repository` option in a YAML
+configuration file:
+
+~~~yaml
+compiler-repository: git://my/ghc/repository
+# default
+# compiler-repository: https://gitlab.haskell.org/ghc/ghc.git
+~~~
+
+By default, the Hadrian build target is `reloc-binary-dist` on Windows and
+`binary-dist` on other operating systems. If you want to specify another
+Hadrian build target, use the `compiler-target` option in a YAML configuration
+file:
+
+~~~yaml
+compiler-target: binary-dist
+# default (Windows)
+# compiler-target: reloc-binary-dist
+# default (non-Windows)
+# compiler-target: binary-dist
+~~~
+
+By default, Stack assumes that the path to the binary distribution built by
+Hadrian is `_build/reloc-bindist` on Windows and `_build/bindist` on other
+operating systems. If you want to specify another path, use the
+`compiler-bindist-path` option in a YAML configuration file:
+
+~~~yaml
+compiler-bindist-path: _build/bindist
+# default (Windows)
+# compiler-bindist-path: _build/reloc-bindist
+# default (non-Windows)
+# compiler-bindist-path: _build/bindist
+~~~
+
+!!! note
+
+    The Hadrian build target `reloc-binary-dist` was introduced with Git commit
+    id
+    [`fe23629b147d419053052e6e881f6e8ddfbf3bae`](https://gitlab.haskell.org/ghc/ghc/-/commit/fe23629b147d419053052e6e881f6e8ddfbf3bae).
+
+    Once introduced, the target must be used on Windows.
+
+Stack does not check the compiler version when it uses a compiler built from
+source. It is assumed that the built compiler is recent enough as Stack does not
+enable any known workaround to make older compilers work.
+
+Building the compiler can take a very long time (more than one hour). For faster
+build times, use Hadrian flavours that disable documentation generation.
+
+!!! note
+
+    The building of the compiler can require the creation of symbolic links
+    (symlinks). On Windows, symlinks can only be created by processes with
+    Administrator privileges unless Windows' Developer Mode has been set.
+
+### Bootstrap compiler
+
+Building GHC from source requires a working GHC (known as the bootstrap
+compiler). As we use a Stack based version of Hadrian (`hadrian/build-stack` in
+GHC sources), the bootstrap compiler is configured into `hadrian/stack.yaml` and
+fully managed by Stack.
+
+!!! note
+
+    For some commit IDs, the snapshot specified in `hadrian/stack.yaml`
+    specifies a version of GHC that cannot be used to build GHC. This results in
+    GHC's `configure` script reporting messages similar to the following before
+    aborting:
+
+    ~~~text
+    checking version of ghc... 9.0.2
+    configure: error: GHC version 9.2 or later is required to compile GHC.
+    ~~~
+
+    The resolution is:
+
+    1.  to specify an alternative snapshot (one that specifies a sufficiently
+        recent version of GHC) on the command line, using Stack's option
+        `--snapshot <snapshot>`. Stack will use that snapshot when running GHC's
+        `configure` script; and
+
+    2.  to set the contents of the `STACK` environment variable to be
+        `stack --snapshot <snapshot>`. If `<snapshot>` is a path to a local YAML
+        file, it needs to be an absolute one. Hadrian's `build-stack` script
+        will refer to that environment variable for the Stack command it uses.
+
+### Hadrian prerequisites
+
+The Hadrian build system has certain
+[prerequisites](https://gitlab.haskell.org/ghc/ghc/-/wikis/building/preparation).
+It requires certain versions of the `happy` and `alex` executables on the PATH.
+Stack will build and install `happy` and `alex`, if not already on the PATH.
+
+!!! note
+
+    If `happy` and/or `alex` is already on the PATH, it may not be a version
+    that Hadrian supports. In that case, you may wish to remove that version
+    from the PATH and ensure that the package version specified by
+    `hadrian/stack.yaml` or, if applicable, via the contents of the `STACK` environment variable is an appropriate one.
+
+!!! note
+
+    `alex-3.5.0.0` removed `-v` as an alias for `--version` and added `-v` as an
+    alias for `--verbose` (a flag that is not implemented as of `alex-3.5.4.0`).
+
+    Hadrian may expect `-v` to be an alias for `--version`.
+
+=== "macOS"
+
+    Hadrian requires, or case use, certain tools or Python packages that do not
+    come with macOS by default and that need to be installed using `brew` or
+    `pip3` (Python). Hadrian's LaTeX documentation also requires the
+    [DejaVu fonts](https://dejavu-fonts.github.io/) to be installed.
+
+    ~~~zsh
+    brew install python@3.11
+    # GHC uses a Python script named `boot`.
+    brew install automake
+    # Tool for generating GNU Standards-compliant Makefiles.
+    brew install texinfo
+    # Official documentation format of the GNU project.
+    pip3 install -U sphinx
+    # Sphinx is the Python documentation generator.
+    brew install --cask mactex
+    # MacTeX: Full TeX Live distribution with GUI applications
+    ~~~
+
+=== "Windows"
+
+    Hadrian requires, or can use, certain MSYS2 or Python packages that do not
+    come with the Stack-supplied MSYS2 by default and need to be installed
+    using `pacman` (MSYS2) or `pip` (Python). Hadrian's LaTeX documentation also
+    requires the [DejaVu fonts](https://dejavu-fonts.github.io/) to be
+    installed.
+
+    ~~~pwsh
+    stack exec -- pacman --sync --refresh
+    # Synchronize MSYS2 package databases
+    stack exec -- pacman --sync mingw-w64-x86_64-python-pip
+    # The PyPA recommended tool (pip) for installing Python packages. Also
+    # installs Python as a dependency. GHC uses a Python script named `boot`.
+    # The package must be the one from the `mingw64` MSYS2 repository, as Python
+    # from the `msys` repository cannot interpret Windows file paths correctly.
+    stack exec -- pacman --sync mingw-w64-x86_64-autotools
+    # The GNU autotools build system, including `autoreconf`, `aclocal`
+    # and `make`. GHC uses a sh script named `configure` which is itself created
+    # from a file named `configure.ac`.
+    stack exec -- pacman --sync patch
+    # A utility to apply patch files to original sources.
+    stack exec -- pacman --sync texinfo
+    # Utilities to work with and produce manuals, ASCII text, and on-line
+    # documentation from a single source file, including `makeinfo`.
+    stack exec -- pacman --sync mingw-w64-x86_64-ca-certificates
+    # Common CA (certificate authority) certificates.
+    stack exec -- pacman -sync mingw-w64-x86_64-python-sphinx
+    # Sphinx is the Python documentation generator.
+    stack exec -- pacman -sync mingw-w64-x86_64-texlive-full
+    # The TeX Live distribution.
+    ~~~
+
+    Hadrian may require certain LaTeX packages and may prompt for these to be
+    installed duing the build process.
+
+    !!! note
+
+        Before commit
+        [cdddeb0f1280b40cc194028bbaef36e127175c4c](https://gitlab.haskell.org/ghc/ghc/-/commit/cdddeb0f1280b40cc194028bbaef36e127175c4c)
+        the GHC project did not support `autoconf >= 2.72`.
+
+        MSYS2 can be
+        [configured](https://www.msys2.org/docs/autotools/#autoconf-wrapper) to
+        use an earlier version of `autoconf` than the latest version.
+
+### Global packages
+
+The GHC compiler you build from sources may depend on unreleased versions of
+some global packages (e.g. Cabal). It may be an issue if a package you try to
+build with this compiler depends on such global packages because Stack may not
+be able to find versions of those packages (on Hackage, etc.) that are
+compatible with the compiler.
+
+The easiest way to deal with this issue is to use the
+[`drop-packages`](../configure/yaml/project.md#drop-packages)
+project-specific configuration option to drop the offending packages as follows.
+Instead of using the packages specified in the snapshot, the global packages
+bundled with GHC will be used.
+
+~~~yaml
+drop-packages:
+- Cabal
+- ...
+~~~
+
+Another way to deal with this issue is to add the relevant packages as
+[`extra-deps`](../configure/yaml/project.md#extra-deps) built from source. To
+avoid mismatching versions, you can use exactly the same commit id you used to
+build GHC as follows:
+
+~~~
+extra-deps:
+- git: https://gitlab.haskell.org/ghc/ghc.git
+  commit: '5be7ad7861c8d39f60b7101fd8d8e816ff50353a'
+  subdirs:
+    - libraries/Cabal/Cabal
+    - libraries/...
+~~~
doc/topics/Stack_and_VS_Code.md view
@@ -150,9 +150,9 @@ 
         Each time that a snapshot is used that references a different version of
         GHC, then GHCup must be used to install it (if GHCup has not already
-        installed that version). For example, to use `snapshot: lts-23.24`
-        (GHC 9.8.4), the command `ghcup install ghc 9.8.4` must have been used
-        to install GHC 9.8.4. That may be a minor inconvenience for some people,
+        installed that version). For example, to use `snapshot: lts-24.24`
+        (GHC 9.10.3), the command `ghcup install ghc 9.10.3` must have been used
+        to install GHC 9.10.3. That may be a minor inconvenience for some people,
         as one the primary benefits of Stack over other tools for building
         Haskell code has been that Stack automatically ensures that the
         necessary version of GHC is available.
doc/topics/azure_ci.md view
@@ -44,8 +44,8 @@       It is likely going to be necessary to modify this configuration to match
       the needs of your project, such as tweaking the build matrix to alter
       which GHC versions you test against, or to specify GHC-version-specific
-      `stack.yaml` files if necessary. Don't be surprised if it doesn't work the
-      first time around. See the multiple GHC section below for more
+      `stack.yaml` files if necessary. Do not be surprised if it does not work
+      the first time around. See the multiple GHC section below for more
       information.
 
 ## Creating Azure Pipelines
@@ -131,7 +131,7 @@ ### Multiple GHC - parametrised builds
 
 For different GHC versions, you probably want to use different project-level
-configuration files (`stack.yaml`, by default). If you don't want to put a
+configuration files (`stack.yaml`, by default). If you do not want to put a
 specific `stack.yaml` for a particular snapshot and still want to test it, you
 have specify your snapshot argument in `ARGS` environment variable (you will see
 an example below).
doc/topics/custom_snapshot.md view
@@ -4,9 +4,19 @@ 
 [:octicons-tag-24: 2.1.1](https://github.com/commercialhaskell/stack/releases/tag/v2.1.1)
 
-Snapshots provide a list of packages to use, along with flags, GHC options, and
-a few other settings. Snapshots may extend any other snapshot that can be
-specified in a [`snapshot`](../configure/yaml/project.md#snapshot) or
+A snapshot specifies: (a) a version of GHC and, implicitly, its boot packages;
+(b) usually, directly, specific versions of a list of packages; (c) sometimes,
+Cabal flags for certain packages; and (d) sometimes, GHC options.
+
+!!! info
+
+    Stackage snapshots are not expected to include directly any boot packages
+    but some such snapshots may include directly some boot packages.  In
+    particular, some snapshots include directly `Win32` (which is a boot package
+    on Windows) while most do not.
+
+Snapshots may extend any other snapshot that can be specified in a
+[`snapshot`](../configure/yaml/project.md#snapshot) or
 [`resolver`](../configure/yaml/project.md#resolver) key. The packages specified
 follow the same syntax for dependencies in Stack's project-level configuration
 files. Unlike the `extra-deps` key, however, no support for local directories is
@@ -18,8 +28,12 @@     for snapshot specification.
 
 ~~~yaml
-snapshot: lts-23.24 # Inherits GHC version and package set
-compiler: ghc-9.8.3 # Overwrites GHC version in the snapshot, optional
+# Inherits a specific GHC version and, implicitly, its boot packages and
+# specific versions of a set of other packages:
+snapshot: lts-24.24
+# Overwrites the version of GHC (and, implicitly, its boot packages) specified
+# in the snapshot (optional):
+compiler: ghc-9.10.2
 
 # Additional packages, follows extra-deps syntax
 packages:
@@ -62,35 +76,36 @@ 
 ### Overriding the compiler
 
-The following snapshot specification will be identical to `lts-23.24`, but
-instead use `ghc-9.8.3` instead of `ghc-9.8.4`:
+The following snapshot specification will be identical to `lts-24.24`, but
+instead use `ghc-9.10.2` and its boot packages instead of `ghc-9.10.3` and its
+boot packages:
 
 ~~~yaml
-snapshot: lts-23.24
-compiler: ghc-9.8.3
+snapshot: lts-24.24 # GHC 9.10.3
+compiler: ghc-9.10.2
 ~~~
 
 ### Dropping packages
 
-The following snapshot specification will be identical to `lts-23.24`, but
+The following snapshot specification will be identical to `lts-24.24`, but
 without the `text` package in our snapshot. Removing this package will cause all
 the packages that depend on `text` to be unbuildable, but they will still be
 present in the snapshot.
 
 ~~~yaml
-snapshot: lts-23.24
+snapshot: lts-24.24
 drop-packages:
 - text
 ~~~
 
 ### Hiding packages
 
-The following snapshot specification will be identical to `lts-23.24`, but the
+The following snapshot specification will be identical to `lts-24.24`, but the
 `text` package will be hidden when registering. This will affect, for example,
 the import parser in the script command.
 
 ~~~yaml
-snapshot: lts-23.24
+snapshot: lts-24.24
 hidden:
 - text
 ~~~
@@ -101,13 +116,13 @@ [ghc-options](../configure/yaml/non-project.md#ghc-options) key for build
 configuration.
 
-The following snapshot specification will be identical to `lts-23.24`, but
+The following snapshot specification will be identical to `lts-24.24`, but
 provides `-O1` as a ghc-option for `text`:
 
 ~~~yaml
-snapshot: lts-23.24
+snapshot: lts-24.24
 packages:
-- text-2.0.2
+- text-2.1.2
 ghc-options:
   text: -O1
 ~~~
@@ -124,13 +139,13 @@ 
 In order to specify Cabal flags for a package, you use the same syntax as the
 [flags](../configure/yaml/project.md#flags) key for build configuration. The
-following snapshot specification will be identical to `lts-23.24`, but
+following snapshot specification will be identical to `lts-24.24`, but
 it enables the `developer` Cabal flag:
 
 ~~~yaml
-snapshot: lts-23.24
+snapshot: lts-24.24
 packages:
-- text-2.0.2
+- text-2.1.2
 flags:
   text:
     developer: true
doc/topics/developing_on_windows.md view
@@ -62,8 +62,8 @@ ## Setup.hs ##
 
 `Setup.hs` is automatically run inside the Stack environment. So when you need
-to launch another tool you don't need to prefix the command with `stack exec --`
-within the custom `Setup.hs` file.
+to launch another tool you do not need to prefix the command with 
+`stack exec --` within the custom `Setup.hs` file.
 
 ## Pacman packages to install for common Haskell packages ##
 
doc/topics/docker_integration.md view
@@ -307,10 +307,11 @@ ### Volume-mounts and ephemeral containers
 
 Since filesystem changes outside of the volume-mounted project directory are not
-persisted across runs, this means that if you `stack exec sudo apt-get install some-ubuntu-package`,
-that package will be installed but then the container it's
-installed in will disappear, thus causing it to have no effect. If you wish to
-make this kind of change permanent, see later instructions for how to create a
+persisted across runs, this means that if you
+`stack exec sudo apt-get install some-ubuntu-package`, that package will be
+installed but then the container it is installed in will disappear, thus causing
+it to have no effect. If you wish to make this kind of change permanent, see 
+later instructions for how to create a
 [derivative Docker image](#derivative-image).
 
 Inside the container, your home directory is a special location that volume-
@@ -339,8 +340,8 @@ might be better to use a persistent container in which you can install Ubuntu
 packages. You could get that by running something like
 `stack --docker-container-name=NAME --docker-persist exec bash`. This
-means when the container exits, it won't be deleted. You can then restart it
-using `docker start -a -i NAME`. It's also possible to detach from a container
+means when the container exits, it will not be deleted. You can then restart it
+using `docker start -a -i NAME`. It is also possible to detach from a container
 while it continues running in the background using by pressing Ctrl-P Ctrl-Q,
 and then reattach to it using `docker attach NAME`.
 
@@ -354,7 +355,7 @@ Creating your own custom derivative image can be useful if you need to install
 additional Ubuntu packages or make other changes to the operating system. Here
 is an example (replace `stack-build:custom` if you prefer a different name for
-your derived container, but it's best if the repo name matches what you're
+your derived container, but it is best if the repo name matches what you are
 deriving from, only with a different tag, to avoid recompilation):
 
     ;;; On host
@@ -384,7 +385,7 @@ 
 The easiest way to create your own custom image us by extending FP Complete's
 images, but if you prefer to start from scratch, most images that include the
-basics for building code with GHC will work. The image doesn't even, strictly
+basics for building code with GHC will work. The image does not even, strictly
 speaking, need to include GHC, but it does need to have libraries and tools that
 GHC requires (e.g., libgmp, gcc, etc.).
 
@@ -392,7 +393,7 @@ 
 * Create a user and group named `stack`, and create a `~/.stack` directory for
   it. Any build plans and caches from it will be copied from the image by Stack,
-  meaning they don't need to be downloaded separately.
+  meaning they do not need to be downloaded separately.
 * Any packages in GHC's global package database will be available. This can be
   used to add private libraries to the image, or the make available a set of
   packages from an LTS release.
@@ -410,7 +411,7 @@ they are least likely to give you trouble.  On Ubuntu, `aufs` is the default for
 new installations, but older installations sometimes used `devicemapper`.
 
-The `devicemapper` storage driver's doesn't work well with large filesystems,
+The `devicemapper` storage driver's does not work well with large filesystems,
 and we have experienced other instabilities with it as well. We recommend
 against its use.
 
@@ -430,7 +431,7 @@ the filesystem, so fixing this requires reformatting and passing the `-N`
 argument to mkfs.ext4.
 
-### Name resolution doesn't work from within container
+### Name resolution does not work from within container
 
 On Ubuntu 12.04, by default `NetworkManager` runs `dnsmasq` service, which sets
 `127.0.0.1` as your DNS server. Since Docker containers cannot access this
doc/topics/editor_integration.md view
@@ -9,7 +9,7 @@ 
 ## Shell auto-completion
 
-Love tab-completion of commands? You're not alone. If you're on bash, just run
+Love tab-completion of commands? You are not alone. If you are on bash, just run
 the following command (or add it to `.bashrc`):
 
 ~~~text
doc/topics/haskell_and_c_code.md view
@@ -83,7 +83,7 @@ 
 The project's `stack.yaml` file only needs to identify a snapshot:
 ~~~yaml
-snapshot: lts-23.24 # GHC 9.8.4
+snapshot: lts-24.24 # GHC 9.10.3
 ~~~
 
 This example project can be built with Stack in the normal way (`stack build`),
@@ -220,7 +220,7 @@ 
 The project's `stack.yaml` file only needs to identify a snapshot:
 ~~~yaml
-snapshot: lts-23.24 # GHC 9.8.4
+snapshot: lts-24.24 # GHC 9.10.3
 ~~~
 
 This example project can be built with Stack in the normal way (`stack build`),
doc/topics/lock_files.md view
@@ -9,7 +9,7 @@ 
 * Entering all of the information to fully provide reproducibility is tedious.
   This would include things like Hackage revisions, hashes of remote tarballs,
-  etc. Users don't want to enter this information.
+  etc. Users do not want to enter this information.
 
 * Many operations in Stack rely upon a "snapshot hash," which transitively
   includes the completed information for all of these dependencies. If any of
@@ -69,7 +69,7 @@ ~~~
 
 The `lts-19.22` information is also incomplete. While we assume in general that
-Haskell LTS snapshots never change, there's nothing that prohibits that from
+Haskell LTS snapshots never change, there is nothing that prohibits that from
 happening. Instead, the complete version of that key is:
 
 ~~~yaml
@@ -79,7 +79,7 @@   sha256: 5098594e71bdefe0c13e9e6236f12e3414ef91a2b89b029fd30e8fc8087f3a07
 ~~~
 
-Users don't particularly feel like writing all of that. Therefore, it's common
+Users do not particularly feel like writing all of that. Therefore, it is common
 to see _incomplete_ information in a `stack.yaml` file.
 
 ## Recursive snapshot layers
@@ -164,7 +164,7 @@ ~~~
 
 then Stack will use a lock file in the location `my-stack.yaml.lock`. For the
-rest of this document, we'll assume that the files are simply `stack.yaml` and
+rest of this document, we will assume that the files are simply `stack.yaml` and
 `stack.yaml.lock`.
 
 If the lock file does not exist, subject to Stack's
doc/topics/nix_integration.md view
@@ -11,10 +11,10 @@   libraries and commands required to build the project are automatically built
   using Nix and managed locally for each project. These system packages never
   conflict with any existing versions of these libraries on your system. That
-  they are managed locally to the project means that you don't need to alter
+  they are managed locally to the project means that you do not need to alter
   your system in any way to build any odd project pulled from the Internet; and
 
-* implicit sharing of system packages between projects. This means you don't
+* implicit sharing of system packages between projects. This means you do not
   have more copies on-disk than you need.
 
 The Nix package manager is a pre-requisite for integration. On Linux (including
@@ -145,11 +145,11 @@           pkgs.zlib # External C library needed by some Haskell packages
         ];
 
-        # Wrap Stack to work with our Nix integration. We don't want to modify
-        # stack.yaml so non-Nix users don't notice anything.
-        # - no-nix: We don't want Stack's way of integrating Nix.
+        # Wrap Stack to work with our Nix integration. We do not want to modify
+        # stack.yaml so non-Nix users do not notice anything.
+        # - no-nix: We do not want Stack's way of integrating Nix.
         # --system-ghc    # Use the existing GHC on PATH (will come from this Nix file)
-        # --no-install-ghc  # Don't try to install GHC if no matching GHC found on PATH
+        # --no-install-ghc  # Do not try to install GHC if no matching GHC found on PATH
         stack-wrapped = pkgs.symlinkJoin {
           name = "stack"; # will be available as the usual `stack` in terminal
           paths = [ pkgs.stack ];
@@ -177,7 +177,7 @@ ~~~
 
 Check-in this `flake.nix` to your project's repository. Run the `nix develop`
-command (it searches for `flake.nix` by default) and you'll find a new
+command (it searches for `flake.nix` by default) and you WIll find a new
 `flake.lock` file. That file that pins the precise nixpkgs package set. Check-in
 that `flake.lock` file as well, and every Nix developer of your project will use
 precisely the same package set.
@@ -210,7 +210,8 @@ haskell.compiler.ghc924  ghc-9.2.4
 ~~~
 
-If Nix doesn't know that version of GHC, you'll see the following error message:
+If Nix does not know that version of GHC, you will see the following error
+message:
 
 ~~~sh
 nix-env -f "<nixpkgs>" -qaP -A haskell.compiler.ghc999
@@ -264,8 +265,8 @@ 
 **Note:** currently, Stack only discovers dynamic and static libraries in the
 `lib/` folder of any Nix package, and likewise header files in the `include/`
-folder. If you're dealing with a package that doesn't follow this standard
-layout, you'll have to deal with that using a custom `shell.nix` file (see
+folder. If you are dealing with a package that does not follow this standard
+layout, you will have to deal with that using a custom `shell.nix` file (see
 further below).
 
 ## External C libraries through a `shell.nix` file
@@ -360,7 +361,7 @@ ~~~
 
 **Note:** On macOS, shells are non-pure by default currently. This is due soon
-to be resolved locale issues. So on macOS you'll need to be a bit more careful
+to be resolved locale issues. So on macOS you will need to be a bit more careful
 to check that you really have listed all dependencies.
 
 ## Nix package sources
@@ -369,7 +370,7 @@ "package set") similar to how Stackage organizes Haskell packages.  By default,
 `nix-shell` will look for the "nixpkgs" package set located by your `NIX_PATH`
 environment variable. This package set can be different depending on when you
-installed Nix and which nixpkgs channel you're using (similar to the LTS channel
+installed Nix and which nixpkgs channel you are using (similar to the LTS channel
 for stable packages and the nightly channel for bleeding edge packages in
 [Stackage](https://www.stackage.org/)). This is bad for reproducibility so that
 nixpkgs should be pinned, i.e., set to the same package set for every developer
@@ -447,10 +448,10 @@ 
 When using Stack on NixOS, you must use Stack's Nix integration to install GHC.
 That is because external C libraries in NixOS are not installed in the usual
-distribution directories. GHC installed through Stack (without Nix) can't find
-those libraries and, therefore, can't build most projects. However, GHC provided
-through Nix can be modified to find the external C libraries provided through
-Nix.
+distribution directories. GHC installed through Stack (without Nix) cannot find
+those libraries and, therefore, cannot build most projects. However, GHC
+provided through Nix can be modified to find the external C libraries provided
+through Nix.
 
 [nix-language]: https://wiki.nixos.org/wiki/Overview_of_the_Nix_Language
 [nix-manual-exprs]: http://nixos.org/manual/nix/stable/expressions/writing-nix-expressions.html
doc/topics/scripts.md view
@@ -3,7 +3,7 @@ # Stack's script interpreter
 
 Stack offers a very useful feature for running files: a script interpreter. For
-too long have Haskellers felt shackled to bash or Python because it's just too
+too long have Haskellers felt shackled to bash or Python because it is just too
 hard to create reusable source-only Haskell scripts. Stack attempts to solve
 that.
 
@@ -19,7 +19,7 @@ 
 ~~~haskell
 #!/usr/bin/env stack
--- stack script --snapshot lts-23.24 --package turtle
+-- stack script --snapshot lts-24.24 --package turtle
 {-# LANGUAGE OverloadedStrings #-}
 import Turtle (echo)
 main = echo "Hello World!"
@@ -78,11 +78,11 @@ 
 The second line of the source code is the Stack interpreter options comment. In
 this example, it specifies the [`stack script`](../commands/script_command.md)
-command with the options of a LTS Haskell 23.24 snapshot
-(`--snapshot lts-23.24`) and ensuring the
+command with the options of a LTS Haskell 24.24 snapshot
+(`--snapshot lts-24.24`) and ensuring the
 [`turtle`](https://hackage.haskell.org/package/turtle) package is available
 (`--package turtle`). The version of the package will be that in the specified
-snapshot (`lts-23.24` provides `turtle-1.6.2`).
+snapshot (`lts-24.24` provides `turtle-1.6.2`).
 
 ## Arguments and interpreter options and arguments
 
@@ -117,7 +117,7 @@ ~~~haskell
 #!/usr/bin/env stack
 {- stack script
-   --snapshot lts-23.24
+   --snapshot lts-24.24
    --
    +RTS -s -RTS
 -}
@@ -133,7 +133,7 @@ is equivalent to the following command at the command line:
 
 ~~~text
-stack script --snapshot lts-23.24 -- MyScript.hs arg1 arg2 +RTS -s -RTS
+stack script --snapshot lts-24.24 -- MyScript.hs arg1 arg2 +RTS -s -RTS
 ~~~
 
 where `+RTS -s -RTS` are some of GHC's
@@ -164,7 +164,7 @@ ~~~haskell
 #!/usr/bin/env stack
 {- stack script
-   --snapshot lts-23.24
+   --snapshot lts-24.24
    --package turtle
    --package "stm async"
    --package http-client,http-conduit
@@ -180,7 +180,7 @@ ~~~haskell
 #!/usr/bin/env stack
 {- stack script
-   --snapshot lts-23.24
+   --snapshot lts-24.24
    --extra-dep acme-missiles-0.3@rev:0
    --extra-dep "{git: git@github.com:yesodweb/wai, commit: '2f8a8e1b771829f4a8a77c0111352ce45a14c30f', subdirs: [auto-update, wai]}"
 -}
@@ -227,7 +227,7 @@ 
 ~~~haskell
 {- stack script
-   --snapshot lts-23.24
+   --snapshot lts-24.24
    --package acme-missiles
 -}
 import Acme.Missiles (launchMissiles)
@@ -238,7 +238,7 @@ 
 The command `stack --script-no-run-compile Script.hs` then behaves as if the
 command
-`stack script --snapshot lts-23.24 --package acme-missiles --no-run --compile -- Script.hs`
+`stack script --snapshot lts-24.24 --package acme-missiles --no-run --compile -- Script.hs`
 had been given. `Script.hs` is compiled (without optimisation) and the resulting
 executable is not run: no missiles are launched in the process!
 
@@ -280,7 +280,7 @@ {- stack
   runghc
   --install-ghc
-  --snapshot lts-23.24
+  --snapshot lts-24.24
   --package base
   --package turtle
   --
@@ -289,7 +289,7 @@ ~~~
 
 The [`stack runghc`](../commands/runghc_command.md) command is still useful,
-especially when you're working on a project and want to access the package
+especially when you are working on a project and want to access the package
 databases and configurations used by that project. See the next section for more
 information on configuration files.
 
@@ -304,7 +304,7 @@ {- stack
    exec ghci
    --install-ghc
-   --snapshot lts-23.24
+   --snapshot lts-24.24
    --package turtle
 -}
 ~~~
doc/topics/shell_autocompletion.md view
@@ -53,7 +53,7 @@     stack --zsh-completion-script $(which stack)
     ~~~
 
-    You won't need to `source` this, but do update your `fpath`:
+    You will not need to `source` this, but do update your `fpath`:
 
     ~~~zsh
     fpath=($HOME/.config/zsh/completions $fpath)
doc/topics/snapshot_location.md view
@@ -20,13 +20,13 @@     for example:
 
     ~~~yaml
-    snapshot: ghc-8.6.5
+    snapshot: ghc-9.10.3
     ~~~
 
 2.  Via a URL pointing to a snapshot configuration file, for example:
 
     ~~~yaml
-    snapshot: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2018/8/21.yaml`
+    snapshot: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2025/8/17.yaml`
     ~~~
 
 3.  Via a local file path pointing to a snapshot configuration file, for
doc/topics/stack_work.md view
@@ -64,6 +64,12 @@ 
 ## Project Stack work directory
 
+The Stack work directory for a project will contain:
+
+* a `stack.sqlite3` file (being a SQLite v3 database); and
+* a `stack.sqlite3.pantry-write-lock` file (used to ensure that only one
+  process is trying to write to the database at any time).
+
 The Stack work directory for a project will contain a `install` directory.
 This directory will contain a path to a directory containing:
 
@@ -75,11 +81,9 @@   directory. This is the directory reported by
   [`stack path --local-hpc-root`](../commands/path_command.md);
 * a `lib` directory, containing a directory named after the platform and the
-  GHC version and, within that, a directory for each project package;
+  GHC version and, within that, a directory for each project package; and
 * a `pkgdb` directory. This is the directory reported by
-  [`stack path --local-pkg-db`](../commands/path_command.md);
-* a `stack.sqlite3` file; and
-* a `stack.sqlite3.pantry-write-lock` file.
+  [`stack path --local-pkg-db`](../commands/path_command.md).
 
 The directory is the one reported by
 [`stack path --local-install-root`](../commands/path_command.md).
doc/topics/stack_yaml_vs_cabal_package_file.md view
@@ -52,8 +52,8 @@ Often you will have a project that defines only one local Cabal package that you
 are working on. If you need to specify a dependency, a source of confusion can
 be why you need to specify it both in the `stack.yaml` file _and_
-in the Cabal file. To explain, let's take a quick detour to talk about snapshots
-and how Stack resolves dependencies.
+in the Cabal file. To explain, let us take a quick detour to talk about
+snapshots and how Stack resolves dependencies.
 
 ## Snapshots and resolvers
 
@@ -64,15 +64,15 @@ 
 The most common means by which this set of packages is defined is via a
 snapshot provided by Stackage. For example, if you go to the page
-<https://www.stackage.org/lts-23.24>, you will see a list of 3,212 packages at
-specific version numbers. When you then specify `snapshot: lts-23.24` or,
-alternatively, `resolver: lts-23.24`, you're telling Stack to use those package
+<https://www.stackage.org/lts-24.24>, you will see a list of 3,415 packages at
+specific version numbers. When you then specify `snapshot: lts-24.24` or,
+alternatively, `resolver: lts-24.24`, you are telling Stack to use those package
 versions in resolving dependencies down to specific versions of packages.
 
-Sometimes a snapshot doesn't have all of the packages that you want. Or you want
-a different version of a package. Or you want to work on a local modification of
-a package. In all of those cases, you can add more configuration data to your
-`stack.yaml` file to override the values it received from your
+Sometimes a snapshot does not have all of the packages that you want. Or you
+want a different version of a package. Or you want to work on a local
+modification of a package. In all of those cases, you can add more configuration
+data to your `stack.yaml` file to override the values it received from your
 [`snapshot`](../configure/yaml/project.md#snapshot) or
 [`resolver`](../configure/yaml/project.md#resolver) setting. At the end of the
 day, each of your projects will end up with some way of resolving a package name
@@ -88,10 +88,11 @@ - acme-missiles-0.3
 ~~~
 
-what you're saying to Stack is: "if at any point you find that you need to build
-the `acme-missiles` package, please use version `0.3`". You are _not_ saying
-"please build `acme-missiles` now." You are also not saying "my package depends
-on `acme-missiles`." You are simply making it available should the need arise.
+what you are saying to Stack is: "if at any point you find that you need to
+build the `acme-missiles` package, please use version `0.3`". You are _not_
+saying "please build `acme-missiles` now." You are also not saying "my package
+depends on `acme-missiles`." You are simply making it available should the need
+arise.
 
 When you add to your `package.yaml` file:
 
@@ -106,8 +107,8 @@ build-depends: acme-missiles
 ~~~
 
-you're saying "this package requires that `acme-missiles` be available." Since
-`acme-missiles` doesn't appear in your snapshot, without also modifying your
+you are saying "this package requires that `acme-missiles` be available." Since
+`acme-missiles` does not appear in your snapshot, without also modifying your
 `stack.yaml` to mention it via `extra-deps`, Stack will complain about the
 dependency being unavailable.
 
@@ -124,23 +125,23 @@ the interim, the build plan generated should be the same.
 
 (There is, however, at least one hole in this theory today, which is Hackage
-revisions. When you specify `extra-deps: [acme-missiles-0.3]`, it doesn't
+revisions. When you specify `extra-deps: [acme-missiles-0.3]`, it does not
 specify which revision of the Cabal file to use, and Stack will just choose the
 latest. Stack has the ability to specify exact revisions of Cabal files, but
-this isn't enforced as a requirement, because it is so different from the way
+this is not enforced as a requirement, because it is so different from the way
 most people work with packages.)
 
-And now, how about the other side: why doesn't Stack automatically add
+And now, how about the other side: why does Stack not automatically add
 `acme-missiles` to `build-depends` in your Cabal file if you add it as an
 extra-dep? There are a surprising number reasons for this:
 
-* The Cabal specification doesn't support anything like that
+* The Cabal specification does not support anything like that
 * There can be multiple packages in a project, and how do we know which package
   actually needs the dependency?
 * There can be multiple components (libraries, executable, etc) in a package,
   and how do we know which of those actually needs the dependency?
 * The dependency may only be conditionally needed, based on flags, operating
-  system, or architecture. As an extreme example, we wouldn't want a Linux-only
+  system, or architecture. As an extreme example, we would not want a Linux-only
   package to be built by force on Windows.
 
 While for simple use cases it seems like automatically adding dependencies from
@@ -148,10 +149,10 @@ breaks down immediately for any semi-difficult case. Therefore, Stack requires
 you to add it to both places.
 
-And a final note, in case it wasn't clear. The example above used
+And a final note, in case it was not clear. The example above used
 `acme-missiles`, which is not in Stackage snapshots. If, however, you want to
-depend on a package already present in the snapshot you've selected, there's no
-need to add it explicitly to your `stack.yaml` file: it's already there
+depend on a package already present in the snapshot you have selected, there is
+no need to add it explicitly to your `stack.yaml` file: it is already there
 implicitly via the `snapshot` setting. This is what you do the majority of the
 time, such as when you add `vector` or `mtl` as a `build-depends` value.
 
doc/topics/travis_ci.md view
@@ -22,16 +22,16 @@         It is likely going to be necessary to modify this configuration to match
         the needs of your project, such as tweaking the build matrix to alter
         which GHC versions you test against, or to specify GHC-version-specific
-        `stack.yaml` files if necessary. Don't be surprised if it doesn't work
+        `stack.yaml` files if necessary. Do not be surprised if it does not work
         the first time around. See the multiple GHC section below for more
         information.
 
 Each of these configurations is ready to be used immediately, just
 copy-paste the content into the `.travis.yml` file in the root or your
-repo, enable Travis on the repo, and you're good to go.
+repo, enable Travis on the repo, and you are good to go.
 
 You may also be interested in using AppVeyor, which supports Windows
-builds, for more cross-platform testing. There's a
+builds, for more cross-platform testing. There is a
 [short blog post available on how to do this](http://www.snoyman.com/blog/2016/08/appveyor-haskell-windows-ci),
 or just copy in
 [the appveyor.yml file](https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/resources/appveyor.yml)
@@ -105,7 +105,7 @@ 
 ### Multiple GHC - parametrised builds
 
-Travis apt plugin doesn't yet support installing apt packages dynamically
+Travis apt plugin does not yet support installing apt packages dynamically
 (https://github.com/travis-ci/travis-ci/issues/4291). That for we need to write
 a bit repetitive `.travis.yml`.
 
@@ -157,7 +157,7 @@   - stack --no-terminal --skip-ghc-check test
 ~~~
 
-In case you're wondering: we need `--no-terminal` because stack does some fancy
+In case you are wondering: we need `--no-terminal` because stack does some fancy
 sticky display on smart terminals to give nicer status and progress messages,
 and the terminal detection is broken on Travis.
 
doc/tutorial/building_existing_projects.md view
@@ -2,19 +2,19 @@ 
 # 5. Building existing projects
 
-Alright, enough playing around with simple projects. Let's take an open source
-package and try to build it. We'll be ambitious and use
+So far, we have been building simple projects. Let us now take an open source
+package and try to build it. We will be ambitious and use
 [yackage](https://hackage.haskell.org/package/yackage), a local package server
-using [Yesod](http://www.yesodweb.com/). To get the code, we'll use the
-`stack unpack` command from the root directory for all our Haskell projects:
+using [Yesod](http://www.yesodweb.com/). To get the code, we will use the
+`stack unpack` command run from the root directory for all our Haskell projects:
 
 ~~~text
 stack unpack yackage
 Unpacked yackage-0.8.1 to <root_directory>/yackage-0.8.1/
 ~~~
 
-You can also unpack to the directory of your liking instead of the current one
-by issuing the command:
+You can also unpack to a directory of your liking instead of the current one
+by commanding:
 
 ~~~text
 stack unpack yackage --to <desired_directory>
@@ -31,7 +31,7 @@ ## The `stack init` command
 
 This new directory does not have a `stack.yaml` file, so we need to make one
-first. We could do it by hand, but let's be lazy instead with the `stack init`
+first. We could do it by hand, but let us be lazy instead with the `stack init`
 command:
 
 ~~~text
@@ -64,14 +64,14 @@ 
 You could manually create `stack.yaml` by omitting some packages to resolve the
 conflict. Alternatively you can ask `stack init` to do that for you by
-specifying `--omit-packages` flag on the command line. Let's see how that
+specifying `--omit-packages` flag on the command line. Let us see how that
 works.
 
 To simulate a conflict we will use `acme-missiles-0.3` in `yackage` and we will
 also copy `yackage.cabal` to another directory and change the name of the file
 and package to `yackage-test`. In this new package we will use
-`acme-missiles-0.2` instead. Let's see what happens when we command `stack init`
-again:
+`acme-missiles-0.2` instead. Let us see what happens when we command
+`stack init` again:
 
 ~~~text
 stack init --force --omit-packages
doc/tutorial/building_your_project.md view
@@ -17,7 +17,7 @@ 
 A Haskell package often depends on code exposed by other Haskell packages.
 
-Let's say we decide to modify our existing `helloworld` package source code to
+Let us say we decide to modify our existing `helloworld` package source code to
 use a new library, the one provided by the
 [`text`](https://hackage.haskell.org/package/text) package.
 
@@ -107,7 +107,7 @@ 
 ## Listing dependencies
 
-Let's have Stack add a few more dependencies to our project. First, we'll
+Let us have Stack add a few more dependencies to our project. First, we will
 include two new packages in the `dependencies` section for our library in our
 `package.yaml`:
 
@@ -138,7 +138,7 @@ The packages `text`, `filepath` and `containers` have something in common: they
 are all provided with GHC (referred to as GHC boot packages).
 
-Let's try a dependency on a more off-the-beaten-track package: the joke
+Let us try a dependency on a more off-the-beaten-track package: the joke
 [acme-missiles](http://www.stackage.org/package/acme-missiles) package.
 
 We can further modify `src/Lib.hs` so that its contents are as follows:
@@ -225,10 +225,10 @@ is not a member of the set of package versions specified by the snapshot. So
 building failed.
 
-To add a version of `acme-missiles` to the available package versions, we'll use
-the `extra-deps` key in Stack's project-level configuration file (`stack.yaml`).
-That key defines extra package versions, not present in the snapshot, that will
-be needed as dependencies. You can add this like so:
+To add a version of `acme-missiles` to the available package versions, we will
+use the `extra-deps` key in Stack's project-level configuration file
+(`stack.yaml`). That key defines extra package versions, not present in the
+snapshot, that will be needed as dependencies. You can add this like so:
 
 ~~~yaml
 extra-deps:
@@ -245,11 +245,11 @@ 
 ## Stackage snapshots
 
-With that out of the way, let's dig a little bit more into these snapshots. We
+With that out of the way, let us dig a little bit more into these snapshots. We
 mentioned the LTS snapshots, and you can get information about it at
 [https://www.stackage.org/lts](https://www.stackage.org/lts), including:
 
-* The appropriate value (`lts-23.24`, as is currently the latest LTS)
+* The appropriate value (`lts-24.24`, as is currently the latest LTS)
 * The GHC version used
 * A full list of all packages versions available in this snapshot
 * The ability to perform a Hoogle search on the packages in this snapshot
@@ -258,11 +258,11 @@   `package.yaml` file.
 
 You can also see a
-[list of all available snapshots](https://www.stackage.org/snapshots). You'll
+[list of all available snapshots](https://www.stackage.org/snapshots). You will
 notice two flavors: LTS (for "Long Term Support") and Nightly. You can read more
 about them on the
 [LTS Haskell GitHub page](https://github.com/commercialhaskell/lts-haskell#readme).
-If you're not sure which to use, start with LTS Haskell (which Stack will lean
+If you are not sure which to use, start with LTS Haskell (which Stack will lean
 towards by default as well).
 
 ## Snapshots and GHC versions
@@ -276,9 +276,9 @@     [homepage](https://www.stackage.org/) lists the most recent Stackage
     snapshot. In most cases, that is the snapshot you should use.
 
-??? question "Can I use a snapshot like `ghc-9.8.4`?"
+??? question "Can I use a snapshot like `ghc-9.10.3`?"
 
-    Snapshot `ghc-9.8.4` specifies GHC 9.8.4 and, consequently, the GHC boot
+    Snapshot `ghc-9.10.3` specifies GHC 9.10.3 and, consequently, the GHC boot
     packages that come with that compiler. However, the snapshot does not
     include the many other package versions that will work with that compiler.
     For a set of those package versions, see the snapshots published by the
doc/tutorial/cabal_flags_and_ghc_options.md view
@@ -7,6 +7,35 @@ 
 ## Cabal flags
 
+A package description may specify one or more Cabal flags:
+
+=== "Cabal file"
+
+    ~~~text
+    flag my-flag-name
+      description: My (optional) description of my flag.
+      default: false -- Optional: the default value is true
+      manual: true -- Optional: the default value is false
+    ~~~
+
+=== "`package.yaml` (Hpack)"
+
+    ~~~yaml
+    flags:
+      my-flag-name:
+        description: My (optional) description of my flag.
+        default: true # Required
+        manual: false # Required
+    ~~~
+
+??? question "How does `manual: false` affect Stack's builds?"
+
+    `manual: false` has different implications for Cabal and Stack. Cabal tries
+    to 'solve' dependencies using the flag’s default value and, if it can't,
+    tries again with the negated default value. Stack emphasises reproducible
+    builds. It only tries to build with the flag's default value and, if it
+    can't, reports that it can't.
+
 Cabal flags can be set or unset at the command line or as a project-specific
 Stack option.
 
@@ -22,11 +51,11 @@ flag (thus the `-` in `-upload`). Unlike other tools, Stack is explicit about
 which package's flag you want to change. It does this for two reasons:
 
-1. There's no global meaning for Cabal flags, and therefore two packages can
+1. There is no global meaning for Cabal flags, and therefore two packages can
    use the same flag name for completely different things.
 
 2. By following this approach, we can avoid unnecessarily recompiling snapshot
-   packages that happen to use a Cabal flag that we're using.
+   packages that happen to use a Cabal flag that we are using.
 
 You can also change Cabal flag values on the command line for extra-dep and
 snapshot packages. If you do this, that package will automatically be promoted
@@ -88,7 +117,7 @@     Stack will build all of the dependencies of `wai` (inclduding `warp`) and then
     build `wai` with all GHC optimizations disabled.
 
-    Now let's add `warp` as a target. If we command:
+    Now let us add `warp` as a target. If we command:
 
     ~~~text
     stack build --ghc-options=-O0 wai warp
doc/tutorial/executing_commands.md view
@@ -2,9 +2,9 @@ 
 # 12. Executing commands
 
-We've already used `stack exec` multiple times in this guide. As you've likely
-already guessed, it allows you to run executables, but with a slightly modified
-environment.
+We have already used `stack exec` multiple times in this guide. As you have
+likely already guessed, it allows you to run executables, but with a slightly
+modified environment.
 
 ## The `stack exec` command
 
@@ -34,7 +34,7 @@ Writing the configuration file for the implicit global project to:
 .../global-project/stack.yaml. Note: You can change the snapshot via the
 snapshot key there.
-Using the latest snapshot lts-22.31.
+Using the latest snapshot lts-24.24.
 I installed the stm package via --package stm
 ~~~
 
@@ -56,7 +56,7 @@ 
 ## The `stack ghc` and `stack runghc` commands
 
-You'll sometimes want to just compile (or run) a single Haskell source file,
+You will sometimes want to just compile (or run) a single Haskell source file,
 instead of creating an entire Cabal package for it. You can use `stack exec ghc`
 or `stack exec runghc` for that. As simple helpers, we also provide the
 `stack ghc` and `stack runghc` commands, for these common cases.
doc/tutorial/hello_world_example.md view
@@ -2,23 +2,86 @@ 
 # 1. A Hello World example
 
-With Stack installed, let's create a new project and walk through the most
-common Stack commands.
+With Stack installed, we will create a new Stack project and walk through the
+most common Stack commands. First, let us look at other foundations for getting
+started with Haskell.
 
+## Foundations
+
+Although this guide starts with creating Stack projects using Stack, if you are
+relatively inexperienced in coding with Haskell, there are things you
+may wish to experience first. Examples are:
+
+* using GHC interactively to evaluate Haskell expressions and explore their
+  types. The [`stack ghci`](../commands/ghci_command.md) command can help do
+  that; and
+
+* developing simple Haskell programs where all your source code is in a single
+  file. The [`stack runghc`](../commands/runghc_command.md),
+  [`stack ghc`](../commands/ghc_command.md), and
+  [`stack script`](../commands/script_command.md) commands can all help with
+  that.
+
+By default, the `stack new` command introduced below creates a simple project.
+However, Stack projects can be even simpler than that.
+
+For example, imagine you already had the following simple Haskell program in a
+single source file named `MyMainModule.hs` in a directory named `my-project`.
+
+~~~haskell
+module Main ( main ) where
+
+main :: IO ()
+main = putStrLn "Hello, World!"
+~~~
+
+You could create a Haskell package from that source file by also creating
+manually a package description file named `package.yaml` in `my-project`, with
+the contents:
+
+~~~yaml
+name: my-package-name
+version: 1
+dependencies: base
+executable:
+  main: MyMainModule.hs
+~~~
+
+This description reflects the following:
+
+* all Haskell packages have a name and a version; and
+
+* the GHC boot package [`base`](https://hackage.haskell.org/package/base) is a
+  dependency of almost all other packages.
+
+You could then create a Stack project based on that single package by also
+creating manually a Stack project-level configuration file named `stack.yaml` in
+`my-project`, with the contents:
+
+~~~yaml
+snapshot: lts-24.24
+~~~
+
+By adding those two files (one to describe a package, the other to configure the
+project) manually, you would now have a valid single-package Stack project in
+the `my-project` directory. However, let us step through what Stack's commands
+provide, when it comes to creating new projects.
+
 In this guide, unless stated otherwise, the working directory is the project's
 root directory.
 
 ## The `stack new` command
 
-We'll start off with the [`stack new`](../commands/new_command.md) command to
-create a new *project* from a project template. We'll use the `new-template`
-project template. This template is used by default, but in our example we will
-refer to it expressly.
+We will start off with the [`stack new`](../commands/new_command.md) command to
+create a new Stack *project* from a project template.
 
-That template will create a project with a package of the same name. So, we need
-to pick a name for the project that is a valid package name. We'll call our
-project `helloworld`.
+The project template `new-template` is used by default. However, in our example,
+we will use it by name.
 
+That template creates a project with a single package of the same name. So, we
+need to pick a name for the project that is also a valid package name. We will
+call our project `helloworld`.
+
 ??? question "How do project packages relate to projects?"
 
     A project can have one or more packages. Each project package has its own
@@ -33,6 +96,13 @@ 
     The names of packages are intended to be unique.
 
+??? question "What is a valid package version number?"
+
+    A package version number is one or more natural numbers (including zero)
+    separated by dots (`.`). However, Haskell's Package Versioning Policy (PVP)
+    says that a version should have the form *A.B.C*, and may optionally have
+    any number of additional components.
+
 ??? question "Are other project templates available?"
 
     Yes. For further information about project templates, command:
@@ -83,7 +153,7 @@ 
 ## The `stack build` command
 
-Next, we'll run the most important Stack command,
+Next, we will run the most important Stack command,
 [`stack build`](../commands/build_command.md). We command:
 
 ~~~text
@@ -94,7 +164,7 @@ build your project. Stack will discover that you are missing it and will install
 it for you.
 
-You'll get intermediate download percentage statistics while the download is
+You will get intermediate download percentage statistics while the download is
 occurring. This command may take some time, depending on download speeds.
 
 ??? question "Where is the Stack-supplied GHC located?"
@@ -138,7 +208,7 @@     ...
     helloworld> configure (lib + exe)
     Configuring helloworld-0.1.0.0...
-    helloworld> build (lib + exe) with ghc-9.8.4
+    helloworld> build (lib + exe) with ghc-9.10.3
     Preprocessing library for helloworld-0.1.0.0..
     Building library for helloworld-0.1.0.0..
     [1 of 2] Compiling Lib
@@ -147,9 +217,9 @@     Building executable 'helloworld-exe' for helloworld-0.1.0.0..
     [1 of 2] Compiling Main
     [2 of 2] Compiling Paths_helloworld
-    [3 of 3] Linking .stack-work/dist/x86_64-linux-tinfo6/ghc-9.8.4/build/helloworld-exe/helloworld-exe
+    [3 of 3] Linking .stack-work/dist/x86_64-linux-tinfo6/ghc-9.10.3/build/helloworld-exe/helloworld-exe
     helloworld> copy/register
-    Installing library in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/lib/x86_64-linux-ghc-9.8.4/helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
+    Installing library in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/lib/x86_64-linux-ghc-9.10.3/helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
     Installing executable helloworld-exe in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/bin
     Registering library for helloworld-0.1.0.0..
     ~~~
@@ -160,7 +230,7 @@     ...
     helloworld> configure (lib + exe)
     Configuring helloworld-0.1.0.0...
-    helloworld> build (lib + exe) with ghc-9.8.4
+    helloworld> build (lib + exe) with ghc-9.10.3
     Preprocessing library for helloworld-0.1.0.0..
     Building library for helloworld-0.1.0.0..
     [1 of 2] Compiling Lib
@@ -171,7 +241,7 @@     [2 of 2] Compiling Paths_helloworld
     [3 of 3] Linking .stack-work\dist\effaccc7\build\helloworld-exe\helloworld-exe.exe
     helloworld> copy/register
-    Installing library in ...\helloworld\.stack-work\install\c8c71a24\lib\x86_64-windows-ghc-9.8.4\helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
+    Installing library in ...\helloworld\.stack-work\install\c8c71a24\lib\x86_64-windows-ghc-9.10.3\helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
     Installing executable helloworld-exe in ...\helloworld\.stack-work\install\c8c71a24\bin
     Registering library for helloworld-0.1.0.0..
     ~~~
@@ -191,7 +261,7 @@ ~~~text
 helloworld> configure (lib + exe)
 ...
-helloworld> build (lib + exe) with ghc-9.8.4
+helloworld> build (lib + exe) with ghc-9.10.3
 ...
 helloworld> copy/register
 ...
@@ -201,7 +271,7 @@ The executable is installed in a location in the project's `.stack-work`
 directory.
 
-Now, let's use the [`stack exec`](../commands/exec_command.md) command to run
+Now, let us use the [`stack exec`](../commands/exec_command.md) command to run
 our executable. We command:
 
 ~~~text
@@ -261,7 +331,7 @@ 
 Finally, like all good software, `helloworld` actually has a test suite.
 
-Let's run it with the [`stack test`](../commands/test_command.md) command. We
+Let us run it with the [`stack test`](../commands/test_command.md) command. We
 command:
 
 ~~~text
@@ -276,18 +346,18 @@     helloworld-0.1.0.0: unregistering (components added: test:helloworld-test)
     helloworld> configure (lib + exe + test)
     Configuring helloworld-0.1.0.0...
-    helloworld> build (lib + exe + test) with ghc-9.8.4
+    helloworld> build (lib + exe + test) with ghc-9.10.3
     Preprocessing library for helloworld-0.1.0.0..
     Building library for helloworld-0.1.0.0..
     Preprocessing test suite 'helloworld-test' for helloworld-0.1.0.0..
     Building test suite 'helloworld-test' for helloworld-0.1.0.0..
     [1 of 2] Compiling Main
     [2 of 2] Compiling Paths_helloworld
-    [3 of 3] Linking .stack-work/dist/x86_64-linux-tinfo6/ghc-9.8.4/build/helloworld-test/helloworld-test
+    [3 of 3] Linking .stack-work/dist/x86_64-linux-tinfo6/ghc-9.10.3/build/helloworld-test/helloworld-test
     Preprocessing executable 'helloworld-exe' for helloworld-0.1.0.0..
     Building executable 'helloworld-exe' for helloworld-0.1.0.0..
     helloworld> copy/register
-    Installing library in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/lib/x86_64-linux-ghc-9.8.4/helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
+    Installing library in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/lib/x86_64-linux-ghc-9.10.3/helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
     Installing executable helloworld-exe in .../helloworld/.stack-work/install/x86_64-linux-tinfo6/a2caceceda039eb4f791856f85a68f9582d4daf3d0527344693ff3d1fcd92ba4/9.6.6/bin
     Registering library for helloworld-0.1.0.0..
     ~~~
@@ -298,7 +368,7 @@     helloworld-0.1.0.0: unregistering (components added: test:helloworld-test)
     helloworld> configure (lib + exe + test)
     Configuring helloworld-0.1.0.0...
-    helloworld> build (lib + exe + test) with ghc-9.8.4
+    helloworld> build (lib + exe + test) with ghc-9.10.3
     Preprocessing library for helloworld-0.1.0.0..
     Building library for helloworld-0.1.0.0..
     Preprocessing test suite 'helloworld-test' for helloworld-0.1.0.0..
@@ -309,7 +379,7 @@     Preprocessing executable 'helloworld-exe' for helloworld-0.1.0.0..
     Building executable 'helloworld-exe' for helloworld-0.1.0.0..
     helloworld> copy/register
-    Installing library in ...\helloworld\.stack-work\install\0aa166fa\lib\x86_64-windows-ghc-9.8.4\helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
+    Installing library in ...\helloworld\.stack-work\install\0aa166fa\lib\x86_64-windows-ghc-9.10.3\helloworld-0.1.0.0-KFyX8zLxDvzLZURq3JaCVX
     Installing executable helloworld-exe in ...\helloworld\.stack-work\install\0aa166fa\bin
     Registering library for helloworld-0.1.0.0..
     ~~~
doc/tutorial/index.md view
@@ -1,5 +1,5 @@ ---
-Title: Getting started
+title: Getting started
 ---
 
   <div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
@@ -8,10 +8,18 @@ 
 Stack is a program for developing [Haskell](https://www.haskell.org/) projects.
 
-This guide to getting started takes a new Stack user through the ways that Stack
-is typically used. It will not teach Haskell or involve much code, and it
-requires no prior experience of Stack or other Haskell tools.
+You may be getting started with Haskell or you may only be getting started with
+Stack. If you are getting started with Haskell, you may already know other
+programming languages or you may be new to coding.
 
+This guide is aimed at people getting started with Stack. It takes a new Stack
+user through the ways that Stack is typically used. It requires no prior
+experience of Stack or other Haskell tools.
+
+This guide will not teach Haskell - other resources are better placed to do
+that - or involve much code. However, it does aim to be accessible to people who
+who are relatively inexperienced in coding with Haskell.
+
 Terms used in the guide will be explained as they are introduced and are also
 defined in the [glossary](../glossary.md).
 
@@ -21,8 +29,8 @@ 
 ## Other Haskell tools
 
-First, simplifying greatly, lets briefly place Stack and other Haskell tools in
-the Haskell landscape.
+First, simplifying greatly, let us briefly place Stack and other Haskell tools
+in the Haskell landscape.
 
 Haskell was specified in the
 [Haskell 98 Language and Library Reports](https://www.haskell.org/onlinereport/),
@@ -44,9 +52,14 @@   code --> ghc --> binaries
 ~~~
 
-Haskell code can be organised into *packages*. A Haskell package also includes a
-file that describes the package's contents. The most established description
-format is known as a
+A lot of interesting things can be done using only what comes with GHC
+(including GHCi) but as Haskell code becomes more complex and there is a desire
+to reuse efficiently code developed by others it becomes necessary to organise
+code in a structured way.
+
+In that regard, Haskell code can be organised into *packages*. A Haskell package
+also includes a file that describes the package's contents. The most established
+description format is known as a
 [Cabal file](https://cabal.readthedocs.io/en/stable/file-format-changelog.html).
 The [**Hpack** project](https://github.com/sol/hpack) provides a modern
 alternative format (in a file named `package.yaml`) and a library and
@@ -69,9 +82,17 @@ The code in a Haskell package can depend on the libraries in the same package
 or in another package. These are known as its *dependencies*.
 
+GHC comes with the libraries of certain Haskell packages (known as
+*boot packages*) already installed in its global database of installed
+libraries. These include the library of the
+[package `base`](https://hackage.haskell.org/package/base), which
+is a dependency of almost all other packages, and the library of
+[package `Cabal`](https://hackage.haskell.org/package/Cabal), which provides
+code to build packages and components of packages using GHC.
+
 Two important public databases are **Hackage**
 [(the  Haskell Package Repository)](https://hackage.haskell.org/) and
-[**Stackage**](https://hackage.haskell.org/).
+[**Stackage**](https://www.stackage.org/).
 
 ~~~mermaid
 flowchart LR
@@ -83,19 +104,16 @@ ~~~
 
 Hackage is a database of Haskell packages, each identified by a name and version
-number. Stackage is a database of collections of Haskell package versions on
+number. There were over 17,000 package names on Hackage as at July 2025.
+
+Stackage is a database of collections of Haskell package versions on
 Hackage that are known, by testing, to work well together and with a specific
-version of GHC. Those collections are known as *snapshots*. Stack can unpack
-packages from, and upload packages to, Hackage and builds making use of
-snapshots from Stackage.
+version of GHC and its boot packages. Those collections are known as
+*snapshots*. As at July 2025, a snapshot for a recent version of GHC includes
+well over 3,000 packages.
 
-GHC comes with the libraries of certain Haskell packages (known as
-*boot packages*) already installed in its global database of installed
-libraries. These include the library of the
-[package `base`](https://hackage.haskell.org/package/base), which
-is a dependency of almost all other packages, and the library of
-[package `Cabal`](https://hackage.haskell.org/package/Cabal), which provides
-code to build packages and components of packages using GHC.
+Stack can unpack packages from, and upload packages to, Hackage and
+builds making use of snapshots from Stackage.
 
 GHC comes with an application
 [**Haddock**](https://haskell-haddock.readthedocs.io/latest/) that automatically
doc/tutorial/installed_package_databases.md view
@@ -85,7 +85,7 @@ The reason we have this structure is that:
 
 * it lets multiple projects reuse the same binary builds of immutable packages,
-* but doesn't allow different projects to "contaminate" each other by putting
+* but does not allow different projects to "contaminate" each other by putting
   non-standard content into the shared snapshot database.
 
 As you probably guessed, there can be multiple snapshot databases available. See
@@ -102,9 +102,9 @@   systems. This is done to avoid problems created by default limits on file
   path lengths on Windows systems.
 
-These snapshot databases don't get layered on top of each other; they are each
+These snapshot databases do not get layered on top of each other; they are each
 used separately.
 
-In reality, you'll rarely — if ever — interact directly with these databases,
-but it's good to have a basic understanding of how they work so you can
+In reality, you will rarely — if ever — interact directly with these databases,
+but it is good to have a basic understanding of how they work so you can
 understand why rebuilding may occur at different points.
doc/tutorial/locations_used_by_stack.md view
@@ -2,7 +2,7 @@ 
 # 11. Locations used by Stack
 
-Generally, you don't need to worry about where Stack stores various files. But
+Generally, you do not need to worry about where Stack stores various files. But
 some people like to know this stuff. That's when the `stack path` command is
 useful.
 
@@ -42,8 +42,8 @@ ~~~
 
 In addition, `stack path` accepts the flags above on the command line to state
-which keys you're interested in. This can be convenient for scripting. As a
-simple example, let's find out the sandboxed versions of GHC that Stack
+which keys you are interested in. This can be convenient for scripting. As a
+simple example, let us find out the sandboxed versions of GHC that Stack
 installed:
 
 === "Unix-like"
@@ -70,7 +70,7 @@     -a---          25/02/2022 11:39 PM              9 msys2-20210604.installed
     ~~~
 
-While we're talking about paths, to wipe our Stack install completely, here's
+While we are talking about paths, to wipe our Stack install completely, here is
 what typically needs to be removed:
 
 1. the Stack root folder (see `stack path --stack-root`, before you uninstall);
doc/tutorial/multi-package_projects.md view
@@ -2,91 +2,151 @@ 
 # 9. Multi-package projects
 
-Until now, everything we have done with Stack has used a single-package project.
-However, Stack's power truly shines when you're working on multi-package
-projects. All the functionality you'd expect to work just does: dependencies
-between packages are detected and respected, dependencies of all packages are
-just as one cohesive whole, and if anything fails to build, the build commands
-exits appropriately.
-
-Let us demonstrate this with the `wai-app-static` and `yackage` packages,
-starting in the root directory for all our Haskell projects. Command:
-
-~~~text
-mkdir multi
-cd multi
-stack unpack wai-app-static yackage
-~~~
-
-The last command should report something like:
-
-~~~text
-...
-Unpacked wai-app-static (from Hackage) to .../multi/wai-app-static-3.1.9/.
-Unpacked yackage (from Hackage) to .../multi/yackage-0.8.1/.
-~~~
+Everything we have done with Stack so far has used a single-package project,
+where the project directory is also the package's directory. However, a Stack
+project can have more than one project package.
 
-Then command:
+Let us demonstrate this with a project that has two project packages named
+`packageA` and `packageB`. We will create a project directory named `my-project`
+and, for our example, create the two project packages in subdirectories.
+Command:
 
 ~~~text
+mkdir my-project
+cd my-project
+stack new packageA --no-init
+stack new packageB --no-init
 stack init
 ~~~
 
-The command should report something like:
+The `--no-init` flags above stop Stack from creating project-level configuration
+files in the `packageA` and `packageB` directories that
+[`stack new`](../commands/new_command.md) will create.
 
+The [`stack init`](../commands/init_command.md) command above creates a
+project-level configuration file (`stack.yaml`) in the `my-project` directory.
+The command should report something like this:
+
 ~~~text
 Looking for Cabal or package.yaml files to use to initialise Stack's
-project-level configuration file.
+project-level YAML configuration file.
 
 Using the Cabal packages:
-* wai-app-static-3.1.9/
-* yackage-0.8.1/
+* packageA\
+* packageB\
 
-Cabal file warning in .../multi/yackage-0.8.1/yackage.cabal@47:40: version
-operators used. To use version operators the package needs to specify at least
-'cabal-version: >= 1.8'.
-Cabal file warning in .../multi/yackage-0.8.1/yackage.cabal@21:36: version
-operators used. To use version operators the package needs to specify at least
-'cabal-version: >= 1.8'.
-Selecting the best among 12 snapshots...
+Selecting the best among 14 snapshots...
 
-Note: Matches ...
+Note: Matches https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/25.yaml
 
-Selected the snapshot ...
-Initialising Stack's project-level configuration file using snapshot ...
+Selected the snapshot https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/25.yaml.
+Initialising Stack's project-level configuration file using snapshot https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/25.yaml.
 Considered 2 user packages.
 Writing configuration to stack.yaml.
 Stack's project-level configuration file has been initialised.
 ~~~
 
-Then command:
+Ignoring comments in the file, the content of the created `stack.yaml` file
+should be something like this:
 
+~~~yaml
+snapshot:
+  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/25.yaml
+
+packages:
+- packageA
+- packageB
+~~~
+
+The value of the [`packages`](../configure/yaml/project.md#packages) key is a
+list of paths (relative paths, in this example) to project package directories.
+
+If we command
+[`stack ide targets`](../commands/ide_command.md#the-stack-ide-targets-command),
+Stack reports the build targets for these two project packages:
+
 ~~~text
-stack build --haddock --test
+packageA:lib
+packageA:exe:packageA-exe
+packageA:test:packageA-test
+packageB:lib
+packageB:exe:packageB-exe
+packageB:test:packageB-test
 ~~~
 
-Stack should build and test the project packages.
+If we command
+[`stack build`](../commands/build_command.md#no-targets-specified), Stack will
+build all the library and executable components of all the project packages.
 
-If you look at the `stack.yaml` file, you'll see exactly what you'd expect:
+One project package can depend on another. Let us demonstrate this by modifying
+the main library of the `packageB` package to depend on that of the `packageA`
+package.
 
+Currently, the source code of the `packageA` and `packageB` packages are the
+same. Let us first modify the `someFunc` function exported by the `Lib` module
+exposed by the `packageA` package, as follows:
+
+~~~haskell
+someFunc :: IO ()
+someFunc = putStrLn "someFunc of packageA's Lib module"
+~~~
+
+and the source code of the `Lib` module exposed by the `packageB` package to
+become:
+
+~~~haskell
+{-# LANGUAGE PackageImports #-}
+
+module Lib
+    ( someFunc
+    ) where
+
+import qualified "packageA" Lib as LibA
+
+someFunc :: IO ()
+someFunc = do
+    putStrLn "someFunc of packageB's Lib module"
+    LibA.someFunc
+~~~
+
+In this example, as the `packageA` and `packageB` packages both expose a module
+named `Lib`, we have to use GHC's language extension
+[`PackageImports`](https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/package_qualified_imports.html)
+to allow imports from the `Lib` module exposed by the `packageA` package to be
+distiguished.
+
+In the package description file (`package.yaml`) for the `packageB` package, we
+need to specify that the dependencies of its main library now include the main
+library of the `packageA` package, as follows (extract):
+
 ~~~yaml
-snapshot:
-  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/31.yaml
-packages:
-- wai-app-static-3.1.9
-- yackage-0.8.1
+library:
+  source-dirs: src
+  dependencies:
+  - packageA # Add the dependency on the main library of the packageA package
 ~~~
 
-Notice that multiple directories are listed in the `packages` key.
+Now, if we command `stack build packageB`, Stack will build the library and
+executable components of the `packageA` package (the dependency) and then the
+library and executable (named `packageB-exe`) of `packageB`.
 
-In addition to local directories, you can also refer to packages available in a
-Git repository or in a tarball over HTTP/HTTPS. This can be useful for using a
-modified version of a dependency that hasn't yet been released upstream.
+To execute the built `packageB-exe` executable, we can command:
 
+~~~text
+stack exec packageB-exe
+~~~
+
+giving the expected output:
+
+~~~text
+someFunc of packageB's Lib module
+someFunc of packageA's Lib module
+~~~
+
 !!! note
 
-    When adding upstream packages directly to your project it is important to
-    distinguish _project packages_ located locally from the upstream
-    _dependency packages_. Otherwise you may have trouble running `stack ghci`.
-    See [stack.yaml documentation](../configure/yaml/project.md#packages) for
-    more details.
+    A project package can depend on another project package, as above. It can
+    also depend on a local package that is specified as an
+    [extra-dep](../configure/yaml/project.md#extra-deps). Although both
+    dependencies are local, the former is part of the project and the latter is
+    not.
doc/tutorial/package_description.md view
@@ -408,7 +408,7 @@ The `Setup.hs` file is a component of the Cabal build system.
 
 Technically, it is not needed by Stack, but it is considered good practice to
-include it. The file we're using is boilerplate:
+include it. The file we are using is boilerplate:
 
 ~~~haskell
 import Distribution.Simple
doc/tutorial/project_configuration.md view
@@ -35,23 +35,23 @@ 
 ~~~yaml
 snapshot:
-  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/24.yaml
+  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/9.yaml
 packages:
 - .
 ~~~
 
 The key [`snapshot`](../configure/yaml/project.md#snapshot) is a
 project-specific configuration option. Its value tells Stack *how* to build your
-package: which GHC version to use, which versions of package dependencies to
-use, and so on. Our value here says to use
-[LTS Haskell 23.24](https://www.stackage.org/lts-23.24), which implies GHC 9.8.4
-(which is why `stack build` installs that version of GHC if it is not already
-available to Stack). There are a number of values you can use for `snapshot`,
-which we'll cover later.
+package: which version of GHC (and, implicitly, its boot packages) to use; which
+versions of other package dependencies to use, and so on. Our value here says to
+use [LTS Haskell 24.24](https://www.stackage.org/lts-24.24), which implies
+GHC 9.10.3 (which is why `stack build` installs that version of GHC if it is not
+already available to Stack). There are a number of values you can use for
+`snapshot`, which we will cover later.
 
 The key [`packages`](../configure/yaml/project.md#packages) is another
 project-specific configuration option. Its value tells Stack which project
 packages, located locally, to build. In our simple example, we have only a
 single project package, located in the same directory, so '`.`' suffices.
-However, Stack has powerful support for multi-package projects, which we'll
+However, Stack has powerful support for multi-package projects, which we will
 describe as this guide progresses.
doc/tutorial/stack_build_synonyms.md view
@@ -2,7 +2,7 @@ 
 # 7. `stack build` synonyms
 
-Let's look at a subset of the `stack --help` output:
+Let us look at a subset of the `stack --help` output:
 
 ~~~text
 build    Build the package(s) in this directory/configuration
@@ -45,7 +45,7 @@ 
 ## The `stack install` command and `copy-bins` option
 
-It's worth calling out the behavior of the `install` command and `--copy-bins`
+It is worth calling out the behavior of the `install` command and `--copy-bins`
 option, since this has confused a number of users (especially when compared to
 behavior of other tools like Cabal (the tool)). The `install` command does
 precisely one thing in addition to the build command: it copies any generated
@@ -71,13 +71,13 @@ shell instead of having to run `stack exec executable-name` from inside your
 project directory.
 
-Since it's such a point of confusion, let me list a number of things Stack does
+Since it is such a point of confusion, let us list a number of things Stack does
 *not* do specially for the `install` command:
 
 * Stack will always build any necessary dependencies for your code. The install
   command is not necessary to trigger this behavior. If you just want to build a
   project, run `stack build`.
-* Stack will *not* track which files it's copied to your local binary directory
+* Stack will *not* track which files it is copied to your local binary directory
   nor provide a way to automatically delete them. There are many great tools out
   there for managing installation of binaries, and Stack does not attempt to
   replace those.
@@ -85,7 +85,7 @@   executables hard-codes paths, copying the executable will not change those
   hard-coded paths.
 
-  * At the time of writing, there's no way to change those kinds of paths with
+  * At the time of writing, there is no way to change those kinds of paths with
     Stack, but see
     [issue #848 about --prefix](https://github.com/commercialhaskell/stack/issues/848)
     for future plans.
doc/tutorial/stack_build_targets.md view
@@ -2,21 +2,21 @@ 
 # 8. `stack build` targets
 
-We haven't discussed this too much yet, but, in addition to having a number of
+We have not discussed this too much yet, but, in addition to having a number of
 synonyms *and* taking a number of options on the command line, the `build`
 command *also* takes many arguments. These are parsed in different ways, and can
 be used to achieve a high level of flexibility in telling Stack exactly what you
 want to build.
 
-We're not going to cover the full generality of these arguments here; instead,
-there's documentation covering the full
-[build command syntax](../commands/build_command.md). Here, we'll just point out
-a few different types of arguments:
+We are not going to cover the full generality of these arguments here; instead,
+there is documentation covering the full
+[build command syntax](../commands/build_command.md). Here, we will just point
+out a few different types of arguments:
 
 * You can specify a *package name*, e.g. `stack build vector`.
-    * This will attempt to build the `vector` package, whether it's a local
+    * This will attempt to build the `vector` package, whether it is a local
       package, in your extra-deps, in your snapshot, or just available upstream.
-      If it's just available upstream but not included in your locals,
+      If it is just available upstream but not included in your locals,
       extra-deps, or snapshot, the newest version is automatically promoted to
       an extra-dep.
 * You can also give a *package identifier*, which is a package name plus
@@ -34,13 +34,13 @@   of any project packages included in those directories or subdirectories.
 
 When you give no specific arguments on the command line (e.g., `stack build`),
-it's the same as specifying the names of all of your project packages. If you
-just want to build the package for the directory you're currently in, you can
+it is the same as specifying the names of all of your project packages. If you
+just want to build the package for the directory you are currently in, you can
 use `stack build .`.
 
 ## Components, --test, and --bench
 
-Here's one final important yet subtle point. Consider our `helloworld` package:
+Here is one final important yet subtle point. Consider our `helloworld` package:
 it has a library component, an executable `helloworld-exe`, and a test suite
 `helloworld-test`. When you run `stack build helloworld`, how does it know which
 ones to build? By default, it will build the library (if any) and all of the
@@ -102,6 +102,6 @@ 
 !!! note
 
-    Stack doesn't build or run test suites and benchmarks for non-local
-    packages. This is done so that a command like `stack test` doesn't need to
+    Stack does not build or run test suites and benchmarks for non-local
+    packages. This is done so that a command like `stack test` does not need to
     run 200 test suites!
doc/tutorial/stack_configuration.md view
@@ -5,7 +5,7 @@ Whenever you run something with Stack, it needs a project-level configuration
 file. The algorithm Stack uses to find such a file is:
 
-1. Check for a `--stack-yaml` option on the command line
+1. Check for a `--stack-yaml` or `-w` option on the command line
 2. Check for a `STACK_YAML` environment variable
 3. Check the current directory and all ancestor directories for a `stack.yaml`
    file
@@ -13,12 +13,12 @@ The first two provide a convenient method for using an alternate configuration.
 For example: `stack build --stack-yaml stack-ghc-9.2.3.yaml` can be used by your
 CI system to check your code against GHC 9.2.3. Setting the `STACK_YAML`
-environment variable can be convenient if you're going to be running commands
+environment variable can be convenient if you are going to be running commands
 like `stack ghc` in other directories, but you want to use the configuration you
 defined in a specific project.
 
 If Stack does not find a project level configuration file in any of the three
-specified locations, the *implicit global* logic kicks in. You've probably
+specified locations, the *implicit global* logic kicks in. You have probably
 noticed that phrase a few times in the output from commands above. Implicit
 global is essentially a hack to allow Stack to be useful in a non-project
 setting. When no implicit global configuration file exists, Stack creates one
@@ -27,14 +27,15 @@ * compile individual files easily with `stack ghc`
 * build executables without starting a project, e.g. `stack install pandoc`
 
-Keep in mind that there's nothing magical about this implicit global
+Keep in mind that there is nothing magical about this implicit global
 configuration. It has no effect on projects at all. Every package you install
 with it is put into isolated databases just like everywhere else. The only magic
-is that it's the catch-all project whenever you're running Stack somewhere else.
+is that it is the catch-all project whenever you are running Stack somewhere
+else.
 
 ## Package description vs project-level configuration
 
-Now that we've covered a lot of ways to use Stack, this quick summary of
+Now that we have covered a lot of ways to use Stack, this quick summary of
 package description files versus Stack's project-level configuration file will
 hopefully make sense and be a good reminder for future uses of Stack:
 
doc/tutorial/tutorial_conclusion.md view
@@ -3,11 +3,11 @@ # 15. In conclusion
 
 Stack is not the only tool available for building Haskell code. If you are
-happy building Haskell code with other tools, you may not need Stack. If
-you're experiencing problems with other tools, give Stack a try.
+happy building with other tools, you may not need Stack. If you are experiencing
+problems with other tools, give Stack a try.
 
-If you're a new user who has no experience with other tools, we recommend Stack.
-It aims to be easy to use and its defaults match modern best practices in
+If you are a new user who has no experience with other tools, we recommend
+Stack. It aims to be easy to use and its defaults match modern best practices in
 Haskell development.
 
 Other key features of Stack include:
@@ -16,8 +16,10 @@ 
 -   __Sandboxing__
 
+    ---
+
     A 'sandbox' is a development environment that is isolated from other parts
-    of the system. The concept of sandboxing is built in to Stack.
+    of the system. The concept of sandboxing is built into Stack.
 
 -   __Snapshots__
 
doc/tutorial/using_ghc_interactively.md view
@@ -9,7 +9,7 @@ stack exec ghci
 ~~~
 
-But that won't load up locally written modules for access. For that, use the
+But that will not load up locally written modules for access. For that, use the
 `stack ghci` or `stack repl` commands, which are equivalent.
 
 ## The `stack ghci` or `stack repl` command
src/Control/Concurrent/Execute.hs view
@@ -30,7 +30,7 @@ -- "Control.Concurrent.Execute" module.
 data ExecuteException
   = InconsistentDependenciesBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ExecuteException where
   displayException InconsistentDependenciesBug = bugReport "[S-2816]"
src/Data/Attoparsec/Interpreter.hs view
@@ -82,6 +82,7 @@   sheBangLine =   P.string "#!"
                *> P.manyTill P.anyChar P.endOfLine
 
+  commentStart :: P.Parser Text -> P.Parser Text
   commentStart psr =   (psr <?> (progName ++ " options comment"))
                     *> P.skipSpace
                     *> (P.string (pack progName) <?> show progName)
@@ -90,6 +91,7 @@   anyCharNormalizeSpace = let normalizeSpace c = if isSpace c then ' ' else c
                             in  P.satisfyWith normalizeSpace $ const True
 
+  comment :: P.Parser Text -> P.Parser a -> P.Parser String
   comment start end = commentStart start
     *> ((end >> pure "")
         <|> (P.space *> (P.manyTill anyCharNormalizeSpace end <?> "-}")))
@@ -116,11 +118,9 @@ -- | Extract Stack arguments from a correctly placed and correctly formatted
 -- comment when it is being used as an interpreter
 getInterpreterArgs :: String -> IO (NonEmpty String)
-getInterpreterArgs file = do
-  eArgStr <- withSourceFile file parseFile
-  case eArgStr of
-    Left err -> handleFailure $ decodeError err
-    Right str -> parseArgStr str
+getInterpreterArgs file = withSourceFile file parseFile >>= \case
+  Left err -> handleFailure $ decodeError err
+  Right str -> parseArgStr str
  where
   parseFile src =
        runConduit
src/GHC/Utils/GhcPkg/Main/Compat.hs view
@@ -1,14 +1,6 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
-{-# LANGUAGE FlexibleInstances     #-}
-{-# LANGUAGE GADTs                 #-}
-{-# LANGUAGE KindSignatures        #-}
-{-# LANGUAGE LambdaCase            #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
-{-# LANGUAGE ScopedTypeVariables   #-}
-{-# LANGUAGE TupleSections         #-}
 
 {-|
 Module      : GHC.Utils.GhcPkg.Main.Compat
@@ -267,36 +259,32 @@   => GhcPkg.DbOpenMode mode t
   -> SomeBase Dir
   -> RIO env (PackageDB mode)
-readParseDatabase mode path = do
-  e <- tryIO $ prjSomeBase listDir path
-  case e of
-    Left err
-      | ioeGetErrorType err == InappropriateType -> do
-         -- We provide a limited degree of backwards compatibility for
-         -- old single-file style db:
-         mdb <- tryReadParseOldFileStyleDatabase mode path
-         case mdb of
-           Just db -> pure db
-           Nothing -> prettyThrowIO $ SingleFileDBUnsupported path
-
-      | otherwise -> liftIO $ ioError err
-    Right (_, fs) -> ignore_cache
-     where
-      confs = filter isConf fs
+readParseDatabase mode path = tryIO (prjSomeBase listDir path) >>= \case
+  Left err
+    | ioeGetErrorType err == InappropriateType ->
+       -- We provide a limited degree of backwards compatibility for
+       -- old single-file style db:
+       tryReadParseOldFileStyleDatabase mode path >>= \case
+         Just db -> pure db
+         Nothing -> prettyThrowIO $ SingleFileDBUnsupported path
+    | otherwise -> liftIO $ ioError err
+  Right (_, fs) -> ignore_cache
+   where
+    confs = filter isConf fs
 
-      isConf :: Path Abs File -> Bool
-      isConf f = case fileExtension f of
-        Nothing -> False
-        Just ext -> ext == ".conf"
+    isConf :: Path Abs File -> Bool
+    isConf f = case fileExtension f of
+      Nothing -> False
+      Just ext -> ext == ".conf"
 
-      ignore_cache :: RIO env (PackageDB mode)
-      ignore_cache = do
-        -- If we're opening for modification, we need to acquire a lock even if
-        -- we don't open the cache now, because we are going to modify it later.
-        lock <- liftIO $
-          F.mapM (const $ GhcPkg.lockPackageDb (prjSomeBase toFilePath cache)) mode
-        pkgs <- mapM parseSingletonPackageConf confs
-        mkPackageDB pkgs lock
+    ignore_cache :: RIO env (PackageDB mode)
+    ignore_cache = do
+      -- If we're opening for modification, we need to acquire a lock even if
+      -- we don't open the cache now, because we are going to modify it later.
+      lock <- liftIO $
+        F.mapM (const $ GhcPkg.lockPackageDb (prjSomeBase toFilePath cache)) mode
+      pkgs <- mapM parseSingletonPackageConf confs
+      mkPackageDB pkgs lock
  where
   cache = mapSomeBase (P.</> relFilePackageCache) path
 
src/Network/HTTP/StackClient.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE LambdaCase        #-}
 {-# LANGUAGE OverloadedStrings #-}
 
 {-|
src/Options/Applicative/Args.hs view
@@ -24,16 +24,18 @@ argsArgument :: O.Mod O.ArgumentFields [String] -> O.Parser [String]
 argsArgument =
   O.argument
-    (do s <- O.str
-        either O.readerError pure (parseArgsFromString Escaping s))
+    ( do s <- O.str
+         either O.readerError pure (parseArgsFromString Escaping s)
+    )
 
 -- | An option which accepts a list of arguments
 -- e.g. @--ghc-options="-X P.hs \"this\""@.
 argsOption :: O.Mod O.OptionFields [String] -> O.Parser [String]
 argsOption =
   O.option
-    (do s <- O.str
-        either O.readerError pure (parseArgsFromString Escaping s))
+    ( do s <- O.str
+         either O.readerError pure (parseArgsFromString Escaping s)
+    )
 
 -- | An option which accepts a command and a list of arguments
 -- e.g. @--exec "echo hello world"@
@@ -42,8 +44,8 @@   -> O.Parser (String, [String])
 cmdOption =
   O.option
-    (do s <- O.str
-        xs <- either O.readerError pure (parseArgsFromString Escaping s)
-        case xs of
-          [] -> O.readerError "Must provide a command"
-          x:xs' -> pure (x, xs'))
+    ( do s <- O.str
+         either O.readerError pure (parseArgsFromString Escaping s) >>= \case
+           [] -> O.readerError "Must provide a command"
+           x:xs' -> pure (x, xs')
+    )
src/Options/Applicative/Builder/Extra.hs view
@@ -66,7 +66,7 @@ -- "Options.Applicative.Builder.Extra" module.
 data OptionsApplicativeExtraException
   = FlagNotFoundBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception OptionsApplicativeExtraException where
   displayException FlagNotFoundBug =
src/Path/CheckInstall.hs view
@@ -34,8 +34,7 @@       searchPath
   if destDirIsInPATH
     then forM_ installed $ \exe -> do
-      mexePath <- (liftIO . D.findExecutable) exe
-      case mexePath of
+      (liftIO . D.findExecutable) exe >>= \case
         Just exePath -> do
           exeDir <-
             (liftIO . fmap FP.takeDirectory . D.canonicalizePath) exePath
src/Path/Find.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE DataKinds         #-}
 
 {-|
 Module      : Path.Find
@@ -104,12 +103,10 @@      MonadIO m
   => (Path Abs Dir -> m (Maybe a))
   -> Path Abs Dir -> m (Maybe a)
-findInParents f path = do
-  mres <- f path
-  case mres of
-    Just res -> pure (Just res)
-    Nothing -> do
-      let next = parent path
-      if next == path
-        then pure Nothing
-        else findInParents f next
+findInParents f path = f path >>= \case
+  Just res -> pure (Just res)
+  Nothing -> do
+    let next = parent path
+    if next == path
+      then pure Nothing
+      else findInParents f next
src/Stack.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE GADTs               #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -44,7 +43,7 @@ -- | Type representing exceptions thrown by functions in the "Stack" module.
 data StackException
   = InvalidReExecVersion String String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception StackException where
   displayException (InvalidReExecVersion expected actual) = concat
@@ -83,9 +82,7 @@     (nixOptsParser False)
     ("Only showing --" ++ nixCmdName ++ "* options.")
   currentDir <- getCurrentDirectory
-  eGlobalRun <-
-    try $ commandLineHandler currentDir progName mExecutablePath False
-  case eGlobalRun of
+  try (commandLineHandler currentDir progName mExecutablePath False) >>= \case
     Left (exitCode :: ExitCode) ->
       throwIO exitCode
     Right (globalMonoid, run) -> do
@@ -131,8 +128,7 @@ handleAnyPrettyException e = do
   -- The code below loads the entire Stack configuration, when all that is
   -- needed are the Stack colours. A tailored approach may be better.
-  result <- tryAny $ withConfig NoReexec $ prettyError $ pretty e
-  case result of
+  tryAny (withConfig NoReexec $ prettyError $ pretty e) >>= \case
     -- Falls back to the command line's Stack colours if there is any error in
     -- loading the entire Stack configuration.
     Left _ -> prettyError $ pretty e
src/Stack/Build.hs view
@@ -41,10 +41,6 @@ import           Stack.Prelude hiding ( loadPackage )
 import           Stack.Runners ( ShouldReexec (..), withConfig, withEnvConfig )
 import           Stack.Setup ( withNewLocalBuildTargets )
-import           Stack.Types.Build
-                   ( Plan (..), Task (..), TaskType (..), taskLocation
-                   , taskProvides
-                   )
 import           Stack.Types.Build.Exception
                    ( BuildException (..), BuildPrettyException (..) )
 import           Stack.Types.BuildConfig ( HasBuildConfig, configFileL )
@@ -72,6 +68,10 @@                    ( InstallLocation (..), LocalPackage (..), Package (..)
                    , PackageConfig (..), lpFiles, lpFilesForComponents
                    )
+import           Stack.Types.Plan
+                   ( Plan (..), Task (..), TaskType (..), taskLocation
+                   , taskProvides
+                   )
 import           Stack.Types.Platform ( HasPlatform (..) )
 import           Stack.Types.Runner ( Runner, globalOptsL )
 import           Stack.Types.SourceMap
@@ -79,7 +79,7 @@ 
 newtype CabalVersionPrettyException
   = CabalVersionNotSupported Version
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty CabalVersionPrettyException where
   pretty (CabalVersionNotSupported cabalVer) =
src/Stack/Build/Cache.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -34,7 +33,7 @@   , writePrecompiledCache
   , readPrecompiledCache
   -- Exported for testing
-  , BuildCache (..)
+  , BuildFileCache (..)
   ) where
 
 import           Crypto.Hash ( hashWith, SHA256 (..) )
@@ -63,11 +62,10 @@                    ( PrecompiledCacheKey, loadPrecompiledCache
                    , precompiledCacheKey, savePrecompiledCache
                    )
-import           Stack.Types.Build
-                   ( BuildCache (..), ConfigCache, FileCacheInfo
-                   , InstallLocation (..), Installed (..), PrecompiledCache (..)
+import           Stack.Types.Cache
+                   ( BuildFileCache (..), ConfigCache, ConfigCacheType (..)
+                   , FileCache, PrecompiledCache (..)
                    )
-import           Stack.Types.Cache ( ConfigCacheType (..) )
 import           Stack.Types.CompilerPaths ( cabalVersionL )
 import           Stack.Types.ComponentUtils
                    ( StackUnqualCompName, unqualCompToString )
@@ -81,14 +79,16 @@                    )
 import           Stack.Types.GhcPkgId ( ghcPkgIdString )
 import           Stack.Types.Installed
-                   (InstalledLibraryInfo (..), foldOnGhcPkgId' )
+                   ( InstallLocation (..), Installed (..)
+                   , InstalledLibraryInfo (..), foldOnGhcPkgId'
+                   )
 import           Stack.Types.NamedComponent
                    ( NamedComponent (..), componentCachePath )
 import           Stack.Types.SourceMap ( smRelDir )
 import           System.PosixCompat.Files
                    ( getFileStatus, modificationTime, setFileTimes )
 
--- | Directory containing files to mark an executable as installed
+-- | Directory containing files to mark an executable as installed.
 exeInstalledDir ::
      (HasEnvConfig env)
   => InstallLocation
@@ -96,7 +96,7 @@ exeInstalledDir Snap = (</> relDirInstalledPackages) <$> installationRootDeps
 exeInstalledDir Local = (</> relDirInstalledPackages) <$> installationRootLocal
 
--- | Get all of the installed executables
+-- | Get all of the installed executables.
 getInstalledExes ::
      (HasEnvConfig env)
   => InstallLocation
@@ -114,7 +114,7 @@     map (\x -> (pkgName x, [x])) $
     mapMaybe (parsePackageIdentifier . toFilePath . filename) files
 
--- | Mark the given executable as installed
+-- | Mark the given executable as installed.
 markExeInstalled ::
      (HasEnvConfig env)
   => InstallLocation
@@ -134,7 +134,7 @@   -- and invalidate this file in getInstalledExes if they no longer exist
   writeBinaryFileAtomic fp "Installed"
 
--- | Mark the given executable as not installed
+-- | Mark the given executable as not installed.
 markExeNotInstalled ::
      (HasEnvConfig env)
   => InstallLocation
@@ -148,7 +148,9 @@ buildCacheFile ::
      (HasEnvConfig env, MonadReader env m, MonadThrow m)
   => Path Abs Dir
+     -- ^ Package directory.
   -> NamedComponent
+     -- ^ Package component.
   -> m (Path Abs File)
 buildCacheFile dir component = do
   cachesDir <- buildCachesDir dir
@@ -161,36 +163,41 @@ tryGetBuildCache ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> NamedComponent
-  -> RIO env (Maybe (Map FilePath FileCacheInfo))
+     -- ^ Package component.
+  -> RIO env (Maybe FileCache)
 tryGetBuildCache dir component = do
   fp <- buildCacheFile dir component
   ensureDir $ parent fp
-  let decode :: MonadIO m => m BuildCache
+  let decode :: MonadIO m => m BuildFileCache
       decode = Yaml.decodeFileThrow (toFilePath fp)
-  either (const Nothing) (Just . (.times)) <$> liftIO (tryAny decode)
+  either (const Nothing) (Just . (.fileCache)) <$> liftIO (tryAny decode)
 
--- | Try to read the dirtiness cache for the given package directory.
+-- | Try to read the Cabal configuration cache for the given package directory.
 tryGetConfigCache ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> RIO env (Maybe ConfigCache)
 tryGetConfigCache dir =
   loadConfigCache $ configCacheKey dir ConfigCacheTypeConfig
 
--- | Try to read the mod time of the Cabal file from the last build
+-- | Try to read the modification time of the Cabal file from the last build.
 tryGetCabalMod ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> RIO env (Maybe CTime)
 tryGetCabalMod dir = do
   fp <- toFilePath <$> configCabalMod dir
   tryGetFileMod fp
 
--- | Try to read the mod time of setup-config file from the last build
+-- | Try to read the modification time of setup-config file from the last build.
 tryGetSetupConfigMod ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> RIO env (Maybe CTime)
 tryGetSetupConfigMod dir = do
   fp <- toFilePath <$> configSetupConfigMod dir
@@ -201,7 +208,7 @@   liftIO $ either (const Nothing) (Just . modificationTime) <$>
     tryIO (getFileStatus fp)
 
--- | Try to read the project root from the last build of a package
+-- | Try to read the project root from the last build of a package.
 tryGetPackageProjectRoot ::
      HasEnvConfig env
   => Path Abs Dir
@@ -219,17 +226,23 @@ writeBuildCache ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> NamedComponent
-  -> Map FilePath FileCacheInfo -> RIO env ()
-writeBuildCache dir component times = do
+     -- ^ Package component.
+  -> FileCache
+     -- ^ File cache.
+  -> RIO env ()
+writeBuildCache dir component fileCache = do
   fp <- toFilePath <$> buildCacheFile dir component
-  liftIO $ Yaml.encodeFile fp BuildCache { times = times }
+  liftIO $ Yaml.encodeFile fp BuildFileCache { fileCache }
 
--- | Write the dirtiness cache for this package's configuration.
+-- | Write the given Cabal configuration cache for the given package directory.
 writeConfigCache ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> ConfigCache
+     -- ^ Cabal configuration cache.
   -> RIO env ()
 writeConfigCache dir =
   saveConfigCache (configCacheKey dir ConfigCacheTypeConfig)
@@ -238,6 +251,7 @@ writeCabalMod ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> CTime
   -> RIO env ()
 writeCabalMod dir x = do
@@ -269,8 +283,12 @@   fp <- configPackageProjectRoot dir
   writeBinaryFileAtomic fp (byteString projectRoot)
 
--- | Delete the caches for the project.
-deleteCaches :: HasEnvConfig env => Path Abs Dir -> RIO env ()
+-- | Delete the Cabal configuration cache for the given package directory.
+deleteCaches ::
+     HasEnvConfig env
+  => Path Abs Dir
+     -- ^ Package directory.
+  -> RIO env ()
 deleteCaches dir =
   {- FIXME confirm that this is acceptable to remove
   bfp <- buildCacheFile dir
@@ -278,6 +296,8 @@   -}
   deactiveConfigCache $ configCacheKey dir ConfigCacheTypeConfig
 
+-- | For the given installed item, yields the key used to retrieve a record from
+-- the library Cabal flag cache or executable Cabal flag cache.
 flagCacheKey :: (HasEnvConfig env) => Installed -> RIO env ConfigCacheKey
 flagCacheKey installed = do
   installationRoot <- installationRootLocal
@@ -288,7 +308,7 @@     Executable ident -> pure $
       configCacheKey installationRoot (ConfigCacheTypeFlagExecutable ident)
 
--- | Loads the flag cache for the given installed extra-deps.
+-- | Loads the Cabal flag cache for the given installed extra-deps.
 tryGetFlagCache ::
      HasEnvConfig env
   => Installed
@@ -297,7 +317,7 @@   key <- flagCacheKey gid
   loadConfigCache key
 
--- | Write the flag cache for the given installed extra-deps.
+-- | Write the Cabal flag cache for the given installed extra-deps.
 writeFlagCache ::
      HasEnvConfig env
   => Installed
@@ -312,17 +332,22 @@ failureBS = "failure"
 unknownBS = "unknown"
 
--- | Status of a test suite
+-- | Status of test suite(s).
 data TestStatus
   = TSSuccess
+    -- ^ The test suite(s) succeeded.
   | TSFailure
+    -- ^ One or more test suites failed.
   | TSUnknown
+    -- ^ The outcome of the test suite(s) is unknown.
 
--- | Mark test suite status
+-- | Mark test suite status.
 setTestStatus ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> TestStatus
+     -- ^ The status of the test suite(s).
   -> RIO env ()
 setTestStatus dir status = do
   fp <- testSuccessFile dir
@@ -332,22 +357,21 @@       TSFailure -> failureBS
       TSUnknown -> unknownBS
 
--- | Check if the test suite already passed
+-- | Check if the test suite(s) already passed.
 getTestStatus ::
      HasEnvConfig env
   => Path Abs Dir
+     -- ^ Package directory.
   -> RIO env TestStatus
 getTestStatus dir = do
   fp <- testSuccessFile dir
   -- we could ensure the file is the right size first, but we're not expected an
   -- attack from the user's filesystem
-  eres <- tryIO (readFileBinary $ toFilePath fp)
-  pure $
-    case eres of
-      Right bs
-        | bs == successBS -> TSSuccess
-        | bs == failureBS -> TSFailure
-      _ -> TSUnknown
+  tryIO (readFileBinary $ toFilePath fp) <&> \case
+    Right bs
+      | bs == successBS -> TSSuccess
+      | bs == failureBS -> TSFailure
+    _ -> TSUnknown
 
 --------------------------------------
 -- Precompiled Cache
src/Stack/Build/ConstructPlan.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
 {-# LANGUAGE ViewPatterns          #-}
@@ -25,6 +24,7 @@ import qualified Data.Text as T
 import           Distribution.Types.BuildType ( BuildType (Configure) )
 import           Distribution.Types.PackageName ( mkPackageName )
+import           Distribution.Version ( mkVersion )
 import           Path ( parent )
 import qualified RIO.NonEmpty as NE
 import           RIO.Process ( findExecutable )
@@ -34,6 +34,10 @@ import           Stack.Build.Cache ( tryGetFlagCache )
 import           Stack.Build.Haddock ( shouldHaddockDeps )
 import           Stack.Build.Source ( loadLocalPackage )
+import           Stack.ConfigureOpts
+                   ( configureOptsFromBase, packageConfigureOptsFromPackage
+                   , renderConfigureOpts
+                   )
 import           Stack.Constants ( compilerOptionsCabalFlag )
 import           Stack.Package
                    ( applyForceCustomBuild, buildableExes, packageUnknownTools
@@ -41,12 +45,6 @@                    )
 import           Stack.Prelude hiding ( loadPackage )
 import           Stack.SourceMap ( getPLIVersion, mkProjectPackage )
-import           Stack.Types.Build
-                   ( CachePkgSrc (..), ConfigCache (..), Plan (..), Task (..)
-                   , TaskConfigOpts (..), TaskType (..)
-                   , installLocationIsMutable, taskIsTarget, taskLocation
-                   , taskProvides, taskTargetIsMutable, toCachePkgSrc
-                   )
 import           Stack.Types.Build.ConstructPlan
                    ( AddDepRes (..), CombinedMap, Ctx (..), M
                    , MissingPresentDeps (..), PackageInfo (..), ToolWarning(..)
@@ -62,14 +60,14 @@ import           Stack.Types.BuildOpts ( BuildOpts (..) )
 import           Stack.Types.BuildOptsCLI
                    ( BuildOptsCLI (..), BuildSubset (..) )
+import           Stack.Types.Cache ( CachePkgSrc (..), ConfigCache (..) )
 import           Stack.Types.CompCollection ( collectionMember )
-import           Stack.Types.Compiler ( WhichCompiler (..) )
+import           Stack.Types.Compiler ( WhichCompiler (..), getGhcVersion )
 import           Stack.Types.CompilerPaths
                    ( CompilerPaths (..), HasCompiler (..) )
 import           Stack.Types.ComponentUtils ( unqualCompFromText )
 import           Stack.Types.Config ( Config (..), HasConfig (..), stackRootL )
 import           Stack.Types.ConfigureOpts ( BaseConfigOpts (..) )
-import qualified Stack.Types.ConfigureOpts as ConfigureOpts
 import           Stack.Types.Curator ( Curator (..) )
 import           Stack.Types.Dependency ( DepValue (..), isDepTypeLibrary )
 import           Stack.Types.DumpPackage ( DumpPackage (..), sublibParentPkgId )
@@ -89,6 +87,11 @@                    , PackageSource (..), installedMapGhcPkgId
                    , packageIdentifier, psVersion, runMemoizedWith
                    )
+import           Stack.Types.Plan
+                   ( Plan (..), Task (..), TaskConfigOpts (..), TaskType (..)
+                   , installLocationIsMutable, taskIsTarget, taskLocation
+                   , taskProvides, taskTargetIsMutable
+                   )
 import           Stack.Types.ProjectConfig ( isPCGlobalProject )
 import           Stack.Types.Runner ( HasRunner (..), globalOptsL )
 import           Stack.Types.SourceMap
@@ -143,22 +146,45 @@   = do
     logDebug "Constructing the build plan"
 
-    when hasBaseInDeps $
+    config <- view configL
+    let ghcVersion = getGhcVersion sourceMap.compiler
+        isBaseWiredIn = ghcVersion < mkVersion [9,12]
+    when (hasBaseInDeps && (isBaseWiredIn || config.notifyIfBaseNotBoot)) $ do
+      let intro = fillSep
+            [ flow "Before GHC 9.12.1, the base package is a GHC wired-in \
+                   \one. For other GHC versions it is not. You are using"
+            , style Current $ "GHC " <> fromString (versionString ghcVersion)
+            , flow "and trying to replace its"
+            , style Current "base"
+            , flow "boot package."
+            ]
+          adviceInit = if isBaseWiredIn
+            then
+              [ flow "Almost certainly, that is not what you really want to \
+                     \do. Consider removing"
+              ]
+            else
+              [ flow "That may be not what you want to do. If not, consider \
+                     \removing"
+              ]
+          adviceRest =
+            [ style Current "base"
+            , flow "as an"
+            , style Shell "extra-deps" <> ","
+            , flow "or, if you need a particular version of"
+            , style Current "base" <> ","
+            , flow "consider using a different GHC version."
+            ]
+          adviceMute = fillSep
+            [ flow "To mute this message in future, set"
+            , style Shell (flow "notify-if-base-not-boot: false")
+            , flow "in Stack's configuration."
+            ]
       prettyWarn $
-           fillSep
-             [ flow "You are trying to upgrade or downgrade the"
-             , style Current "base"
-             , flow "package, which is almost certainly not what you really \
-                    \want. Please, consider using another GHC version if you \
-                    \need a certain version of"
-             , style Current "base" <> ","
-             , flow "or removing"
-             , style Current "base"
-             , flow "as an"
-             , style Shell "extra-deps" <> "."
-             , flow "For further information, see"
-             , style Url "https://github.com/commercialhaskell/stack/issues/3940" <> "."
-             ]
+           intro
+        <> blankLine
+        <> fillSep (adviceInit <> adviceRest)
+        <> (if isBaseWiredIn then mempty else blankLine <> adviceMute)
         <> line
 
     econfig <- view envConfigL
@@ -441,11 +467,10 @@      -- ^ Should Haddock documentation be built?
   -> M ()
 addFinal lp package allInOne buildHaddocks = do
-  depsRes <- addPackageDeps package
-  res <- case depsRes of
+  res <- addPackageDeps package >>= \case
     Left e -> pure $ Left e
     Right (MissingPresentDeps missing present _minLoc) -> do
-      let pkgConfigOpts = ConfigureOpts.packageConfigureOptsFromPackage package
+      let pkgConfigOpts = packageConfigureOptsFromPackage package
       ctx <- ask
       let configOpts = TaskConfigOpts
             { missing
@@ -499,6 +524,7 @@   -> M (Either ConstructPlanException AddDepRes)
 checkCallStackAndAddDep name = do
   ctx <- ask
+  let compiler = ctx.ctxEnvConfig.sourceMap.compiler
   res <- if name `elem` ctx.callStack
     then do
       logDebugPlanS "checkCallStackAndAddDep" $
@@ -515,7 +541,7 @@              "No package info for "
           <> fromPackageName name
           <> "."
-        pure $ Left $ UnknownPackage name
+        pure $ Left $ UnknownPackage compiler name
       Just packageInfo ->
         -- Add the current package name to the head of the call stack.
         local (\ctx' -> ctx' { callStack = name : ctx'.callStack }) $
@@ -541,9 +567,8 @@       -- FIXME Slightly hacky, no flags since they likely won't affect
       -- executable names. This code does not feel right.
       let version = installedVersion installed
-          askPkgLoc = liftRIO $ do
-            mrev <- getLatestHackageRevision YesRequireHackageIndex name version
-            case mrev of
+          askPkgLoc = liftRIO $
+            getLatestHackageRevision YesRequireHackageIndex name version >>= \case
               Nothing -> do
                 -- This could happen for GHC boot libraries missing from
                 -- Hackage.
@@ -713,9 +738,8 @@   -> Package
   -> Maybe Installed
   -> M (Either ConstructPlanException AddDepRes)
-resolveDepsAndInstall isAllInOne buildHaddocks ps package minstalled = do
-  res <- addPackageDeps package
-  case res of
+resolveDepsAndInstall isAllInOne buildHaddocks ps package minstalled =
+  addPackageDeps package >>= \case
     Left err -> pure $ Left err
     Right deps ->
       Right <$>
@@ -756,7 +780,7 @@     ctx <- ask
     let loc = psLocation ps
         isMutable = installLocationIsMutable loc <> minMutable
-        pkgConfigOpts = ConfigureOpts.packageConfigureOptsFromPackage package
+        pkgConfigOpts = packageConfigureOptsFromPackage package
         configOpts = TaskConfigOpts
             { missing
             , envConfig = ctx.ctxEnvConfig
@@ -810,8 +834,7 @@ addPackageDeps package = do
   checkAndWarnForUnknownTools package
   let pkgId = packageIdentifier package
-  result <- processPackageDepsEither package (processDep pkgId)
-  pure $ case result of
+  processPackageDepsEither package (processDep pkgId) <&> \case
     -- Note that the Monoid for 'IsMutable' means that if any is 'Mutable',
     -- the result is 'Mutable'. Otherwise the result is 'Immutable'.
     Right v -> Right v
@@ -838,14 +861,13 @@            MissingPresentDeps
        )
 processDep pkgId name value = do
-  eRes <- getCachedDepOrAddDep name
   let failure mLatestApp err =
         Left $ Map.singleton name (range, mLatestApp, err)
-  case eRes of
+  getCachedDepOrAddDep name >>= \case
     Left e -> do
       addParent
       let bd = case e of
-            UnknownPackage name' -> assert (name' == name) NotInBuildPlan
+            UnknownPackage _ name' -> assert (name' == name) NotInBuildPlan
             DependencyCycleDetected names -> BDDependencyCycleDetected names
             -- Ultimately we won't show any information on this to the user;
             -- we'll allow the dependency failures alone to display to avoid
@@ -1021,9 +1043,8 @@ checkDirtiness ps installed package present buildHaddocks = do
   ctx <- ask
   moldOpts <- runRIO ctx $ tryGetFlagCache installed
-  let packageConfigureOpt =
-        ConfigureOpts.packageConfigureOptsFromPackage package
-      configureOpts = ConfigureOpts.configureOpts
+  let packageConfigureOpt = packageConfigureOptsFromPackage package
+      configureOpts = configureOptsFromBase
         (view envConfigL ctx)
         ctx.baseConfigOpts
         present
@@ -1050,21 +1071,27 @@         | Just reason <- describeConfigDiff config oldOpts wantConfigCache ->
             pure $ Just reason
         | True <- psForceDirty ps -> pure $ Just "--force-dirty specified"
-        | otherwise -> do
-            dirty <- psDirty ps
-            pure $
-              case dirty of
-                Just files -> Just $
-                     "local file changes: "
-                  <> addEllipsis (T.pack $ unwords $ Set.toList files)
-                Nothing -> Nothing
+        | otherwise ->
+            psDirty ps <&> \case
+              Just files -> Just $
+                   "local file changes: "
+                <> addEllipsis (T.pack $ unwords $ Set.toList files)
+              Nothing -> Nothing
   case mreason of
     Nothing -> pure False
     Just reason -> do
       tell mempty { wDirty = Map.singleton package.name reason }
       pure True
 
-describeConfigDiff :: Config -> ConfigCache -> ConfigCache -> Maybe Text
+-- | If the new Cabal configuration cache is the same as the old, yields
+-- 'Nothing'. Otherwise yields 'Just' a textual explanation of how they differ.
+describeConfigDiff ::
+     Config
+  -> ConfigCache
+     -- ^ The old Cabal configuration cache.
+  -> ConfigCache
+     -- ^ The new Cabal configuration cache.
+  -> Maybe Text
 describeConfigDiff config old new
   | old.pkgSrc /= new.pkgSrc = Just $
       "switching from " <>
@@ -1112,7 +1139,7 @@                 then id
                 else stripGhcOptions)
            . map T.pack
-           . ConfigureOpts.renderConfigureOpts
+           . renderConfigureOpts
            . (.configureOpts)
    where
     -- options set by Stack
@@ -1212,9 +1239,8 @@ inSnapshot :: PackageName -> Version -> M Bool
 inSnapshot name version = do
   ctx <- ask
-  pure $ fromMaybe False $ do
-    ps <- Map.lookup name ctx.combinedMap
-    case ps of
+  pure $ fromMaybe False $
+    Map.lookup name ctx.combinedMap >>= \case
       PIOnlySource (PSRemote _ srcVersion FromSnapshot _) ->
         pure $ srcVersion == version
       PIBoth (PSRemote _ srcVersion FromSnapshot _) _ ->
@@ -1261,3 +1287,8 @@   (Map.mapMissing (\_ s -> PIOnlySource s))
   (Map.mapMissing (\_ i -> uncurry PIOnlyInstalled i))
   (Map.zipWithMatched (\_ s i -> combineSourceInstalled s i))
+
+toCachePkgSrc :: PackageSource -> CachePkgSrc
+toCachePkgSrc (PSFilePath lp) =
+  CacheSrcLocal (toFilePath (parent lp.cabalFP))
+toCachePkgSrc PSRemote{} = CacheSrcUpstream
src/Stack/Build/Execute.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 {-# LANGUAGE TypeFamilies        #-}
@@ -59,10 +58,7 @@ import           Stack.GhcPkg ( unregisterGhcPkgIds )
 import           Stack.Prelude
 import           Stack.Types.Build
-                   ( ExcludeTHLoading (..), KeepOutputOpen (..), Plan (..)
-                   , Task (..), TaskConfigOpts (..), TaskType (..), taskLocation
-                   , taskProvides
-                   )
+                   ( ExcludeTHLoading (..), KeepOutputOpen (..) )
 import           Stack.Types.Build.Exception ( BuildPrettyException (..) )
 import           Stack.Types.BuildOpts
                    ( BenchmarkOpts (..), BuildOpts (..), TestOpts (..) )
@@ -89,6 +85,10 @@                    ( NamedComponent, benchComponents, testComponents )
 import           Stack.Types.Package
                    ( LocalPackage (..), Package (..), packageIdentifier )
+import           Stack.Types.Plan
+                   ( Plan (..), Task (..), TaskConfigOpts (..), TaskType (..)
+                   , taskLocation, taskProvides
+                   )
 import           Stack.Types.Platform ( HasPlatform (..) )
 import           Stack.Types.Runner ( terminalL, viewExecutablePath )
 import           Stack.Types.SourceMap ( Target )
src/Stack/Build/ExecuteEnv.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
@@ -79,8 +78,7 @@ import           Stack.Types.ApplyGhcOptions ( ApplyGhcOptions (..) )
 import           Stack.Types.Build
                    ( ConvertPathsToAbsolute (..), ExcludeTHLoading (..)
-                   , KeepOutputOpen (..), TaskType (..), taskTypeLocation
-                   , taskTypePackageIdentifier
+                   , KeepOutputOpen (..)
                    )
 import           Stack.Types.Build.Exception
                    ( BuildException (..), BuildPrettyException (..) )
@@ -108,6 +106,9 @@ import           Stack.Types.Installed ( InstallLocation (..), Installed (..) )
 import           Stack.Types.Package
                    ( LocalPackage (..), Package (..), packageIdentifier )
+import           Stack.Types.Plan
+                   ( TaskType (..), taskTypeLocation, taskTypePackageIdentifier
+                   )
 import           Stack.Types.Platform ( HasPlatform (..) )
 import           Stack.Types.Version ( withinRange )
 import qualified System.Directory as D
@@ -369,8 +370,7 @@       -- No log files generated, nothing to dump
       [] -> pure ()
       firstLog:_ -> do
-        toDump <- view $ configL . to (.dumpLogs)
-        case toDump of
+        view (configL . to (.dumpLogs)) >>= \case
           DumpAllLogs -> mapM_ (dumpLog "") allLogs
           DumpWarningLogs -> mapM_ dumpLogIfWarning allLogs
           DumpNoLogs
@@ -392,9 +392,8 @@     when colors $ liftIO $ mapM_ (stripColors . snd) allLogs
    where
     drainChan :: STM [(Path Abs Dir, Path Abs File)]
-    drainChan = do
-      mx <- tryReadTChan chan
-      case mx of
+    drainChan =
+      tryReadTChan chan >>= \case
         Nothing -> pure []
         Just x -> do
           xs <- drainChan
src/Stack/Build/ExecutePackage.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
 {-# LANGUAGE TypeFamilies          #-}
@@ -72,6 +70,8 @@                    )
 import           Stack.Build.Source ( addUnlistedToBuildCache )
 import           Stack.Config.ConfigureScript ( ensureConfigureScript )
+import           Stack.ConfigureOpts
+                   ( configureOptsFromBase, renderConfigureOpts )
 import           Stack.Constants
                    ( bindirSuffix, compilerOptionsCabalFlag, testGhcEnvRelFile )
 import           Stack.Constants.Config
@@ -82,17 +82,10 @@ import           Stack.GhcPkg ( ghcPkg, ghcPkgPathEnvVar, unregisterGhcPkgIds )
 import           Stack.Package
                    ( buildLogPath, buildableExes, buildableSubLibs
-                   , hasBuildableMainLibrary, mainLibraryHasExposedModules
+                   , hasBuildableMainLibrary
                    )
 import           Stack.PackageDump ( conduitDumpPackage, ghcPkgDescribe )
 import           Stack.Prelude
-import           Stack.Types.Build
-                   ( ConfigCache (..), PrecompiledCache (..), Task (..)
-                   , TaskConfigOpts (..), TaskType (..), taskIsTarget
-                   , taskLocation, taskProvides, taskTargetIsMutable
-                   , taskTypePackageIdentifier
-                   )
-import qualified Stack.Types.Build as ConfigCache ( ConfigCache (..) )
 import           Stack.Types.Build.Exception
                    ( BuildException (..), BuildPrettyException (..) )
 import           Stack.Types.BuildConfig
@@ -102,6 +95,9 @@                    , TestOpts (..)
                    )
 import           Stack.Types.BuildOptsCLI ( BuildOptsCLI (..) )
+import           Stack.Types.Cache
+                   ( ConfigCache (..), PrecompiledCache (..) )
+import qualified Stack.Types.Cache as ConfigCache ( ConfigCache (..) )
 import           Stack.Types.CompCollection
                    ( collectionKeyValueList, collectionLookup
                    , foldComponentToAnotherCollection, getBuildableListText
@@ -120,7 +116,6 @@ import           Stack.Types.Config ( Config (..), HasConfig (..) )
 import           Stack.Types.ConfigureOpts
                    ( BaseConfigOpts (..), ConfigureOpts (..) )
-import qualified Stack.Types.ConfigureOpts as ConfigureOpts
 import           Stack.Types.Curator ( Curator (..) )
 import           Stack.Types.DumpPackage ( DumpPackage (..) )
 import           Stack.Types.EnvConfig
@@ -145,6 +140,11 @@                    , toCabalMungedPackageName
                    )
 import           Stack.Types.PackageFile ( PackageWarning (..) )
+import           Stack.Types.Plan
+                   ( Task (..), TaskConfigOpts (..), TaskType (..), taskIsTarget
+                   , taskLocation, taskProvides, taskTargetIsMutable
+                   , taskTypePackageIdentifier
+                   )
 import           Stack.Types.Runner ( HasRunner, globalOptsL )
 import           Stack.Types.SourceMap ( SourceMap (..) )
 import           System.IO.Error ( isDoesNotExistError )
@@ -152,7 +152,7 @@                    ( createLink, getFileStatus, modificationTime )
 import           System.Random ( randomIO )
 
--- | Generate the ConfigCache
+-- | Generate the t'ConfigCache' value.
 getConfigCache ::
      HasEnvConfig env
   => ExecuteEnv
@@ -196,7 +196,7 @@       -- where it was the opposite resulted in this. It doesn't seem to make any
       -- difference anyway.
       allDepsMap = Map.union missing' task.present
-      configureOpts' = ConfigureOpts.configureOpts
+      configureOpts' = configureOptsFromBase
         cOpts.envConfig
         cOpts.baseConfigOpts
         allDepsMap
@@ -258,15 +258,14 @@           -- need proper hashes for package identifiers.
       then pure True
       else do
-        -- We can ignore the components portion of the config
-        -- cache, because it's just used to inform 'construct
-        -- plan that we need to plan to build additional
-        -- components. These components don't affect the actual
-        -- package configuration.
+        -- We can ignore the components field of the Cabal configuration cache,
+        -- because it is only used to inform 'construct plan' that we need to
+        -- plan to build additional components. These components don't affect
+        -- the Cabal configuration for the package.
         let ignoreComponents :: ConfigCache -> ConfigCache
             ignoreComponents cc = cc { ConfigCache.components = Set.empty }
-        -- Determine the old and new configuration in the local directory, to
-        -- determine if we need to reconfigure.
+        -- Determine the old and new Cabal configuration for the package
+        -- directory, to determine if we need to reconfigure.
         mOldConfigCache <- tryGetConfigCache pkgDir
 
         mOldCabalMod <- tryGetCabalMod pkgDir
@@ -300,14 +299,13 @@               [ ("ghc", toFilePath cp.compiler)
               , ("ghc-pkg", toFilePath pkgPath)
               ]
-    exes <- forM programNames $ \(name, file) -> do
-      mpath <- findExecutable file
-      pure $ case mpath of
+    exes <- forM programNames $ \(name, file) ->
+      findExecutable file <&> \case
         Left _ -> []
         Right x -> pure $ concat ["--with-", name, "=", x]
     let allOpts =
              concat exes
-          <> ConfigureOpts.renderConfigureOpts newConfigCache.configureOpts
+          <> renderConfigureOpts newConfigCache.configureOpts
     -- Configure cabal with arguments determined by
     -- Stack.Types.Build.configureOpts
     cabal KeepTHLoading $ "configure" : allOpts
@@ -349,9 +347,11 @@ 
 -- | Implements running a package's build, used to implement
 -- 'Control.Concurrent.Execute.ATBuild' and
--- 'Control.Concurrent.Execute.ATBuildFinal' tasks. In particular this does the
--- following:
+-- 'Control.Concurrent.Execute.ATBuildFinal' tasks. The latter is a task for
+-- building a package's benchmarks and test-suites.
 --
+-- In particular this does the following:
+--
 -- * Checks if the package exists in the precompiled cache, and if so, add it to
 --   the database instead of performing the build.
 --
@@ -473,12 +473,9 @@  where
   pkgId = taskProvides task
   PackageIdentifier pname _ = pkgId
-  doHaddock curator package =
+  doHaddock curator =
        task.buildHaddocks
     && not isFinalBuild
-       -- Works around haddock failing on bytestring-builder since it has no
-       -- modules when bytestring is new enough.
-    && mainLibraryHasExposedModules package
        -- Special help for the curator tool to avoid haddocks that are known
        -- to fail
     && maybe True (Set.notMember pname . (.skipHaddock)) curator
@@ -595,7 +592,7 @@     postBuildCheck True
 
     mcurator <- view $ buildConfigL . to (.curator)
-    when (doHaddock mcurator package) $ do
+    when (doHaddock mcurator) $ do
       let isTaskTargetMutable = taskTargetIsMutable task == Mutable
           isHaddockForHackage =
             ee.buildOpts.haddockForHackage && isTaskTargetMutable
@@ -642,8 +639,7 @@           && (hasLibrary || hasSubLibraries || hasExecutables)
     when shouldCopy $ withMVar ee.installLock $ \() -> do
       announce "copy/register"
-      eres <- try $ cabal KeepTHLoading $ "copy" : copyOpts
-      case eres of
+      try (cabal KeepTHLoading $ "copy" : copyOpts) >>= \case
         Left err@CabalExitedUnsuccessfully{} ->
           throwM $ CabalCopyFailed
                      (package.buildType == C.Simple)
@@ -736,8 +732,7 @@         package.subLibraries
         foldSubLibToMap
         mempty
-      mGhcPkgId <- ghcPkgIdLoader Nothing
-      case mGhcPkgId of
+      ghcPkgIdLoader Nothing >>= \case
         Nothing -> throwM $ Couldn'tFindPkgId package.name
         Just ghcPkgId -> pure $ simpleInstalledLib pkgId ghcPkgId subLibsPkgIds
     else do
@@ -805,12 +800,8 @@   -> RIO env (Maybe (PrecompiledCache Abs))
 getPrecompiled cache taskType bcoSnapInstallRoot =
   case taskType of
-    TTRemotePackage Immutable _ loc -> do
-      mpc <- readPrecompiledCache
-                loc
-                cache.configureOpts
-                cache.buildHaddocks
-      case mpc of
+    TTRemotePackage Immutable _ loc ->
+      readPrecompiledCache loc cache.configureOpts cache.buildHaddocks >>= \case
         Nothing -> pure Nothing
         -- Only pay attention to precompiled caches that refer to packages
         -- within the snapshot.
@@ -928,8 +919,8 @@         case mpkgid of
           Nothing -> assert False $ Executable pkgId
           Just pkgid -> simpleInstalledLib pkgId pkgid mempty
-  where
-    bindir = ee.baseConfigOpts.snapInstallRoot </> bindirSuffix
+ where
+  bindir = ee.baseConfigOpts.snapInstallRoot </> bindirSuffix
 
 loadInstalledPkg ::
      (HasCompiler env, HasProcessContext env, HasTerm env)
@@ -954,16 +945,15 @@   -> (KeepOutputOpen -> m ())
   -> m ()
 fulfillHaddockExpectations pname mcurator action
-  | expectHaddockFailure mcurator = do
-      eres <- tryAny $ action KeepOpen
-      case eres of
+  | expectHaddockFailure mcurator =
+      tryAny (action KeepOpen) >>= \case
         Right () -> prettyWarnL
           [ style Current (fromPackageName pname) <> ":"
           , flow "unexpected Haddock success."
           ]
         Left _ -> pure ()
-  where
-    expectHaddockFailure = maybe False (Set.member pname . (.expectHaddockFailure))
+ where
+  expectHaddockFailure = maybe False (Set.member pname . (.expectHaddockFailure))
 fulfillHaddockExpectations _ _ action = action CloseOnException
 
 -- | Check if any unlisted files have been found, and add them to the build cache.
@@ -1013,9 +1003,8 @@         if topts.runTests
           then if topts.rerunTests
             then pure True
-            else do
-              status <- getTestStatus pkgDir
-              case status of
+            else
+              getTestStatus pkgDir >>= \case
                 TSSuccess -> do
                   unless (null testsToRun) $
                     announce "skipping already passed test"
@@ -1379,9 +1368,8 @@   -> RIO env b
   -> RIO env b
 fulfillCuratorBuildExpectations pname mcurator enableTests _ defValue action
-  | enableTests && expectTestFailure pname mcurator = do
-      eres <- tryAny action
-      case eres of
+  | enableTests && expectTestFailure pname mcurator =
+      tryAny action >>= \case
         Right res -> do
           prettyWarnL
             [ style Current (fromPackageName pname) <> ":"
@@ -1390,9 +1378,8 @@           pure res
         Left _ -> pure defValue
 fulfillCuratorBuildExpectations pname mcurator _ enableBench defValue action
-  | enableBench && expectBenchmarkFailure pname mcurator = do
-      eres <- tryAny action
-      case eres of
+  | enableBench && expectBenchmarkFailure pname mcurator =
+      tryAny action >>= \case
         Right res -> do
           prettyWarnL
             [ style Current (fromPackageName pname) <> ":"
src/Stack/Build/Haddock.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE LambdaCase          #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -227,15 +226,13 @@     (liftIO . fmap nubOrd . mapMaybeM toInterfaceOpt) dumpPackages
   unless (null interfaceOpts) $ do
     let destIndexFile = haddockIndexFile destDir
-    eindexModTime <- liftIO (tryGetModificationTime destIndexFile)
-    let needUpdate =
-          case eindexModTime of
-            Left _ -> True
-            Right indexModTime ->
-              or [ mt > indexModTime
-                 | mt <- map (.srcInterfaceFileModTime) interfaceOpts
-                 ]
         prettyDescr = style Current (fromString $ T.unpack descr)
+    needUpdate <- liftIO (tryGetModificationTime destIndexFile) <&> \case
+      Left _ -> True
+      Right indexModTime ->
+        or [ mt > indexModTime
+           | mt <- map (.srcInterfaceFileModTime) interfaceOpts
+           ]
     if needUpdate
       then do
         prettyInfo $
@@ -343,27 +340,24 @@               "-i" : intersperse "-i" (interfaces : compInterfaces)
         destInterfaceFile <-
           parseCollapsedAbsFile (toFilePath destDir FP.</> destInterfaceRelFP)
-        eSrcInterfaceFileModTime <- tryGetModificationTime srcInterfaceFile
-        pure $
-          case eSrcInterfaceFileModTime of
-            Left _ -> Nothing
-            Right srcInterfaceFileModTime ->
-              Just InterfaceOpt
-                { readInterfaceArgs
-                , srcInterfaceFileModTime
-                , srcInterfaceFile
-                , destInterfaceFile
-                }
+        tryGetModificationTime srcInterfaceFile <&> \case
+          Left _ -> Nothing
+          Right srcInterfaceFileModTime ->
+            Just InterfaceOpt
+              { readInterfaceArgs
+              , srcInterfaceFileModTime
+              , srcInterfaceFile
+              , destInterfaceFile
+              }
   copyPkgDocs :: InterfaceOpt -> IO ()
-  copyPkgDocs opts = do
+  copyPkgDocs opts =
   -- Copy dependencies' haddocks to documentation directory.  This way,
   -- relative @../$pkg-$ver@ links work and it's easy to upload docs to a web
   -- server or otherwise view them in a non-local-filesystem context. We copy
   -- instead of symlink for two reasons: (1) symlinks aren't reliably supported
   -- on Windows, and (2) the filesystem containing dependencies' docs may not be
   -- available where viewing the docs (e.g. if building in a Docker container).
-    edestInterfaceModTime <- tryGetModificationTime opts.destInterfaceFile
-    case edestInterfaceModTime of
+    tryGetModificationTime opts.destInterfaceFile >>= \case
       Left _ -> doCopy
       Right destInterfaceModTime
         | destInterfaceModTime < opts.srcInterfaceFileModTime -> doCopy
src/Stack/Build/Installed.hs view
@@ -2,7 +2,6 @@ {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
-{-# LANGUAGE ScopedTypeVariables   #-}
 
 {-|
 Module      : Stack.Build.Installed
@@ -27,12 +26,13 @@                    ( conduitDumpPackage, ghcPkgDump, pruneDeps )
 import           Stack.Prelude
 import           Stack.SourceMap ( getPLIVersion, loadVersion )
+import           Stack.Types.Compiler ( ActualCompiler )
 import           Stack.Types.CompilerPaths ( getGhcPkgExe )
 import           Stack.Types.DumpPackage
                    ( DumpPackage (..), SublibDump (..), sublibParentPkgId )
 import           Stack.Types.EnvConfig
-                    ( HasEnvConfig, packageDatabaseDeps, packageDatabaseExtra
-                    , packageDatabaseLocal
+                    ( HasEnvConfig, HasSourceMap (..), packageDatabaseDeps
+                    , packageDatabaseExtra, packageDatabaseLocal
                     )
 import           Stack.Types.GhcPkgId ( GhcPkgId )
 import           Stack.Types.Installed
@@ -140,8 +140,10 @@      -- ^ from parent databases
   -> RIO env ([LoadHelper], [DumpPackage])
 loadDatabase installMap db lhs0 = do
+  sourceMap <- view sourceMapL
+  let compiler = sourceMap.compiler
   pkgexe <- getGhcPkgExe
-  (lhs1', dps) <- ghcPkgDump pkgexe pkgDb $ conduitDumpPackage .| sink
+  (lhs1', dps) <- ghcPkgDump pkgexe pkgDb $ conduitDumpPackage .| sink compiler
   lhs1 <- mapMaybeM processLoadResult lhs1'
   let lhs = pruneDeps id (.ghcPkgId) (.depsGhcPkgId) const (lhs0 ++ lhs1)
   pure (map (\lh -> lh { depsGhcPkgId = [] }) $ Map.elems lhs, dps)
@@ -150,12 +152,13 @@     GlobalPkgDb -> []
     UserPkgDb _ fp -> [fp]
 
-  sinkDP =  CL.map (isAllowed installMap db' &&& toLoadHelper db')
-         .| CL.consume
+  sinkDP compiler =
+       CL.map (isAllowed installMap db' &&& toLoadHelper compiler db')
+    .| CL.consume
    where
     db' = toPackageDbVariety db
-  sink =   getZipSink $ (,)
-       <$> ZipSink sinkDP
+  sink compiler =   getZipSink $ (,)
+       <$> ZipSink (sinkDP compiler)
        <*> ZipSink CL.consume
 
   processLoadResult :: (Allowed, LoadHelper) -> RIO env (Maybe LoadHelper)
@@ -265,8 +268,8 @@   }
   deriving Show
 
-toLoadHelper :: PackageDbVariety -> DumpPackage -> LoadHelper
-toLoadHelper pkgDb dp = LoadHelper
+toLoadHelper :: ActualCompiler -> PackageDbVariety -> DumpPackage -> LoadHelper
+toLoadHelper compiler pkgDb dp = LoadHelper
   { ghcPkgId
   , depsGhcPkgId
   , subLibDump = dp.sublib
@@ -281,7 +284,7 @@     -- is especially important for using different minor versions of GHC, where
     -- the dependencies of wired-in packages may change slightly and therefore
     -- not match the snapshot.
-    if name `Set.member` wiredInPackages
+    if name `Set.member` wiredInPackages compiler
       then []
       else dp.depends
   installedLibInfo = InstalledLibraryInfo ghcPkgId (Right <$> dp.license) mempty
src/Stack/Build/Source.hs view
@@ -52,6 +52,7 @@                    , boptsCLIAllProgOptions
                    )
 import           Stack.Types.CabalConfigKey ( CabalConfigKey (..) )
+import           Stack.Types.Cache ( FileCache, FileCacheInfo (..) )
 import           Stack.Types.CompilerPaths ( HasCompiler, getCompilerPath )
 import           Stack.Types.Config ( Config (..), HasConfig (..), buildOptsL )
 import           Stack.Types.Curator ( Curator (..) )
@@ -64,9 +65,8 @@ import           Stack.Types.NamedComponent
                    ( NamedComponent (..), isCSubLib, splitComponents )
 import           Stack.Types.Package
-                   ( FileCacheInfo (..), LocalPackage (..), Package (..)
-                   , PackageConfig (..), dotCabalGetPath, memoizeRefWith
-                   , runMemoizedWith
+                   ( LocalPackage (..), Package (..), PackageConfig (..)
+                   , dotCabalGetPath, memoizeRefWith, runMemoizedWith
                    )
 import           Stack.Types.PackageFile
                    ( PackageComponentFile (..), PackageWarning )
@@ -488,9 +488,9 @@ -- determine (1) if the files are dirty, and (2) the new cache values.
 checkBuildCache ::
      HasEnvConfig env
-  => Map FilePath FileCacheInfo -- ^ old cache
+  => FileCache -- ^ old cache
   -> [Path Abs File] -- ^ files in package
-  -> RIO env (Set FilePath, Map FilePath FileCacheInfo)
+  -> RIO env (Set FilePath, FileCache)
 checkBuildCache oldCache files = do
   fileDigests <- fmap Map.fromList $ forM files $ \fp -> do
     mdigest <- getFileDigestMaybe (toFilePath fp)
@@ -507,7 +507,7 @@        FilePath
     -> Maybe SHA256
     -> Maybe FileCacheInfo
-    -> RIO env (Set FilePath, Map FilePath FileCacheInfo)
+    -> RIO env (Set FilePath, FileCache)
   -- Filter out the cabal_macros file to avoid spurious recompilations
   go fp _ _ | takeFileName fp == "cabal_macros.h" = pure (Set.empty, Map.empty)
   -- Common case where it's in the cache and on the filesystem.
@@ -529,7 +529,7 @@   -> Path Abs File
   -> Set NamedComponent
   -> Map NamedComponent (Map FilePath a)
-  -> RIO env (Map NamedComponent [Map FilePath FileCacheInfo], [PackageWarning])
+  -> RIO env (Map NamedComponent [FileCache], [PackageWarning])
 addUnlistedToBuildCache pkg cabalFP nonLibComponents buildCaches = do
   (componentFiles, warnings) <-
     getPackageFilesForTargets pkg cabalFP nonLibComponents
@@ -542,9 +542,8 @@     pure ((component, addBuildCache), warnings)
   pure (M.fromList (map fst results), concatMap snd results)
  where
-  addFileToCache fp = do
-    mdigest <- getFileDigestMaybe fp
-    case mdigest of
+  addFileToCache fp =
+    getFileDigestMaybe fp >>= \case
       Nothing -> pure Map.empty
       Just digest' -> pure $ Map.singleton fp $ FileCacheInfo digest'
 
src/Stack/Build/Target.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE MultiWayIf            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
@@ -165,8 +163,7 @@   case parseRawTarget t of
     Just rt -> pure $ Right [(ri, rt)]
     Nothing -> do
-      mdir <- forgivingResolveDir root (T.unpack t) >>= rejectMissingDir
-      case mdir of
+      forgivingResolveDir root (T.unpack t) >>= rejectMissingDir >>= \case
         Nothing -> pure $ Left $
           if | T.isPrefixOf "stack-yaml=" t -> projectOptionTypo
              | T.isSuffixOf ".yaml" t -> projectYamlExtTypo
@@ -438,9 +435,8 @@                      \extra-deps."
               ]
           -- Not present at all, add it from Hackage
-          Nothing -> do
-            mrev <- getLatestHackageRevision YesRequireHackageIndex name version
-            pure $ case mrev of
+          Nothing ->
+            getLatestHackageRevision YesRequireHackageIndex name version <&> \case
               Nothing -> Left $
                 fillSep
                   [ flow "Stack did not know the location of a package named"
@@ -458,10 +454,8 @@                 , packageType = PTDependency
                 }
 
-  hackageLatest name = do
-    mloc <-
-      getLatestHackageLocation YesRequireHackageIndex name UsePreferredVersions
-    pure $ case mloc of
+  hackageLatest name =
+    getLatestHackageLocation YesRequireHackageIndex name UsePreferredVersions <&> \case
       Nothing -> deferToConstructPlan name
       Just loc ->
         Right ResolveResult
@@ -472,10 +466,9 @@           , packageType = PTDependency
           }
 
-  hackageLatestRevision name version versionLoc = do
-    mrev <- getLatestHackageRevision YesRequireHackageIndex name version
-    pure $ case mrev of
-      Nothing ->  Left $
+  hackageLatestRevision name version versionLoc =
+    getLatestHackageRevision YesRequireHackageIndex name version <&> \case
+      Nothing -> Left $
         fillSep
           [ flow "Stack knows the location of"
           , style Current (fromPackageId pkgId')
src/Stack/BuildPlan.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
 
@@ -71,7 +69,7 @@   | SnapshotNotFound SnapName
   | NeitherCompilerOrSnapshotSpecified T.Text
   | DuplicatePackagesBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception BuildPlanException where
   displayException (SnapshotNotFound snapName) = unlines
@@ -409,11 +407,11 @@       else pure $ BuildPlanCheckFail f cerrs compiler
  where
   compilerErrors compiler errs
-    | whichCompiler compiler == Ghc = ghcErrors errs
+    | whichCompiler compiler == Ghc = ghcErrors compiler errs
     | otherwise = Map.empty
 
-  isGhcWiredIn p _ = p `Set.member` wiredInPackages
-  ghcErrors = Map.filterWithKey isGhcWiredIn
+  isGhcWiredIn compiler p _ = p `Set.member` wiredInPackages compiler
+  ghcErrors compiler = Map.filterWithKey (isGhcWiredIn compiler)
 
 -- | Find a snapshot and set of flags that is compatible with and matches as
 -- best as possible with the given 'GenericPackageDescription's.
src/Stack/CLI.hs view
@@ -106,7 +106,7 @@ -- "Stack.CLI" module.
 data CliPrettyException
   = NoArgumentsBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty CliPrettyException where
   pretty NoArgumentsBug = bugPrettyReport "[S-4639]" $
@@ -230,7 +230,7 @@ 
   clean = addCommand'
     "clean"
-    "Delete build artefacts for the project packages."
+    "Delete build artefacts for project packages."
     cleanCmd
     (cleanOptsParser Clean)
 
@@ -658,8 +658,7 @@   if elem pathSeparator cmd || "-" `L.isPrefixOf` NE.head args
      then pure f
   else do
-    mExternalExec <- D.findExecutable cmd
-    case mExternalExec of
+    D.findExecutable cmd >>= \case
       Just ex -> withProcessContextNoLogging $ do
         -- TODO show the command in verbose mode
         -- hPutStrLn stderr $ unwords $
src/Stack/Clean.hs view
@@ -12,48 +12,71 @@ 
 module Stack.Clean
   ( CleanOpts (..)
+  , CleanDepth (..)
   , CleanCommand (..)
   , cleanCmd
   , clean
   ) where
 
-import           Data.List ( (\\), intercalate )
+import           Control.Monad.Extra ( concatMapM )
+import           Data.List ( (\\) )
 import qualified Data.Map.Strict as Map
-import           Path.IO ( ignoringAbsence, removeDirRecur )
+import           Path ( (</>), isProperPrefixOf )
+import           Path.IO ( ignoringAbsence, listDirRecur, removeDirRecur )
 import           Stack.Config ( withBuildConfig )
-import           Stack.Constants.Config ( rootDistDirFromDir, workDirFromDir )
+import           Stack.Constants.Config
+                   ( distRelativeDir, rootDistDirFromDir, workDirFromDir )
 import           Stack.Prelude
-import           Stack.Runners ( ShouldReexec (..), withConfig )
+import           Stack.Runners
+                   ( ShouldReexec (..), withConfig, withDefaultEnvConfig )
 import           Stack.Types.BuildConfig
                    ( BuildConfig (..), HasBuildConfig (..), getWorkDir )
 import           Stack.Types.Config ( Config )
+import           Stack.Types.EnvConfig ( EnvConfig )
 import           Stack.Types.Runner ( Runner )
-import           Stack.Types.SourceMap ( SMWanted (..), ppRoot )
+import           Stack.Types.SourceMap ( ProjectPackage, SMWanted (..), ppRoot )
 
--- | Type representing exceptions thrown by functions exported by the
+-- | Type representing \'pretty\' exceptions thrown by functions exported by the
 -- "Stack.Clean" module.
-data CleanException
+data CleanPrettyException
   = NonLocalPackages [PackageName]
   | DeletionFailures [(Path Abs Dir, SomeException)]
-  deriving (Show, Typeable)
+  deriving Show
 
-instance Exception CleanException where
-  displayException (NonLocalPackages pkgs) = concat
-    [ "Error: [S-9463]\n"
-    , "The following packages are not part of this project: "
-    , intercalate ", " (map show pkgs)
-    ]
-  displayException (DeletionFailures failures) = concat
-    [ "Error: [S-6321]\n"
-    , "Exception while recursively deleting:\n"
-    , concatMap (\(dir, e) ->
-        toFilePath dir <> "\n" <> displayException e <> "\n") failures
-    , "Perhaps you do not have permission to delete these files or they are in \
-      \use?"
-    ]
+instance Pretty CleanPrettyException where
+  pretty (NonLocalPackages pkgs) =
+    "[S-9463]"
+    <> line
+    <> fillSep
+         ( flow "The following are not project packages:"
+         : mkNarrativeList (Just Current) False
+             (map fromPackageName pkgs :: [StyleDoc])
+         )
+  pretty (DeletionFailures failures) =
+    "[S-6321]"
+    <> line
+    <> flow "Exception while recursively deleting:"
+    <> line
+    <> mconcat (map prettyFailure failures)
+    <> flow "Perhaps you do not have permission to delete these files or they \
+            \are in use?"
+   where
+    prettyFailure (dir, e) =
+         pretty dir
+      <> line
+      <> string (displayException e)
+      <> line
 
+instance Exception CleanPrettyException
+
 -- | Type representing command line options for the @stack clean@ command.
-data CleanOpts
+data CleanOpts = CleanOpts
+  { depth    :: !CleanDepth
+  , omitThis :: !Bool
+  }
+
+-- | Type representing depths of cleaning for the @stack clean@ command.
+data CleanDepth
   = CleanShallow [PackageName]
     -- ^ Delete the "dist directories" as defined in
     -- 'Stack.Constants.Config.distRelativeDir' for the given project packages.
@@ -73,12 +96,16 @@ -- | Deletes build artifacts in the current project.
 clean :: CleanOpts -> RIO Config ()
 clean cleanOpts = do
-  toDelete <- withBuildConfig $ dirsToDelete cleanOpts
+  toDelete <- if cleanOpts.omitThis
+    then
+      withDefaultEnvConfig $ dirsToDeleteGivenConfig cleanOpts.depth
+    else
+      withBuildConfig $ dirsToDeleteSimple cleanOpts.depth
   logDebug $ "Need to delete: " <> fromString (show (map toFilePath toDelete))
   failures <- catMaybes <$> mapM cleanDir toDelete
   case failures of
     [] -> pure ()
-    _  -> throwIO $ DeletionFailures failures
+    _  -> prettyThrowIO $ DeletionFailures failures
 
 cleanDir :: Path Abs Dir -> RIO Config (Maybe (Path Abs Dir, SomeException))
 cleanDir dir = do
@@ -86,20 +113,62 @@   liftIO (ignoringAbsence (removeDirRecur dir) >> pure Nothing) `catchAny` \ex ->
     pure $ Just (dir, ex)
 
-dirsToDelete :: CleanOpts -> RIO BuildConfig [Path Abs Dir]
-dirsToDelete cleanOpts = do
+dirsToDeleteSimple :: CleanDepth -> RIO BuildConfig [Path Abs Dir]
+dirsToDeleteSimple depth = do
   packages <- view $ buildConfigL . to (.smWanted.project)
-  case cleanOpts of
-    CleanShallow [] ->
+  case depth of
+    CleanShallow [] -> do
       -- Filter out packages listed as extra-deps
-      mapM (rootDistDirFromDir . ppRoot) $ Map.elems packages
+      let pkgNames = Map.elems packages
+      mapM (rootDistDirFromDir . ppRoot) pkgNames
     CleanShallow targets -> do
       let localPkgNames = Map.keys packages
           getPkgDir pkgName' = fmap ppRoot (Map.lookup pkgName' packages)
+          pkgNames = mapMaybe getPkgDir targets
       case targets \\ localPkgNames of
-        [] -> mapM rootDistDirFromDir (mapMaybe getPkgDir targets)
-        xs -> throwM (NonLocalPackages xs)
-    CleanFull -> do
-      pkgWorkDirs <- mapM (workDirFromDir . ppRoot) $ Map.elems packages
-      projectWorkDir <- getWorkDir
-      pure (projectWorkDir : pkgWorkDirs)
+        [] -> mapM rootDistDirFromDir pkgNames
+        xs -> prettyThrowM (NonLocalPackages xs)
+    CleanFull -> allWorkDirs $ Map.elems packages
+
+dirsToDeleteGivenConfig :: CleanDepth -> RIO EnvConfig [Path Abs Dir]
+dirsToDeleteGivenConfig depth = do
+  packages <- view $ buildConfigL . to (.smWanted.project)
+  case depth of
+    CleanShallow [] -> do
+      -- Filter out packages listed as extra-deps
+      let pkgNames = Map.elems packages
+      concatMapM (unusedRootDistDirsFromDir . ppRoot) pkgNames
+    CleanShallow targets -> do
+      let localPkgNames = Map.keys packages
+          getPkgDir pkgName' = fmap ppRoot (Map.lookup pkgName' packages)
+          pkgNames = mapMaybe getPkgDir targets
+      case targets \\ localPkgNames of
+        [] -> concatMapM unusedRootDistDirsFromDir pkgNames
+        xs -> prettyThrowM (NonLocalPackages xs)
+    CleanFull -> allWorkDirs $ Map.elems packages
+
+allWorkDirs :: HasBuildConfig env => [ProjectPackage] -> RIO env [Path Abs Dir]
+allWorkDirs pps = do
+  pkgWorkDirs <- mapM (workDirFromDir . ppRoot) pps
+  projectWorkDir <- getWorkDir
+  pure (projectWorkDir : pkgWorkDirs)
+
+unusedRootDistDirsFromDir :: Path Abs Dir -> RIO EnvConfig [Path Abs Dir]
+unusedRootDistDirsFromDir pkgDir = do
+  rootDistDir <- rootDistDirFromDir pkgDir
+  omitDir <- fmap (pkgDir </>) distRelativeDir
+  allDirsOmittingDirs rootDistDir omitDir
+
+allDirsOmittingDirs ::
+     MonadIO m
+  => Path Abs Dir
+  -> Path Abs Dir
+  -> m [Path Abs Dir]
+allDirsOmittingDirs topDir subDir = do
+  allDirs <- (topDir :) . fst <$> listDirRecur topDir
+  let isNotInSubDir dir = not
+        ( isProperPrefixOf dir subDir
+        || subDir == dir
+        || isProperPrefixOf subDir dir
+        )
+  pure $ filter isNotInSubDir allDirs
src/Stack/Component.hs view
@@ -1,12 +1,6 @@ {-# LANGUAGE NoImplicitPrelude        #-}
-{-# LANGUAGE ConstraintKinds          #-}
-{-# LANGUAGE DataKinds                #-}
-{-# LANGUAGE DisambiguateRecordFields #-}
-{-# LANGUAGE FlexibleContexts         #-}
-{-# LANGUAGE GADTs                    #-}
 {-# LANGUAGE OverloadedRecordDot      #-}
 {-# LANGUAGE OverloadedStrings        #-}
-{-# LANGUAGE ScopedTypeVariables      #-}
 
 {-|
 Module      : Stack.Component
@@ -41,6 +35,7 @@ import           Distribution.Types.BuildInfo ( BuildInfo )
 import           Distribution.Package ( mkPackageName )
 import qualified Distribution.PackageDescription as Cabal
+import           Distribution.Utils.Path (interpretSymbolicPathCWD)
 import           GHC.Records ( HasField )
 import           Stack.Prelude
 import           Stack.Types.Component
@@ -79,7 +74,7 @@ stackExecutableFromCabal cabalExecutable = StackExecutable
   { name = fromCabalName cabalExecutable.exeName
   , buildInfo = stackBuildInfoFromCabal cabalExecutable.buildInfo
-  , modulePath = cabalExecutable.modulePath
+  , modulePath = interpretSymbolicPathCWD cabalExecutable.modulePath
   }
 
 stackForeignLibraryFromCabal :: ForeignLib -> StackForeignLibrary
@@ -113,9 +108,9 @@   StackBuildInfo
     { buildable = buildInfoV.buildable
     , otherModules = buildInfoV.otherModules
-    , jsSources = buildInfoV.jsSources
+    , jsSources = map interpretSymbolicPathCWD buildInfoV.jsSources
     , hsSourceDirs = buildInfoV.hsSourceDirs
-    , cSources = buildInfoV.cSources
+    , cSources = map interpretSymbolicPathCWD buildInfoV.cSources
     , dependency = mempty
     , unknownTools = mempty
     , cppOptions = buildInfoV.cppOptions
@@ -123,10 +118,10 @@     , options = buildInfoV.options
     , allLanguages = Cabal.allLanguages buildInfoV
     , usedExtensions = Cabal.usedExtensions buildInfoV
-    , includeDirs = buildInfoV.includeDirs
+    , includeDirs = map interpretSymbolicPathCWD buildInfoV.includeDirs
     , extraLibs = buildInfoV.extraLibs
-    , extraLibDirs = buildInfoV.extraLibDirs
-    , frameworks = buildInfoV.frameworks
+    , extraLibDirs = map interpretSymbolicPathCWD buildInfoV.extraLibDirs
+    , frameworks = map interpretSymbolicPathCWD buildInfoV.frameworks
     }
 
 -- | Iterate on all three dependency list given, and transform and sort them
src/Stack/ComponentFile.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -37,7 +36,8 @@                    ( BenchmarkInterface (..), TestSuiteInterface (..) )
 import           Distribution.Text ( display )
 import           Distribution.Utils.Path
-                   ( PackageDir, SourceDir, SymbolicPath, getSymbolicPath )
+                   ( Pkg, Source, SymbolicPath, getSymbolicPath )
+import qualified Distribution.Utils.Path as Cabal
 import           GHC.Records ( HasField )
 import qualified HiFileParser as Iface
 import           Path
@@ -92,7 +92,7 @@   exposed :: [DotCabalDescriptor]
   exposed =
     case bench.interface of
-      BenchmarkExeV10 _ fp -> [DotCabalMain fp]
+      BenchmarkExeV10 _ fp -> [DotCabalMain $ getSymbolicPath fp]
       BenchmarkUnsupported _ -> []
 
   bnames :: [DotCabalDescriptor]
@@ -114,7 +114,7 @@   exposed :: [DotCabalDescriptor]
   exposed =
     case test.interface of
-      TestSuiteExeV10 _ fp -> [DotCabalMain fp]
+      TestSuiteExeV10 _ fp -> [DotCabalMain $ getSymbolicPath fp]
       TestSuiteLibV09 _ mn -> [DotCabalModule mn]
       TestSuiteUnsupported _ -> []
 
@@ -169,7 +169,7 @@ -- | Get all files referenced by the component.
 resolveComponentFiles ::
      ( CAndJsSources rec
-     , HasField "hsSourceDirs" rec [SymbolicPath PackageDir SourceDir]
+     , HasField "hsSourceDirs" rec [SymbolicPath Pkg (Cabal.Dir Source)]
      )
   => NamedComponent
   -> rec
@@ -400,8 +400,7 @@   customPreprocessorExts <- view $ configL . to (.customPreprocessorExts)
   let haskellPreprocessorExts =
         haskellDefaultPreprocessorExts ++ customPreprocessorExts
-  candidates <- liftIO $ makeNameCandidates haskellPreprocessorExts
-  case candidates of
+  liftIO (makeNameCandidates haskellPreprocessorExts) >>= \case
     [candidate] -> pure (Just (cons candidate))
     [] -> do
       case name of
@@ -500,9 +499,8 @@   dir <- asks (parent . (.file))
   file <- asks (.file)
   let resolveDirFiles files toCabalPath =
-        forMaybeM files $ \fp -> do
-          result <- resolveDirFile dir fp
-          case result of
+        forMaybeM files $ \fp ->
+          resolveDirFile dir fp >>= \case
             Nothing -> do
               warnMissingFile "File" cwd fp file
               pure Nothing
src/Stack/Config.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
 {-# LANGUAGE TypeFamilies          #-}
@@ -115,7 +113,10 @@ import           Stack.Types.BuildConfig ( BuildConfig (..) )
 import           Stack.Types.BuildOpts ( BuildOpts (..) )
 import           Stack.Types.ColorWhen ( ColorWhen (..) )
-import           Stack.Types.Compiler ( defaultCompilerRepository )
+import           Stack.Types.Compiler
+                   ( defaultCompilerBindistPath, defaultCompilerRepository
+                   , defaultCompilerTarget
+                   )
 import           Stack.Types.Config
                    ( Config (..), HasConfig (..), askLatestSnapshotUrl
                    , configProjectRoot, stackRootL, workDirL
@@ -288,6 +289,12 @@         compilerRepository = fromFirst
           defaultCompilerRepository
           configMonoid.compilerRepository
+        compilerTarget = fromFirst
+          defaultCompilerTarget
+          configMonoid.compilerTarget
+        compilerBindistPath = fromFirst
+          defaultCompilerBindistPath
+          configMonoid.compilerBindistPath
         ghcBuild = getFirst configMonoid.ghcBuild
         installGHC = fromFirstTrue configMonoid.installGHC
         installMsys = fromFirst installGHC configMonoid.installMsys
@@ -394,7 +401,7 @@                )
           <> blankLine
           <> fillSep
-               [ flow "To avoid sucn problems, use the"
+               [ flow "To avoid such problems, use the"
                , style Shell "local-programs-path"
                , flow "non-project specific configuration option to specify an \
                       \alternative path without those characteristics."
@@ -479,6 +486,8 @@         notifyIfNoRunTests = fromFirstTrue configMonoid.notifyIfNoRunTests
         notifyIfNoRunBenchmarks =
           fromFirstTrue configMonoid.notifyIfNoRunBenchmarks
+        notifyIfBaseNotBoot =
+          fromFirstTrue configMonoid.notifyIfBaseNotBoot
         noRunCompile = fromFirstFalse configMonoid.noRunCompile
     allowDifferentUser <-
       case getFirst configMonoid.allowDifferentUser of
@@ -489,9 +498,8 @@     let stylesUpdate' = (configRunner' ^. stylesUpdateL) <>
           configMonoid.styles
         useColor' = configRunner'.useColor
-        mUseColor = do
-          colorWhen <- getFirst configMonoid.colorWhen
-          pure $ case colorWhen of
+        mUseColor =
+          getFirst configMonoid.colorWhen <&> \case
             ColorNever  -> False
             ColorAlways -> True
             ColorAuto  -> useAnsi
@@ -502,14 +510,12 @@           & useColorL .~ useColor''
         go = configRunner'.globalOpts
         pic = fromFirst  defaultPackageIndexConfig configMonoid.packageIndex
-    mpantryRoot <- liftIO $ lookupEnv pantryRootEnvVar
-    pantryRoot <-
-      case mpantryRoot of
-        Just dir ->
-          case parseAbsDir dir of
-            Nothing -> throwIO $ ParseAbsolutePathException pantryRootEnvVar dir
-            Just x -> pure x
-        Nothing -> pure $ stackRoot </> relDirPantry
+    pantryRoot <- liftIO (lookupEnv pantryRootEnvVar) >>= \case
+      Just dir ->
+        case parseAbsDir dir of
+          Nothing -> throwIO $ ParseAbsolutePathException pantryRootEnvVar dir
+          Just x -> pure x
+      Nothing -> pure $ stackRoot </> relDirPantry
     let snapLoc =
           case getFirst configMonoid.snapshotLocation of
             Nothing -> defaultSnapshotLocation
@@ -598,6 +604,8 @@                 , msysEnvironment
                 , compilerCheck
                 , compilerRepository
+                , compilerTarget
+                , compilerBindistPath
                 , localBin
                 , fileWatchHook
                 , requireStackVersion
@@ -642,6 +650,7 @@                 , notifyIfArchUnknown
                 , notifyIfNoRunTests
                 , notifyIfNoRunBenchmarks
+                , notifyIfBaseNotBoot
                 , noRunCompile
                 , stackDeveloperMode
                 , casa
@@ -1084,12 +1093,11 @@   -- ^ Parsed command-line arguments
   -> m (Path Abs Dir, Path Abs Dir, Bool)
 determineStackRootAndOwnership clArgs = liftIO $ do
-  (configRoot, stackRoot) <- do
+  (configRoot, stackRoot) <-
     case getFirst clArgs.stackRoot of
       Just x -> pure (x, x)
-      Nothing -> do
-        mstackRoot <- lookupEnv stackRootEnvVar
-        case mstackRoot of
+      Nothing ->
+        lookupEnv stackRootEnvVar >>= \case
           Nothing -> do
             wantXdg <- fromMaybe "" <$> lookupEnv stackXdgEnvVar
             if not (null wantXdg)
@@ -1106,9 +1114,8 @@               throwIO $ ParseAbsolutePathException stackRootEnvVar x
             Just parsed -> pure (parsed, parsed)
 
-  (existingStackRootOrParentDir, userOwnsIt) <- do
-    mdirAndOwnership <- findInParents getDirAndOwnership stackRoot
-    case mdirAndOwnership of
+  (existingStackRootOrParentDir, userOwnsIt) <-
+    findInParents getDirAndOwnership stackRoot >>= \case
       Just x -> pure x
       Nothing -> throwIO (BadStackRoot stackRoot)
 
@@ -1131,9 +1138,8 @@ -- If the parent directory doesn't exist either,
 -- @'NoSuchDirectory' ('parent' dir)@ is thrown.
 checkOwnership :: MonadIO m => Path Abs Dir -> m ()
-checkOwnership dir = do
-  mdirAndOwnership <- firstJustM getDirAndOwnership [dir, parent dir]
-  case mdirAndOwnership of
+checkOwnership dir =
+  firstJustM getDirAndOwnership [dir, parent dir] >>= \case
     Just (_, True) -> pure ()
     Just (dir', False) -> throwIO (UserDoesn'tOwnDirectory dir')
     Nothing ->
@@ -1195,11 +1201,9 @@      HasLogFunc env
   => (Value -> Yaml.Parser (WithJSONWarnings a))
   -> Path Abs File -> RIO env a
-loadConfigYaml parser path = do
-  eres <- loadYaml parser path
-  case eres of
-    Left err -> prettyThrowM (ParseConfigFileException path err)
-    Right res -> pure res
+loadConfigYaml parser path = loadYaml parser path >>= \case
+  Left err -> prettyThrowM (ParseConfigFileException path err)
+  Right res -> pure res
 
 -- | Load and parse YAML from the given file.
 loadYaml ::
@@ -1207,9 +1211,8 @@   => (Value -> Yaml.Parser (WithJSONWarnings a))
   -> Path Abs File
   -> RIO env (Either Yaml.ParseException a)
-loadYaml parser path = do
-  eres <- liftIO $ Yaml.decodeFileEither (toFilePath path)
-  case eres  of
+loadYaml parser path =
+  liftIO (Yaml.decodeFileEither (toFilePath path)) >>= \case
     Left err -> pure (Left err)
     Right val ->
       case Yaml.parseEither parser val of
@@ -1256,20 +1259,20 @@   => StackYamlLoc
      -- ^ Override stack.yaml
   -> RIO env (ProjectConfig (Project, Path Abs File, ConfigMonoid))
-loadProjectConfig mstackYaml = do
-  mfp <- getProjectConfig mstackYaml
-  case mfp of
-    PCProject fp -> do
-      currDir <- getCurrentDir
-      logDebug $ "Loading project config file " <>
-                  fromString (maybe (toFilePath fp) toFilePath (stripProperPrefix currDir fp))
-      PCProject <$> load fp
-    PCGlobalProject -> do
-      logDebug "No project config file found, using defaults."
-      pure PCGlobalProject
-    PCNoProject extraDeps -> do
-      logDebug "Ignoring config files"
-      pure $ PCNoProject extraDeps
+loadProjectConfig mstackYaml = getProjectConfig mstackYaml >>= \case
+  PCProject fp -> do
+    currDir <- getCurrentDir
+    logDebug $
+         "Loading project config file "
+      <> fromString
+           (maybe (toFilePath fp) toFilePath (stripProperPrefix currDir fp))
+    PCProject <$> load fp
+  PCGlobalProject -> do
+    logDebug "No project config file found, using defaults."
+    pure PCGlobalProject
+  PCNoProject extraDeps -> do
+    logDebug "Ignoring config files"
+    pure $ PCNoProject extraDeps
  where
   load fp = do
     iopc <- loadConfigYaml (parseProjectAndConfigMonoid (parent fp)) fp
src/Stack/Config/Docker.hs view
@@ -34,7 +34,7 @@ data ConfigDockerException
   = SnapshotNotSupportedException !(Maybe Project) !(Maybe AbstractSnapshot)
   -- ^ Only LTS snapshots are supported for default image tag.
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ConfigDockerException where
   displayException (SnapshotNotSupportedException mproject mASnapshot) =
src/Stack/Config/Nix.hs view
@@ -35,7 +35,7 @@     -- ^ Nix can't be given packages and a shell file at the same time
   | GHCMajorVersionUnspecified
   | OnlyGHCSupported
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ConfigNixException where
   displayException NixCannotUseShellFileAndPackagesException =
src/Stack/ConfigCmd.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE GADTs               #-}
 {-# LANGUAGE OverloadedLists     #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
@@ -66,7 +65,7 @@ -- "Stack.ConfigCmd" module.
 data ConfigCmdException
   = NoProjectConfigAvailable
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ConfigCmdException where
   displayException NoProjectConfigAvailable =
+ src/Stack/ConfigureOpts.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE NoImplicitPrelude   #-}
+{-# LANGUAGE NoFieldSelectors    #-}
+{-# LANGUAGE OverloadedRecordDot #-}
+{-# LANGUAGE OverloadedStrings   #-}
+
+{-|
+Module      : Stack.ConfigureOpts
+License     : BSD-3-Clause
+-}
+
+module Stack.ConfigureOpts
+  ( configureOptsFromBase
+  , configureOptsFromDb
+  , renderConfigureOpts
+  , packageConfigureOptsFromPackage
+  ) where
+
+import qualified Data.Map as Map
+import qualified Data.Text as T
+import           Database.Persist ( Entity, entityVal )
+import           Distribution.Types.MungedPackageName
+                   ( decodeCompatPackageName )
+import           Distribution.Types.PackageName ( unPackageName )
+import           Distribution.Types.UnqualComponentName
+                   ( unUnqualComponentName )
+import           GHC.Records ( HasField )
+import           Path ( (</>), parseRelDir )
+import           Path.Extra ( toFilePathNoTrailingSep )
+import           Stack.Constants
+                   ( bindirSuffix, compilerOptionsCabalFlag, docDirSuffix
+                   , relDirEtc, relDirLib, relDirLibexec, relDirShare
+                   )
+import           Stack.Prelude
+import           Stack.Types.BuildOpts ( BuildOpts (..) )
+import           Stack.Types.Compiler ( whichCompiler )
+import           Stack.Types.Config ( Config (..), HasConfig (..) )
+import           Stack.Types.ConfigureOpts
+                   ( BaseConfigOpts (..), ConfigureOpts (..)
+                   , PackageConfigureOpts (..) )
+import           Stack.Types.EnvConfig ( EnvConfig, actualCompilerVersionL )
+import           Stack.Types.GhcPkgId ( GhcPkgId, ghcPkgIdString )
+import           Stack.Types.IsMutable ( IsMutable (..) )
+import           Stack.Types.Package ( Package(..), packageIdentifier )
+import           System.FilePath ( pathSeparator )
+
+packageConfigureOptsFromPackage ::
+     Package
+  -> PackageConfigureOpts
+packageConfigureOptsFromPackage pkg = PackageConfigureOpts
+  { pkgCabalConfigOpts = pkg.cabalConfigOpts
+  , pkgGhcOptions = pkg.ghcOptions
+  , pkgFlags = pkg.flags
+  , pkgDefaultFlags = pkg.defaultFlags
+  , pkgIdentifier = packageIdentifier pkg
+  }
+
+configureOptsFromDb ::
+     ( HasField "configCacheDirOptionValue" b1 String
+     , HasField "configCacheNoDirOptionValue" b2 String
+     )
+  => [Entity b1]
+  -> [Entity b2]
+  -> ConfigureOpts
+configureOptsFromDb x y = ConfigureOpts
+  { pathRelated = map ((.configCacheDirOptionValue) . entityVal) x
+  , nonPathRelated = map ((.configCacheNoDirOptionValue) . entityVal) y
+  }
+
+-- | Render a @BaseConfigOpts@ to an actual list of options
+configureOptsFromBase ::
+     EnvConfig
+  -> BaseConfigOpts
+  -> Map PackageIdentifier GhcPkgId -- ^ dependencies
+  -> Bool -- ^ local non-extra-dep?
+  -> IsMutable
+  -> PackageConfigureOpts
+  -> ConfigureOpts
+configureOptsFromBase econfig bco deps isLocal isMutable pkgConfigureOpts =
+  ConfigureOpts
+    { pathRelated = configureOptsPathRelated bco isMutable pkgConfigureOpts
+    , nonPathRelated =
+        configureOptsNonPathRelated econfig bco deps isLocal pkgConfigureOpts
+    }
+
+configureOptsPathRelated ::
+     BaseConfigOpts
+  -> IsMutable
+  -> PackageConfigureOpts
+  -> [String]
+configureOptsPathRelated bco isMutable pkgOpts = concat
+  [ ["--user", "--package-db=clear", "--package-db=global"]
+  , map (("--package-db=" ++) . toFilePathNoTrailingSep) $ case isMutable of
+      Immutable -> bco.extraDBs ++ [bco.snapDB]
+      Mutable -> bco.extraDBs ++ [bco.snapDB] ++ [bco.localDB]
+  , [ "--libdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirLib)
+    , "--bindir=" ++ toFilePathNoTrailingSep (installRoot </> bindirSuffix)
+    , "--datadir=" ++ toFilePathNoTrailingSep (installRoot </> relDirShare)
+    , "--libexecdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirLibexec)
+    , "--sysconfdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirEtc)
+    , "--docdir=" ++ toFilePathNoTrailingSep docDir
+    , "--htmldir=" ++ toFilePathNoTrailingSep docDir
+    , "--haddockdir=" ++ toFilePathNoTrailingSep docDir]
+  ]
+ where
+  installRoot =
+    case isMutable of
+      Immutable -> bco.snapInstallRoot
+      Mutable -> bco.localInstallRoot
+  docDir =
+    case pkgVerDir of
+      Nothing -> installRoot </> docDirSuffix
+      Just dir -> installRoot </> docDirSuffix </> dir
+  pkgVerDir = parseRelDir
+    (  packageIdentifierString pkgOpts.pkgIdentifier
+    ++ [pathSeparator]
+    )
+
+-- | Same as 'configureOpts', but does not include directory path options
+configureOptsNonPathRelated ::
+     EnvConfig
+  -> BaseConfigOpts
+  -> Map PackageIdentifier GhcPkgId -- ^ Dependencies.
+  -> Bool -- ^ Is this a local, non-extra-dep?
+  -> PackageConfigureOpts
+  -> [String]
+configureOptsNonPathRelated econfig bco deps isLocal package = concat
+  [ depOptions
+  , [ "--enable-library-profiling"
+    | bopts.libProfile || bopts.exeProfile
+    ]
+  , ["--enable-profiling" | bopts.exeProfile && isLocal]
+  , ["--enable-split-objs" | bopts.splitObjs]
+  , [ "--disable-library-stripping"
+    | not $ bopts.libStrip || bopts.exeStrip
+    ]
+  , ["--disable-executable-stripping" | not bopts.exeStrip && isLocal]
+  , flags
+  , map T.unpack package.pkgCabalConfigOpts
+  , processGhcOptions package.pkgGhcOptions
+  , map ("--extra-include-dirs=" ++) config.extraIncludeDirs
+  , map ("--extra-lib-dirs=" ++) config.extraLibDirs
+  , maybe
+      []
+      (\customGcc -> ["--with-gcc=" ++ toFilePath customGcc])
+      config.overrideGccPath
+  , ["--exact-configuration"]
+  , ["--ghc-option=-fhide-source-paths" | hideSourcePaths]
+  ]
+ where
+  -- This function parses the GHC options that are providing in the
+  -- stack.yaml file. In order to handle RTS arguments correctly, we need
+  -- to provide the RTS arguments as a single argument.
+  processGhcOptions :: [Text] -> [String]
+  processGhcOptions args =
+    let (preRtsArgs, mid) = break ("+RTS" ==) args
+        (rtsArgs, end) = break ("-RTS" ==) mid
+        fullRtsArgs =
+          case rtsArgs of
+            [] ->
+              -- This means that we didn't have any RTS args - no `+RTS` - and
+              -- therefore no need for a `-RTS`.
+              []
+            _ ->
+              -- In this case, we have some RTS args. `break` puts the `"-RTS"`
+              -- string in the `snd` list, so we want to append it on the end of
+              -- `rtsArgs` here.
+              --
+              -- We're not checking that `-RTS` is the first element of `end`.
+              -- This is because the GHC RTS allows you to omit a trailing -RTS
+              -- if that's the last of the arguments. This permits a GHC options
+              -- in stack.yaml that matches what you might pass directly to GHC.
+              [T.unwords $ rtsArgs ++ ["-RTS"]]
+        -- We drop the first element from `end`, because it is always either
+        -- `"-RTS"` (and we don't want that as a separate argument) or the list
+        -- is empty (and `drop _ [] = []`).
+        postRtsArgs = drop 1 end
+        newArgs = concat [preRtsArgs, fullRtsArgs, postRtsArgs]
+    in  concatMap (\x -> [compilerOptionsCabalFlag wc, T.unpack x]) newArgs
+
+  wc = view (actualCompilerVersionL . to whichCompiler) econfig
+
+  hideSourcePaths = config.hideSourcePaths
+
+  config = view configL econfig
+  bopts = bco.buildOpts
+  mapAndAppend fn = Map.foldrWithKey' (fmap (:) . fn)
+  -- Unioning atop defaults is needed so that all flags are specified with
+  -- --exact-configuration.
+  flags = mapAndAppend
+    renderFlags
+    []
+    (package.pkgFlags `Map.union` package.pkgDefaultFlags)
+  renderFlags name enabled =
+       "-f"
+    <> (if enabled then "" else "-")
+    <> flagNameString name
+
+  depOptions = mapAndAppend toDepOption [] deps
+
+  toDepOption (PackageIdentifier name _) gid = concat
+    [ "--dependency="
+    , depOptionKey
+    , "="
+    , ghcPkgIdString gid
+    ]
+   where
+    MungedPackageName subPkgName lib = decodeCompatPackageName name
+    depOptionKey = case lib of
+      LMainLibName -> unPackageName name
+      LSubLibName cn ->
+        unPackageName subPkgName <> ":" <> unUnqualComponentName cn
+
+-- | Render configure options as a single list of options.
+renderConfigureOpts :: ConfigureOpts -> [String]
+renderConfigureOpts copts = copts.pathRelated ++ copts.nonPathRelated
src/Stack/Constants.hs view
@@ -30,6 +30,7 @@   , inNixShellEnvVar
   , stackProgNameUpper
   , wiredInPackages
+  , allWiredInPackages
   , cabalPackageName
   , implicitGlobalProjectDir
   , defaultUserConfigPath
@@ -161,13 +162,15 @@ import qualified Data.Set as Set
 import qualified Data.Text as T
 import           Distribution.Package ( mkPackageName )
+import           Distribution.Version ( mkVersion )
 import           Hpack.Config ( packageConfig )
 import qualified Language.Haskell.TH.Syntax as TH ( runIO, lift )
 import           Path ( (</>), mkRelDir, mkRelFile, parseAbsFile )
 import           Stack.Constants.StackProgName ( stackProgName )
 import           Stack.Constants.UsrLibDirs ( libDirs, usrLibDirs )
 import           Stack.Prelude
-import           Stack.Types.Compiler ( WhichCompiler (..) )
+import           Stack.Types.Compiler
+                   ( ActualCompiler (..), WhichCompiler (..) )
 import           System.Permissions ( osIsMacOS, osIsWindows )
 import           System.Process ( readProcess )
 
@@ -175,7 +178,7 @@ -- "Stack.Constants" module.
 data ConstantsException
   = WiredInPackagesNotParsedBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ConstantsException where
   displayException WiredInPackagesNotParsedBug = bugReport "[S-6057]"
@@ -251,36 +254,65 @@ -- > ghc-options: -this-unit-id ghc-prim
 --
 -- in their Cabal file because they are \'magic\'.
-wiredInPackages :: Set PackageName
-wiredInPackages = case mparsed of
+--
+-- Cabal (the tool) also treats certain packages as non-reinstallable. See
+-- @Distribution.Client.Dependency.nonReinstallablePackages@.
+wiredInPackages ::
+     ActualCompiler
+     -- ^ The actual compiler being used. (Not yet implemented.)
+  -> Set PackageName
+-- When building the GHC compiler from source, we know nothing about its
+-- wired-in packages. We take a cautious approach.
+wiredInPackages (ACGhcGit _ _) = allWiredInPackages
+wiredInPackages (ACGhc ghcVersion) = case mparsed of
   Just parsed -> Set.fromList parsed
   Nothing -> impureThrow WiredInPackagesNotParsedBug
  where
-  mparsed = mapM parsePackageName
-    [ "rts"
-      -- Said to be not a \'real\' package
-    , "ghc-prim"
-      -- A magic package
-    , "ghc-bignum"
-      -- A magic package
-    , "integer-gmp"
-      -- No longer magic > 1.0.3.0 (GHC >= 9.0) and deprecated in favour of
-      -- ghc-bignum. With GHC 9.8.4 at least, there seems to be no problem in
-      -- using it.
-    , "integer-simple"
-      -- A magic package
-    , "base"
-      -- A magic package
-    , "template-haskell"
-      -- A magic package
-    , "ghc"
-      -- A magic package
-    , "interactive"
-      -- Type and class declarations at the GHCi command prompt are treated as
-      -- if they were defined in modules all sharing a common package
-      -- interactive. See 'Note [The interactive package]' at
-      -- https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Runtime/Context.hs
-      -- With GHC 9.8.4 at least, there seems to be no problem in using it.
+  mparsed = mapM parsePackageName $
+       [ "rts"
+         -- Said to be not a \'real\' package.
+       , "ghc"
+         -- A magic package.
+       , "ghc-prim"
+         -- A magic package.
+       , "integer-simple"
+         -- A magic package.
+       , "interactive"
+         -- Type and class declarations at the GHCi command prompt are treated
+         -- as if they were defined in modules all sharing a common package
+         -- interactive. See 'Note [The interactive package]' at
+         -- https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Runtime/Context.hs
+         -- With GHC 9.10.3 at least, there seems to be no problem in using it.
+       ]
+    <> [ "base" | ghcVersion < mkVersion [9, 12] ]
+         -- A formerly magic package.
+    <> [ "ghc-bignum" | ghcVersion >= mkVersion [9, 0, 1] ]
+         -- A magic package from GHC 9.0.1.
+    <> [ "ghc-internal" | ghcVersion >= mkVersion [9, 10, 1] ]
+         -- A magic package from GHC 9.10.1.
+    <> [ "integer-gmp" | ghcVersion < mkVersion [9, 0] ]
+         -- No longer magic > 1.0.3.0 (GHC >= 9.0) and deprecated in favour of
+         -- ghc-bignum.
+    <> [ "template-haskell" | ghcVersion < mkVersion [9, 12] ]
+         -- No longer magic > 2.22.0.0 (GHC >= 9.12).
+
+-- | A set of all package names that have been GHC wired-in packages for
+-- versions of GHC supported by Stack.
+allWiredInPackages :: Set PackageName
+allWiredInPackages = Set.unions $ map wiredInPackages supportedCompilers
+ where
+  supportedCompilers = map (ACGhc . mkVersion)
+    [ [8, 4, 4]
+    , [8, 6, 5]
+    , [8, 8, 4]
+    , [8, 10, 7]
+    , [9, 0, 2]
+    , [9, 2, 8]
+    , [9, 4, 8]
+    , [9, 6, 7]
+    , [9, 8, 4]
+    , [9, 10, 2]
+    , [9, 12, 2]
     ]
 
 -- | Just to avoid repetition and magic strings.
src/Stack/Coverage.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -83,7 +82,7 @@   = NonTestSuiteTarget PackageName
   | NoTargetsOrTixSpecified
   | NotLocalPackage PackageName
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty CoveragePrettyException where
   pretty (NonTestSuiteTarget name) =
@@ -144,8 +143,7 @@     -- Remove exe modules because they are problematic. This could be
     -- revisited if there's a GHC version that fixes
     -- https://ghc.haskell.org/trac/ghc/ticket/1853
-    mtix <- readTixOrLog tixSrc
-    case mtix of
+    readTixOrLog tixSrc >>= \case
       Nothing -> prettyError $
         "[S-2887]"
         <> line
@@ -264,12 +262,14 @@           prettyError $
             "[S-4634]"
             <> line
-            <> flow "Didn't find"
-            <> style File ".tix"
-            <> "for"
-            <> report
-            <> flow "- expected to find it at"
-            <> pretty tixSrc <> "."
+            <> fillSep
+                 [ flow "Didn't find"
+                 , style File ".tix"
+                 , "for"
+                 , report
+                 , flow "- expected to find it at"
+                 , pretty tixSrc <> "."
+                 ]
           pure Nothing
         else (`catch` \(err :: ProcessException) -> do
                logError $ displayShow err
@@ -280,8 +280,10 @@                prettyError
                  ( "[S-8215]"
                    <> line
-                   <> flow "Error occurred while producing"
-                   <> report <> "."
+                   <> fillSep
+                        [ flow "Error occurred while producing"
+                        , report <> "."
+                        ]
                  )) $ do
           -- Directories for .mix files.
           hpcRelDir <- hpcRelativeDir
src/Stack/DefaultColorWhen.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE LambdaCase #-}
-
 {-|
 Module      : Stack.DefaultColorWhen
 License     : BSD-3-Clause
src/Stack/DependencyGraph.hs view
@@ -46,8 +46,8 @@                    ( BuildOptsCLI (..), defaultBuildOptsCLI )
 import           Stack.Types.BuildOptsMonoid
                    ( buildOptsMonoidBenchmarksL, buildOptsMonoidTestsL )
-import           Stack.Types.Compiler ( wantedToActual )
-import           Stack.Types.DependencyTree ( DotPayload (..) )
+import           Stack.Types.Compiler ( ActualCompiler, wantedToActual )
+import           Stack.Types.DependencyTree ( DependencyGraph, DotPayload (..) )
 import           Stack.Types.DotConfig ( DotConfig (..) )
 import           Stack.Types.DotOpts ( DotOpts (..) )
 import           Stack.Types.DumpPackage ( DumpPackage (..) )
@@ -64,10 +64,9 @@ 
 -- | Type representing exceptions thrown by functions exported by the
 -- "Stack.DependencyGraph" module.
-data DependencyGraphException
+newtype DependencyGraphException
   = DependencyNotFoundBug GhcPkgId
-  | PackageNotFoundBug PackageName
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception DependencyGraphException where
   displayException (DependencyNotFoundBug depId) = bugReport "[S-7071]" $ concat
@@ -75,12 +74,34 @@     , ghcPkgIdString depId
     , " in global DB."
     ]
-  displayException (PackageNotFoundBug pkgName) = bugReport "[S-7151]" $ concat
-    [ "The '"
-    , packageNameString pkgName
-    , "' package was not found in any of the dependency sources."
-    ]
 
+-- | Type representing \'pretty\' exceptions thrown by functions exported by the
+-- "Stack.DependencyGraph" module.
+newtype DependencyGraphPrettyException
+  = PackageNotFound PackageName
+  deriving Show
+
+instance Pretty DependencyGraphPrettyException where
+
+  pretty (PackageNotFound pkgName) =
+       "[S-7151]"
+    <> line
+    <> fillSep
+         [ flow "The package"
+         , style Error . fromPackageName $ pkgName
+         , flow "was not identified as a project package, an extra-dep, or a \
+                \package specified by the snapshot."
+         ]
+    <> blankLine
+    <> fillSep
+         [ "Command"
+         , style Shell "stack build --dry-run"
+         , flow "for information about why Stack fails to construct a build \
+                \plan."
+         ]
+
+instance Exception DependencyGraphPrettyException
+
 -- | Create the dependency graph and also prune it as specified in the dot
 -- options. Returns a set of local names and a map from package names to
 -- dependencies.
@@ -88,17 +109,20 @@      DotOpts
   -> RIO
        Runner
-       (Set PackageName, Map PackageName (Set PackageName, DotPayload))
+       ( ActualCompiler
+       , Set PackageName
+       , DependencyGraph
+       )
 createPrunedDependencyGraph dotOpts = withDotConfig dotOpts $ do
   localNames <- view $ buildConfigL . to (Map.keysSet . (.smWanted.project))
   logDebug "Creating dependency graph"
-  resultGraph <- createDependencyGraph dotOpts
+  (compiler, resultGraph) <- createDependencyGraph dotOpts
   let pkgsToPrune = if dotOpts.includeBase
                       then dotOpts.prune
                       else Set.insert "base" dotOpts.prune
       prunedGraph = pruneGraph localNames pkgsToPrune resultGraph
   logDebug "Returning pruned dependency graph"
-  pure (localNames, prunedGraph)
+  pure (compiler, localNames, prunedGraph)
 
 -- Plumbing for --test and --bench flags
 withDotConfig ::
@@ -124,9 +148,12 @@           , globals = Map.mapWithKey toDump globals
           }
         toDump :: PackageName -> Version -> DumpPackage
-        toDump name version = DumpPackage
+        toDump pkgName pkgVersion = DumpPackage
           { ghcPkgId = fakeGhcPkgId
-          , packageIdent = PackageIdentifier name version
+          , packageIdent = PackageIdentifier
+              { pkgName
+              , pkgVersion
+              }
           , sublib = Nothing
           , license = Nothing
           , libDirs = []
@@ -190,7 +217,7 @@ -- the required arguments for @resolveDependencies@.
 createDependencyGraph ::
      DotOpts
-  -> RIO DotConfig (Map PackageName (Set PackageName, DotPayload))
+  -> RIO DotConfig (ActualCompiler, DependencyGraph)
 createDependencyGraph dotOpts = do
   sourceMap <- view sourceMapL
   locals <- for (toList sourceMap.project) loadLocalPackage
@@ -211,17 +238,23 @@         | name `elem` [mkPackageName "rts", mkPackageName "ghc"] =
             pure
               ( Set.empty
-              , DotPayload (Just version) (Just $ Right BSD3) Nothing
+              , DotPayload
+                  { version = Just version
+                  , license = Just $ Right BSD3
+                  , location = Nothing
+                  }
               )
         | otherwise = fmap
             (setOfPackageDeps &&& makePayload loc)
             (loadPackage loc flags ghcOptions cabalConfigOpts)
-  resolveDependencies dotOpts.dependencyDepth graph depLoader
+  resultGraph <- resolveDependencies dotOpts.dependencyDepth graph depLoader
+  pure (sourceMap.compiler, resultGraph)
  where
   makePayload loc pkg = DotPayload
-    (Just pkg.version)
-    (Just pkg.license)
-    (Just $ PLImmutable loc)
+    { version = Just pkg.version
+    , license = Just pkg.license
+    , location = Just $ PLImmutable loc
+    }
 
 -- | Resolve the direct (depth 0) external dependencies of the given local
 -- packages (assumed to come from project packages)
@@ -234,7 +267,10 @@     ( \lp -> let pkg = localPackageToPackage lp
                  pkgDir = parent lp.cabalFP
                  packageDepsSet = setOfPackageDeps pkg
-                 loc = PLMutable $ ResolvedPath (RelFilePath "N/A") pkgDir
+                 loc = PLMutable $ ResolvedPath
+                   { resolvedRelative = RelFilePath "N/A"
+                   , resolvedAbsolute = pkgDir
+                   }
              in  (pkg.name, (deps pkg packageDepsSet, lpPayload pkg loc))
     )
     locals
@@ -243,8 +279,11 @@     then Set.delete pkg.name packageDepsSet
     else Set.intersection localNames packageDepsSet
   localNames = Set.fromList $ map (.package.name) locals
-  lpPayload pkg loc =
-    DotPayload (Just pkg.version) (Just pkg.license) (Just loc)
+  lpPayload pkg loc =  DotPayload
+    { version = Just pkg.version
+    , license = Just pkg.license
+    , location = Just loc
+    }
 
 -- | Given a SourceMap and a dependency loader, load the set of dependencies for
 -- a package
@@ -263,7 +302,7 @@   -> PackageName
   -> RIO DotConfig (Set PackageName, DotPayload)
 createDepLoader sourceMap globalDumpMap globalIdMap loadPackageDeps pkgName =
-  fromMaybe (throwIO $ PackageNotFoundBug pkgName)
+  fromMaybe (prettyThrowIO $ PackageNotFound pkgName)
     (projectPackageDeps <|> dependencyDeps <|> globalDeps)
  where
   projectPackageDeps = loadDeps <$> Map.lookup pkgName sourceMap.project
@@ -305,21 +344,26 @@           Stack.Prelude.pkgName
           (Map.lookup depId globalIdMap)
 
-  payloadFromLocal pkg =
-    DotPayload (Just pkg.version) (Just pkg.license)
+  payloadFromLocal pkg location = DotPayload
+    { version = Just pkg.version
+    , license = Just pkg.license
+    , location
+    }
 
   payloadFromDump dp = DotPayload
-    (Just $ pkgVersion dp.packageIdent)
-    (Right <$> dp.license)
-    Nothing
+    { version = Just $ pkgVersion dp.packageIdent
+    , license = Right <$> dp.license
+    , location = Nothing
+    }
 
--- | Resolve the dependency graph up to (Just depth) or until fixpoint is reached
+-- | Resolve the dependency graph up to (Just depth) or until fixpoint is
+-- reached
 resolveDependencies ::
      (Applicative m, Monad m)
   => Maybe Int
-  -> Map PackageName (Set PackageName, DotPayload)
+  -> DependencyGraph
   -> (PackageName -> m (Set PackageName, DotPayload))
-  -> m (Map PackageName (Set PackageName, DotPayload))
+  -> m DependencyGraph
 resolveDependencies (Just 0) graph _ = pure graph
 resolveDependencies limit graph loadPackageDeps = do
   let values = Set.unions (fst <$> Map.elems graph)
@@ -334,7 +378,7 @@         (Map.unionWith unifier graph (Map.fromList x))
         loadPackageDeps
  where
-  unifier (pkgs1,v1) (pkgs2,_) = (Set.union pkgs1 pkgs2, v1)
+  unifier (pkgs1, v1) (pkgs2, _) = (Set.union pkgs1 pkgs2, v1)
 
 -- | @pruneGraph dontPrune toPrune graph@ prunes all packages in @graph@ with a
 -- name in @toPrune@ and removes resulting orphans unless they are in
@@ -346,13 +390,13 @@   -> Map PackageName (Set PackageName, a)
   -> Map PackageName (Set PackageName, a)
 pruneGraph dontPrune names =
-  pruneUnreachable dontPrune . Map.mapMaybeWithKey (\pkg (pkgDeps,x) ->
+  pruneUnreachable dontPrune . Map.mapMaybeWithKey (\pkg (pkgDeps, x) ->
     if pkg `F.elem` names
       then Nothing
       else let filtered = Set.filter (`F.notElem` names) pkgDeps
            in  if Set.null filtered && not (Set.null pkgDeps)
                  then Nothing
-                 else Just (filtered,x))
+                 else Just (filtered, x))
 
 -- | Make sure that all unreachable nodes (orphans) are pruned
 pruneUnreachable ::
src/Stack/Docker.hs view
@@ -229,14 +229,12 @@     ( prettyWarnS
         "Using boot2docker is NOT supported, and not likely to perform well."
     )
-  maybeImageInfo <- inspect image
-  imageInfo <- case maybeImageInfo of
+  imageInfo <- inspect image >>= \case
     Just ii -> pure ii
     Nothing
       | docker.autoPull -> do
           pullImage docker image
-          mii2 <- inspect image
-          case mii2 of
+          inspect image >>= \case
             Just ii2 -> pure ii2
             Nothing -> throwM (InspectFailedException image)
       | otherwise -> throwM (NotPulledException image)
@@ -342,23 +340,22 @@         , args
         ]
       )
-  e <- handleSignals docker keepStdinOpen containerID
-  case e of
+  handleSignals docker keepStdinOpen containerID >>= \case
     Left ExitCodeException{eceExitCode} -> exitWith eceExitCode
     Right () -> exitSuccess
-  where
-    -- This is using a hash of the Docker repository (without tag or digest) to
-    -- ensure binaries/libraries aren't shared between Docker and host (or
-    -- incompatible Docker images)
-    hashRepoName :: String -> Hash.Digest Hash.MD5
-    hashRepoName = Hash.hash . BS.pack . takeWhile (\c -> c /= ':' && c /= '@')
-    lookupImageEnv name vars =
-      case lookup name vars of
-        Just ('=':val) -> Just val
-        _ -> Nothing
-    mountArg mountSuffix (Mount host container) =
-      ["-v",host ++ ":" ++ container ++ mountSuffix]
-    sshRelDir = relDirDotSsh
+ where
+  -- This is using a hash of the Docker repository (without tag or digest) to
+  -- ensure binaries/libraries aren't shared between Docker and host (or
+  -- incompatible Docker images)
+  hashRepoName :: String -> Hash.Digest Hash.MD5
+  hashRepoName = Hash.hash . BS.pack . takeWhile (\c -> c /= ':' && c /= '@')
+  lookupImageEnv name vars =
+    case lookup name vars of
+      Just ('=':val) -> Just val
+      _ -> Nothing
+  mountArg mountSuffix (Mount host container) =
+    ["-v",host ++ ":" ++ container ++ mountSuffix]
+  sshRelDir = relDirDotSsh
 
 -- | Inspect Docker image or container.
 inspect ::
src/Stack/Dot.hs view
@@ -23,29 +23,32 @@ import           Stack.Constants ( wiredInPackages )
 import           Stack.DependencyGraph ( createPrunedDependencyGraph )
 import           Stack.Prelude
-import           Stack.Types.DependencyTree ( DotPayload (..) )
+import           Stack.Types.Compiler ( ActualCompiler )
+import           Stack.Types.DependencyTree ( DependencyGraph )
 import           Stack.Types.DotOpts ( DotOpts (..) )
 import           Stack.Types.Runner ( Runner )
 
 -- | Visualize the project's dependencies as a graphviz graph
 dotCmd :: DotOpts -> RIO Runner ()
 dotCmd dotOpts = do
-  (localNames, prunedGraph) <- createPrunedDependencyGraph dotOpts
-  printGraph dotOpts localNames prunedGraph
+  (compiler, localNames, prunedGraph) <- createPrunedDependencyGraph dotOpts
+  printGraph dotOpts compiler localNames prunedGraph
 
 -- | Print a graphviz graph of the edges in the Map and highlight the given
 -- project packages
 printGraph ::
      (Applicative m, MonadIO m)
   => DotOpts
+  -> ActualCompiler
   -> Set PackageName -- ^ All project packages.
-  -> Map PackageName (Set PackageName, DotPayload)
+  -> DependencyGraph
   -> m ()
-printGraph dotOpts locals graph = do
+printGraph dotOpts compiler locals graph = do
   liftIO $ Text.putStrLn "strict digraph deps {"
   printLocalNodes dotOpts filteredLocals
-  printLeaves graph
-  void (Map.traverseWithKey printEdges (fst <$> graph))
+  printLeaves compiler graph
+  let allNodes = Map.keysSet graph
+  void (Map.traverseWithKey (printEdges allNodes) (fst <$> graph))
   liftIO $ Text.putStrLn "}"
  where
   filteredLocals =
@@ -68,16 +71,31 @@   lpNodes :: [Text]
   lpNodes = map (applyStyle . nodeName) (F.toList locals)
 
--- | Print nodes without dependencies
-printLeaves ::
+-- | Print relevant nodes, based on their relevant attributes.
+printLeaves :: MonadIO m => ActualCompiler -> DependencyGraph -> m ()
+printLeaves compiler graph =
+  F.mapM_ printLeaf (Map.mapWithKey nodeAttributes graph)
+ where
+  allNodes = Map.keysSet graph
+  hasNoNodes = F.all (`Set.notMember` allNodes)
+  nodeAttributes package (deps, _) =
+    let isWiredInPackage = isWiredIn compiler package
+        isBottomRow = hasNoNodes deps
+    in  (package, isWiredInPackage, isBottomRow)
+
+-- | @printDedges ps p ps'@ prints an edge from @p@ to every @ps'@, if it is a
+-- member of @ps@.
+printEdges ::
      MonadIO m
-  => Map PackageName (Set PackageName, DotPayload)
+  => Set PackageName
+     -- ^ The nodes in the graph.
+  -> PackageName
+     -- ^ The node in question.
+  -> Set PackageName
+     -- ^ The dependencies of the node in question.
   -> m ()
-printLeaves = F.mapM_ printLeaf . Map.keysSet . Map.filter Set.null . fmap fst
-
--- | @printDedges p ps@ prints an edge from p to every ps
-printEdges :: MonadIO m => PackageName -> Set PackageName -> m ()
-printEdges package deps = F.forM_ deps (printEdge package)
+printEdges nodes package deps = F.forM_ deps $ \dep ->
+  when (dep `elem` nodes) $ printEdge package dep
 
 -- | Print an edge between the two package names
 printEdge :: MonadIO m => PackageName -> PackageName -> m ()
@@ -91,13 +109,28 @@ nodeName :: PackageName -> Text
 nodeName name = "\"" <> Text.pack (packageNameString name) <> "\""
 
--- | Print a node with no dependencies
-printLeaf :: MonadIO m => PackageName -> m ()
-printLeaf package = liftIO . Text.putStrLn . Text.concat $
-  if isWiredIn package
-    then ["{rank=max; ", nodeName package, " [shape=box]; };"]
-    else ["{rank=max; ", nodeName package, "; };"]
+-- | Print a node if it (a) is a GHC wired-in package or (b) has no dependencies
+-- that are also nodes.
+printLeaf ::
+     MonadIO m
+  =>  ( PackageName
+      , Bool
+        -- Is package a GHC wired-in package?
+      , Bool
+        -- Does package have no dependencies that are are also nodes in the
+        -- graph?
+      )
+  -> m ()
+printLeaf (package, isWiredInPackage, isBottomRow) =
+  when (isWiredInPackage || isBottomRow) $
+    liftIO . Text.putStrLn . Text.concat $
+         [ "{"]
+      <> [ "rank=max; " | isBottomRow ]
+      <> [ nodeName package ]
+      <> [ " [shape=box]" | isWiredInPackage ]
+      <> [ "; };" ]
 
--- | Check if the package is wired in (shipped with) ghc
-isWiredIn :: PackageName -> Bool
-isWiredIn = (`Set.member` wiredInPackages)
+-- | Check if the package is a GHC wired-in package
+isWiredIn :: ActualCompiler -> PackageName -> Bool
+isWiredIn compiler package =
+  package `Set.member` wiredInPackages compiler
src/Stack/Exec.hs view
@@ -54,7 +54,7 @@ -- module.
 newtype ExecException
   = InvalidPathForExec FilePath
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ExecException where
   displayException (InvalidPathForExec path) = concat
@@ -71,7 +71,7 @@   | ExecutableToRunNotFound
   | NoPackageIdReportedBug
   | InvalidExecTargets ![Text]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty ExecPrettyException where
   pretty (PackageIdNotFoundBug name) = bugPrettyReport "[S-8251]" $
@@ -180,8 +180,7 @@   getPkgId (ExecTarget pkgName _) = do
     let name = unPackageName pkgName
     pkg <- getGhcPkgExe
-    mId <- findGhcPkgField pkg [] name "id"
-    case mId of
+    findGhcPkgField pkg [] name "id" >>= \case
       Just i -> maybe
         (prettyThrowIO NoPackageIdReportedBug)
         (pure . head)
src/Stack/FileWatch.hs view
@@ -80,12 +80,10 @@                 (Map.zipWithMatched keepListening)
                 watch0
                 newDirs
-          watch1 <- forM (Map.toList actions) $ \(k, mmv) -> do
-            mv <- mmv
-            pure $
-              case mv of
-                Nothing -> Map.empty
-                Just v -> Map.singleton k v
+          watch1 <- forM (Map.toList actions) $ \(k, mmv) ->
+            mmv <&> \case
+              Nothing -> Map.empty
+              Just v -> Map.singleton k v
           atomically $ writeTVar watchVar $ Map.unions watch1
          where
           newDirs = Map.fromList $ map (, ())
@@ -203,8 +201,7 @@           then ("sh", [toFilePath hook])
           else (toFilePath hook, [])
     menv <- view processContextL
-    exit <- withProcessContext menv $ proc cmd args runProcess
-    case exit of
+    withProcessContext menv $ proc cmd args runProcess >>= \case
       ExitSuccess -> pure ()
       ExitFailure i -> do
         prettyWarnL
src/Stack/GhcPkg.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -144,17 +143,11 @@   -> String -- ^ package identifier, or GhcPkgId
   -> Text
   -> RIO env (Maybe Text)
-findGhcPkgField pkgexe pkgDbs name field = do
-  result <-
-    ghcPkg
-      pkgexe
-      pkgDbs
-      ["field", "--simple-output", name, T.unpack field]
-  pure $
-    case result of
-      Left{} -> Nothing
-      Right bs ->
-        fmap (stripCR . T.decodeUtf8) $ listToMaybe $ S8.lines bs
+findGhcPkgField pkgexe pkgDbs name field =
+  let cmd = ["field", "--simple-output", name, T.unpack field]
+  in  ghcPkg pkgexe pkgDbs cmd <&> \case
+        Left _ -> Nothing
+        Right bs -> fmap (stripCR . T.decodeUtf8) $ listToMaybe $ S8.lines bs
 
 -- | unregister list of package ghcids, batching available from GHC 8.2.1,
 -- see https://github.com/commercialhaskell/stack/issues/2662#issuecomment-460342402
@@ -186,9 +179,7 @@   -> RIO env ()
 unregisterGhcPkgIds isWarn pkgexe pkgDb epgids = do
   globalDb <- view $ compilerPathsL . to (.globalDB)
-  eresUnregister <- try $ do
-    ghcPkgUnregisterForce globalDb pkgDb hasIpid pkgarg_strs
-  case eresUnregister of
+  try (ghcPkgUnregisterForce globalDb pkgDb hasIpid pkgarg_strs) >>= \case
     Left (PrettyException e) -> when isWarn $
       prettyWarn $
         "[S-8729]"
@@ -200,8 +191,7 @@     Right _ -> pure ()
   -- ghcPkgUnregisterForce does not perform an effective 'ghc-pkg recache', as
   -- that depends on a specific version of the Cabal package.
-  eresRecache <- ghcPkg pkgexe [pkgDb] ["recache"]
-  case eresRecache of
+  ghcPkg pkgexe [pkgDb] ["recache"] >>= \case
     Left err -> prettyThrowM $ CannotRecacheAfterUnregister pkgDb err
     Right _ -> pure ()
  where
src/Stack/Ghci.hs view
@@ -110,7 +110,7 @@   | FileTargetIsInvalidAbsFile !String
   | Can'tSpecifyFilesAndTargets
   | Can'tSpecifyFilesAndMainIs
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty GhciPrettyException where
   pretty (GhciTargetParseException errs) =
@@ -241,14 +241,15 @@   -- Parse --main-is argument.
   mainIsTargets <- parseMainIsTargets buildOptsCLI sma opts.mainIs
   -- Parse to either file targets or build targets
-  etargets <- preprocessTargets buildOptsCLI sma opts.targets
-  (inputTargets, mfileTargets) <- case etargets of
-    Right packageTargets -> pure (packageTargets, Nothing)
-    Left rawFileTargets -> do
-      whenJust mainIsTargets $ \_ -> prettyThrowM Can'tSpecifyFilesAndMainIs
-      -- Figure out targets based on filepath targets
-      (targetMap, fileInfo, extraFiles) <- findFileTargets locals rawFileTargets
-      pure (targetMap, Just (fileInfo, extraFiles))
+  (inputTargets, mfileTargets) <-
+    preprocessTargets buildOptsCLI sma opts.targets >>= \case
+      Right packageTargets -> pure (packageTargets, Nothing)
+      Left rawFileTargets -> do
+        whenJust mainIsTargets $ \_ -> prettyThrowM Can'tSpecifyFilesAndMainIs
+        -- Figure out targets based on filepath targets
+        (targetMap, fileInfo, extraFiles) <-
+          findFileTargets locals rawFileTargets
+        pure (targetMap, Just (fileInfo, extraFiles))
   -- Get a list of all the local target packages.
   localTargets <- getAllLocalTargets opts inputTargets mainIsTargets localMap
   -- Get a list of all the non-local target packages.
@@ -311,8 +312,7 @@     then do
       fileTargets <- forM fileTargetsRaw $ \fp0 -> do
         let fp = T.unpack fp0
-        mpath <- forgivingResolveFile' fp
-        case mpath of
+        forgivingResolveFile' fp >>= \case
           Nothing -> prettyThrowM (FileTargetIsInvalidAbsFile fp)
           Just path -> pure path
       pure (Left fileTargets)
@@ -467,8 +467,7 @@   whenJust (nonEmpty targets) $ \nonEmptyTargets ->
     unless ghciOpts.noBuild $ do
       -- only new project package targets could appear here
-      eres <- buildLocalTargets nonEmptyTargets
-      case eres of
+      buildLocalTargets nonEmptyTargets >>= \case
         Right () -> pure ()
         Left err -> do
           case fromException err of
@@ -924,6 +923,7 @@   (mods, files, opts) <-
     getPackageOpts pkg installMap installedMap locals addPkgs cabalFP
   let filteredOpts = filterWanted opts
+      filterWanted :: Map NamedComponent a -> Map NamedComponent a
       filterWanted = M.filterWithKey (\k _ -> k `S.member` allWanted)
       allWanted = wantedPackageComponents bopts target pkg
   pure GhciPkgInfo
@@ -1146,8 +1146,7 @@       ]
   when (null localTargets && isNothing mfileTargets) $ do
     smWanted <- view $ buildConfigL . to (.smWanted)
-    configFile <- view configFileL
-    case configFile of
+    view configFileL >>= \case
       -- A user-specific global configuration file
       Left _ -> prettyThrowM ConfigFileNotProjectLevelBug
       -- A project-level configuration file
src/Stack/Hoogle.hs view
@@ -54,7 +54,7 @@ -- "Stack.Hoogle" module.
 data HoogleException
   = HoogleOnPathNotFoundBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception HoogleException where
   displayException HoogleOnPathNotFoundBug = bugReport "[S-9669]"
@@ -65,7 +65,7 @@ data HooglePrettyException
   = HoogleNotFound StyleDoc
   | HoogleDatabaseNotFound
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty HooglePrettyException where
   pretty (HoogleNotFound e) =
@@ -236,11 +236,10 @@   ensureHoogleInPath = do
     config <- view configL
     menv <- liftIO $ config.processContextSettings envSettings
-    mHooglePath' <- eitherToMaybe <$> runRIO menv (findExecutable "hoogle")
-    let mHooglePath'' =
+    mHooglePath <- eitherToMaybe <$> runRIO menv (findExecutable "hoogle")
+    let mHooglePath' =
           eitherToMaybe <$> requiringHoogle NotMuted (findExecutable "hoogle")
-    mHooglePath <- maybe mHooglePath'' (pure . Just) mHooglePath'
-    eres <- case mHooglePath of
+    eres <- maybe mHooglePath' (pure . Just) mHooglePath >>= \case
       Nothing -> pure $ Left (flow "Hoogle isn't installed.")
       Just hooglePath -> do
         result <- withProcessContext menv
src/Stack/Init.hs view
@@ -69,7 +69,7 @@ -- "Stack.Init" module.
 data InitException
   = NoPackagesToIgnoreBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception InitException where
   displayException NoPackagesToIgnoreBug = bugReport "[S-2747]"
@@ -84,7 +84,7 @@   | NoMatchingSnapshot !(NonEmpty SnapName)
   | SnapshotMismatch !RawSnapshotLocation String
   | SnapshotPartial !RawSnapshotLocation !String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty InitPrettyException where
   pretty (ConfigFileAlreadyExists reldest) =
@@ -437,9 +437,9 @@     , "A snapshot resolver dictates the compiler version and the set of packages"
     , "to be used for project dependencies. For example:"
     , ""
-    , "snapshot: lts-23.24"
-    , "snapshot: nightly-2025-06-15"
-    , "snapshot: ghc-9.8.4"
+    , "snapshot: lts-24.24"
+    , "snapshot: nightly-2025-12-20"
+    , "snapshot: ghc-9.10.3"
     , ""
     , "The location of a snapshot can be provided as a file or url. Stack assumes"
     , "a snapshot provided as a file might change, whereas a url resource does not."
@@ -747,8 +747,7 @@      (MonadIO m, RelPath (Path r t) ~ Path Rel t, AnyPath (Path r t))
   => Path r t
   -> m FilePath
-prettyPath path = do
-  eres <- liftIO $ try $ makeRelativeToCurrentDir path
-  pure $ case eres of
+prettyPath path =
+  liftIO (try $ makeRelativeToCurrentDir path) <&> \case
     Left (_ :: PathException) -> toFilePath path
     Right res -> toFilePath res
src/Stack/List.hs view
@@ -27,7 +27,7 @@ -- "Stack.List" module.
 newtype ListPrettyException
   = CouldNotParsePackageSelectors [StyleDoc]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty ListPrettyException where
   pretty (CouldNotParsePackageSelectors errs) =
src/Stack/Lock.hs view
@@ -37,7 +37,7 @@ -- "Stack.Lock" module.
 data LockPrettyException
   = WritingLockFileError (Path Abs File) Locked
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty LockPrettyException where
   pretty (WritingLockFileError lockFile newLocked) =
@@ -117,9 +117,8 @@   => (Value -> Yaml.Parser (WithJSONWarnings a))
   -> Path Abs File
   -> RIO env a
-loadYamlThrow parser path = do
-  eVal <- liftIO $ Yaml.decodeFileEither (toFilePath path)
-  case eVal of
+loadYamlThrow parser path =
+  liftIO (Yaml.decodeFileEither (toFilePath path)) >>= \case
     Left parseException -> throwIO $
       ParseConfigFileException path parseException
     Right val -> case Yaml.parseEither parser val of
src/Stack/Ls.hs view
@@ -50,8 +50,8 @@                    ( BuildConfig (..), HasBuildConfig (..) )
 import           Stack.Types.Config ( Config (..), HasConfig (..) )
 import           Stack.Types.DependencyTree
-                   ( DependencyTree (..), DotPayload (..), licenseText
-                   , versionText
+                   ( DependencyGraph, DependencyTree (..), DotPayload (..)
+                   , licenseText, versionText
                    )
 import           Stack.Types.DotOpts ( DotOpts (..) )
 import           Stack.Types.DumpPackage ( DumpPackage (..) )
@@ -75,7 +75,7 @@ -- module.
 newtype LsException
   = ParseFailure [Value]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception LsException where
   displayException (ParseFailure val) =
@@ -299,7 +299,7 @@ listDependencies :: ListDepsOpts -> RIO Runner ()
 listDependencies opts = do
   let dotOpts = opts.dotOpts
-  (pkgs, resultGraph) <- createPrunedDependencyGraph dotOpts
+  (_, pkgs, resultGraph) <- createPrunedDependencyGraph dotOpts
   liftIO $ case opts.format of
     ListDepsTree treeOpts ->
       T.putStrLn "Packages"
@@ -320,7 +320,10 @@         FilterPackage pkgName -> pkgName : exclude' locals fs
         FilterLocals -> locals <> exclude' locals fs
     ListDepsConstraints -> do
-      let constraintOpts = ListDepsFormatOpts " ==" False
+      let constraintOpts = ListDepsFormatOpts
+            { sep = " =="
+            , license = False
+            }
       T.putStrLn "constraints:"
       void $ Map.traverseWithKey (go "  , " constraintOpts)
                                  (snd <$> resultGraph)
@@ -341,7 +344,7 @@   -> Int
   -> [Int]
   -> Set PackageName
-  -> Map PackageName (Set PackageName, DotPayload)
+  -> DependencyGraph
   -> IO ()
 printTree opts dotOpts depth remainingDepsCounts packages dependencyMap =
   F.sequence_ $ Seq.mapWithIndex go (toSeq packages)
@@ -385,8 +388,10 @@ treeNodePrefix t [_] True  _ = t <> "├─┬"
 treeNodePrefix t [0] False _ = t <> "└──"
 treeNodePrefix t [_] False _ = t <> "├──"
-treeNodePrefix t (0:ns) d remainingDepth = treeNodePrefix (t <> "  ") ns d remainingDepth
-treeNodePrefix t (_:ns) d remainingDepth = treeNodePrefix (t <> "│ ") ns d remainingDepth
+treeNodePrefix t (0:ns) d remainingDepth =
+  treeNodePrefix (t <> "  ") ns d remainingDepth
+treeNodePrefix t (_:ns) d remainingDepth =
+  treeNodePrefix (t <> "│ ") ns d remainingDepth
 
 listDepsLine :: ListDepsFormatOpts -> PackageName -> DotPayload -> Text
 listDepsLine opts name payload =
@@ -399,9 +404,6 @@     then licenseText payload
     else versionText payload
 
-printJSON ::
-     Set PackageName
-  -> Map PackageName (Set PackageName, DotPayload)
-  -> IO ()
+printJSON :: Set PackageName -> DependencyGraph -> IO ()
 printJSON pkgs dependencyMap =
   LBC8.putStrLn $ encode $ DependencyTree pkgs dependencyMap
src/Stack/New.hs view
@@ -48,8 +48,8 @@                    ( doesDirExist, doesFileExist, ensureDir, getCurrentDir )
 import           RIO.Process ( proc, runProcess_, withWorkingDir )
 import           Stack.Constants
-                   ( altGitHubTokenEnvVar, backupUrlRelPath, gitHubBasicAuthType
-                   , gitHubTokenEnvVar, stackDotYaml, wiredInPackages
+                   ( allWiredInPackages, altGitHubTokenEnvVar, backupUrlRelPath
+                   , gitHubBasicAuthType, gitHubTokenEnvVar, stackDotYaml
                    )
 import           Stack.Constants.Config ( templatesDir )
 import           Stack.Init ( InitOpts (..), initProject )
@@ -84,7 +84,6 @@   | TemplateInvalid !TemplateName !StyleDoc
   | MagicPackageNameInvalid !String
   | AttemptedOverwrites !Text ![Path Abs File]
-  deriving Typeable
 
 deriving instance Show NewPrettyException
 
@@ -195,7 +194,7 @@              (map fromPackageName sortedWiredInPackages :: [StyleDoc])
          )
    where
-    sortedWiredInPackages = L.sort $ S.toList wiredInPackages
+    sortedWiredInPackages = L.sort $ S.toList allWiredInPackages
   pretty (AttemptedOverwrites name fps) =
     "[S-3113]"
     <> line
@@ -249,7 +248,7 @@ -- | Create a new project with the given options.
 new :: HasConfig env => NewOpts -> Bool -> RIO env (Path Abs Dir)
 new opts forceOverwrite = do
-  when (project `elem` wiredInPackages) $
+  when (project `elem` allWiredInPackages) $
       prettyThrowM $ MagicPackageNameInvalid projectName
   pwd <- getCurrentDir
   absDir <- if bare
@@ -464,9 +463,8 @@         , T.unpack name
         ]
     , basicAuth = mBasicAuth
-    , extract = \bs -> do
-        decodedJson <- eitherDecode (LB.fromStrict bs)
-        case decodedJson of
+    , extract = \bs ->
+        eitherDecode (LB.fromStrict bs) >>= \case
           Object o | Just (String content) <- KeyMap.lookup "content" o -> do
             let noNewlines = T.filter (/= '\n')
             bsContent <- B64.decode $ T.encodeUtf8 (noNewlines content)
@@ -489,6 +487,14 @@     , "/"
     , T.unpack user
     , "/stack-templates/raw/master/"
+    , T.unpack name
+    ]
+settingsFromRepoTemplatePath (RepoTemplatePath Codeberg user name) = pure $
+  asIsFromUrl $ concat
+    [ "https://codeberg.org"
+    , "/"
+    , T.unpack user
+    , "/stack-templates/raw/"
     , T.unpack name
     ]
 
src/Stack/Nix.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -42,7 +41,7 @@ data NixException
   = CannotDetermineProjectRoot
     -- ^ Can't determine the project root (location of the shell file if any).
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception NixException where
   displayException CannotDetermineProjectRoot =
src/Stack/Options/BenchParser.hs view
@@ -13,7 +13,8 @@  ( benchOptsParser
  ) where
 
-import           Options.Applicative ( Parser, help, long, metavar, strOption )
+import           Options.Applicative
+                   ( Mod, Parser, help, long, metavar, strOption )
 import           Options.Applicative.Builder.Extra
                    ( firstBoolFlagsTrue, optionalFirst )
 import           Stack.Prelude
@@ -37,4 +38,5 @@         "running of targeted benchmarks."
         hide
  where
+  hide :: Mod f a
   hide = hideMods hide0
src/Stack/Options/BuildMonoidParser.hs view
@@ -14,8 +14,8 @@ 
 import           Distribution.Parsec ( eitherParsec )
 import           Options.Applicative
-                   ( Parser, eitherReader, flag, help, long, metavar, option
-                   , strOption
+                   ( FlagFields, Mod, Parser, eitherReader, flag, help, long
+                   , metavar, option, strOption
                    )
 import           Options.Applicative.Builder.Extra
                    ( firstBoolFlagsFalse, firstBoolFlagsNoDefault
@@ -72,7 +72,9 @@   <*> ddumpDir
  where
   hideBool = hide0 /= BuildCmdGlobalOpts
+  hide :: Mod f a
   hide = hideMods hideBool
+  hideExceptGhci :: Mod FlagFields a
   hideExceptGhci =
     hideMods (hide0 `notElem` [BuildCmdGlobalOpts, GhciCmdGlobalOpts])
 
src/Stack/Options/CleanParser.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE ApplicativeDo     #-}
 
 {-|
 Module      : Stack.Options.CleanParser
@@ -9,25 +10,50 @@   ( cleanOptsParser
   ) where
 
-import           Options.Applicative ( Parser, flag', help, long, metavar )
-import           Stack.Clean ( CleanCommand (..), CleanOpts (..) )
+import           Options.Applicative ( Parser, flag', help, idm, long, metavar )
+import           Options.Applicative.Builder.Extra ( boolFlags )
+import           Stack.Clean
+                   ( CleanCommand (..), CleanDepth (..), CleanOpts (..) )
 import           Stack.Prelude
 import           Stack.Types.PackageName ( packageNameArgument )
 
 -- | Command-line parser for the clean command.
 cleanOptsParser :: CleanCommand -> Parser CleanOpts
-cleanOptsParser Clean = CleanShallow
-  <$> packages
-  <|> doFullClean
+cleanOptsParser Clean = shallowParser <|> fullParser
+
+cleanOptsParser Purge = pure $ CleanOpts
+  { depth = CleanFull
+  , omitThis = False
+  }
+
+shallowParser :: Parser CleanOpts
+shallowParser = do
+  packages <- parsePackages
+  omitThis <- parseOmitThis
+  pure $ CleanOpts
+    { depth = CleanShallow packages
+    , omitThis
+    }
  where
-  packages = many (packageNameArgument
+  parsePackages = many (packageNameArgument
     (  metavar "PACKAGE"
     <> help "If none specified, clean all project packages."
     ))
+  parseOmitThis = boolFlags False
+    "omit-this"
+    "the omission of directories currently in use"
+    idm
+
+fullParser :: Parser CleanOpts
+fullParser = do
+  depth <- doFullClean
+  pure $ CleanOpts
+    { depth
+    , omitThis = False
+    }
+ where
   doFullClean = flag' CleanFull
     (  long "full"
-    <> help "Delete the project's Stack working directories (.stack-work by \
+    <> help "Delete the project's Stack work directories (.stack-work by \
             \default)."
     )
-
-cleanOptsParser Purge = pure CleanFull
src/Stack/Options/ConfigParser.hs view
@@ -12,8 +12,8 @@ 
 import           Data.Char ( toUpper )
 import           Options.Applicative
-                   ( Parser, auto, completer, completeWith, eitherReader, help
-                   , long, metavar, option, short, strOption
+                   ( Mod, Parser, auto, completer, completeWith, eitherReader
+                   , help, long, metavar, option, short, strOption
                    )
 import           Options.Applicative.Builder.Extra
                    ( PathCompleterOpts (..), absDirOption, absFileOption
@@ -160,7 +160,8 @@         ))
   <*> firstBoolFlagsFalse
         "hpack-force"
-        "overwriting of Cabal files that have been modified manually."
+        "overwriting of Cabal files that were created by a more recent \
+        \version of Hpack or have been modified manually."
         hide
   <*> firstBoolFlagsFalse
         "skip-ghc-check"
@@ -222,6 +223,7 @@         "the use of options `--no-run --compile` with `stack script`."
         hide
  where
+  hide :: Mod f a
   hide = hideMods (hide0 /= OuterGlobalOpts)
   toDumpLogs (First (Just True)) = First (Just DumpAllLogs)
   toDumpLogs (First (Just False)) = First (Just DumpNoLogs)
src/Stack/Options/ConfigSetParser.hs view
@@ -36,7 +36,7 @@               <$> OA.argument
                     readAbstractSnapshot
                     (  OA.metavar "SNAPSHOT"
-                    <> OA.help "E.g. \"nightly\" or \"lts-22.8\"" ))
+                    <> OA.help "E.g. \"nightly\" or \"lts-24.24\"" ))
               ( OA.progDesc
                   "Change the snapshot of the current project." ))
       , OA.command "resolver"
@@ -45,7 +45,7 @@               <$> OA.argument
                     readAbstractSnapshot
                     (  OA.metavar "SNAPSHOT"
-                    <> OA.help "E.g. \"nightly\" or \"lts-22.8\"" ))
+                    <> OA.help "E.g. \"nightly\" or \"lts-24.24\"" ))
               ( OA.progDesc
                   "Change the snapshot of the current project, using the \
                   \resolver key." ))
src/Stack/Options/DockerParser.hs view
@@ -13,8 +13,8 @@ import qualified Data.Text as T
 import           Distribution.Version ( anyVersion )
 import           Options.Applicative
-                   ( Parser, auto, completer, help, listCompleter, long, metavar
-                   , option, str, value
+                   ( Mod, Parser, auto, completer, help, listCompleter, long
+                   , metavar, option, str, value
                    )
 import           Options.Applicative.Args ( argsOption )
 import           Options.Applicative.Builder.Extra
@@ -154,4 +154,5 @@  where
   dockerOptName optName = dockerCmdName ++ "-" ++ T.unpack optName
   firstStrOption = optionalFirst . option str
+  hide :: Mod f a
   hide = hideMods hide0
src/Stack/Options/GlobalParser.hs view
@@ -16,8 +16,8 @@   ) where
 
 import           Options.Applicative
-                   ( Parser, ReadM, auto, completer, help, hidden, internal
-                   , long, metavar, option, strOption, value
+                   ( Mod, Parser, ReadM, auto, completer, help, hidden, internal
+                   , long, metavar, option, short, strOption, value
                    )
 import           Options.Applicative.Builder.Extra
                    ( fileExtCompleter, firstBoolFlagsFalse
@@ -102,6 +102,7 @@         ))
   <*> optionalFirst (strOption
         (  long "stack-yaml"
+        <> short 'w'
         <> metavar "STACK-YAML"
         <> completer (fileExtCompleter [".yaml"])
         <> help "Override project stack.yaml file (overrides any STACK_YAML \
@@ -115,6 +116,7 @@         <> hide
         ))
  where
+  hide :: Mod f a
   hide = hideMods hide0
   hide0 = kind /= OuterGlobalOpts
 
src/Stack/Options/NewParser.hs view
@@ -42,9 +42,10 @@           (  metavar "TEMPLATE_NAME"
           <> help "Name of a template - can take the form\
                   \ [[service:]username/]template with optional service name\
-                  \ (github, gitlab, or bitbucket) and username for the \
-                  \service; or, a local filename such as foo.hsfiles or ~/foo; \
-                  \or, a full URL such as https://example.com/foo.hsfiles."
+                  \ (github, gitlab, bitbucket, or codeberg) and username for\
+                  \ the service; or, a local filename such as foo.hsfiles or\
+                  \ ~/foo; or, a full URL such as\
+                  \ https://example.com/foo.hsfiles."
           ))
     <*> fmap M.fromList (many (templateParamArgument
           (  short 'p'
src/Stack/Options/NixParser.hs view
@@ -15,7 +15,7 @@ 
 import qualified Data.Text as T
 import           Options.Applicative
-                   ( Parser, completer, help, long, metavar, option, str )
+                   ( Mod, Parser, completer, help, long, metavar, option, str )
 import           Options.Applicative.Args ( argsOption )
 import           Options.Applicative.Builder.Extra
                    ( fileExtCompleter, firstBoolFlagsFalse
@@ -73,6 +73,7 @@         hide
   )
  where
+  hide :: Mod f a
   hide = hideMods hide0
   overrideActivation m =
     if fromFirst False m.pureShell
src/Stack/Options/SetupParser.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE DataKinds         #-}
 {-# LANGUAGE OverloadedStrings #-}
 
 {-|
@@ -26,7 +25,7 @@ setupOptsParser = SetupCmdOpts
   <$> OA.optional (OA.argument readVersion
         (  OA.metavar "GHC_VERSION"
-        <> OA.help "Version of GHC to install, e.g. 9.8.4. (default: install \
+        <> OA.help "Version of GHC to install, e.g. 9.10.3. (default: install \
                    \the version implied by the snapshot)"
         ))
   <*> OA.boolFlags False
src/Stack/Options/SnapshotParser.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE DataKinds         #-}
 
 {-|
 Module      : Stack.Options.SnapshotParser
src/Stack/Options/TestParser.hs view
@@ -10,7 +10,7 @@   ) where
 
 import           Options.Applicative
-                   ( Parser, auto, flag', help, long, metavar, option )
+                   ( Mod, Parser, auto, flag', help, long, metavar, option )
 import           Options.Applicative.Args ( argsOption )
 import           Options.Applicative.Builder.Extra
                    ( firstBoolFlagsTrue, optionalFirst, optionalFirstFalse )
@@ -52,4 +52,5 @@         "allow standard input in test suites."
         hide
  where
+  hide :: Mod f a
   hide = hideMods hide0
src/Stack/Package.hs view
@@ -1,9 +1,7 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
-{-# LANGUAGE ScopedTypeVariables   #-}
 
 {-|
 Module      : Stack.Package
@@ -25,7 +23,6 @@   , packageDependencies
   , applyForceCustomBuild
   , hasBuildableMainLibrary
-  , mainLibraryHasExposedModules
   , packageUnknownTools
   , buildableForeignLibs
   , buildableSubLibs
@@ -63,7 +60,7 @@ import           Distribution.System ( OS (..), Arch, Platform (..) )
 import           Distribution.Text ( display )
 import qualified Distribution.Types.CondTree as Cabal
-import           Distribution.Utils.Path ( getSymbolicPath )
+import           Distribution.Utils.Path ( makeSymbolicPath, getSymbolicPath )
 import           Distribution.Verbosity ( silent )
 import           Distribution.Version
                    ( anyVersion, mkVersion, orLaterVersion )
@@ -95,9 +92,11 @@ import           Stack.Types.Compiler ( ActualCompiler (..) )
 import           Stack.Types.CompilerPaths ( cabalVersionL )
 import           Stack.Types.Component
-                   ( HasBuildInfo, HasComponentInfo, StackUnqualCompName (..) )
-import           Stack.Types.ComponentUtils ( emptyCompName, toCabalName )
+                   ( HasBuildInfo, HasComponentInfo, HasQualiName, HasName
+                   , StackUnqualCompName (..)
+                   )
 import qualified Stack.Types.Component as Component
+import           Stack.Types.ComponentUtils ( emptyCompName, toCabalName )
 import           Stack.Types.Config ( Config (..), HasConfig (..) )
 import           Stack.Types.Dependency
                    ( DepLibrary (..), DepType (..), DepValue (..)
@@ -131,8 +130,8 @@ --
 -- NOTE: not to be confused with BuildInfo, an Stack-internal datatype.
 readDotBuildinfo :: MonadIO m => Path Abs File -> m HookedBuildInfo
-readDotBuildinfo buildinfofp =
-  liftIO $ readHookedBuildInfo silent (toFilePath buildinfofp)
+readDotBuildinfo =
+  liftIO . readHookedBuildInfo silent Nothing . makeSymbolicPath . toFilePath
 
 -- | Resolve a parsed Cabal file into a t'Package', which contains all of the
 -- info needed for Stack to build the t'Package' given the current
@@ -266,14 +265,20 @@             , componentName
             , cabalVersion
             }
-      let insertInMap name compVal = M.insert name (generate name compVal)
-      let translatedInsertInMap constructor name =
+          insertInMap name compVal = M.insert name (generate name compVal)
+          translatedInsertInMap constructor name =
             insertInMap (constructor name)
-      let makeBuildInfoOpts selector constructor =
-            foldOnNameAndBuildInfo
-              (selector pkg)
-              (translatedInsertInMap constructor)
-      let aggregateAllBuildInfoOpts =
+          makeBuildInfoOpts ::
+               (Foldable t, HasBuildInfo component, HasName component)
+            => (Package -> t component)
+            -> (StackUnqualCompName -> NamedComponent)
+            -> Map NamedComponent BuildInfoOpts
+            -> Map NamedComponent BuildInfoOpts
+          makeBuildInfoOpts selector constructor =
+              foldOnNameAndBuildInfo
+                (selector pkg)
+                (translatedInsertInMap constructor)
+          aggregateAllBuildInfoOpts =
               makeBuildInfoOpts (.library) (const CLib)
             . makeBuildInfoOpts (.subLibraries) CSubLib
             . makeBuildInfoOpts (.executables) CExe
@@ -645,15 +650,6 @@ hasBuildableMainLibrary package =
   maybe False isComponentBuildable package.library
 
--- | Check if the main library has any exposed modules.
---
--- This should become irrelevant at some point since there's nothing inherently
--- wrong or different with packages exposing only modules in internal libraries
--- (for instance).
-mainLibraryHasExposedModules :: Package -> Bool
-mainLibraryHasExposedModules package =
-  maybe False (not . null . (.exposedModules)) package.library
-
 -- | Aggregate all unknown tools from all components. Mostly meant for
 -- build tools specified in the legacy manner (build-tools:) that failed the
 -- hard-coded lookup. See 'Stack.Types.Component.unknownTools' for more
@@ -751,7 +747,11 @@   -> m resT
   -> m resT
 processPackageDeps pkg combineResults fn = do
-  let asPackageNameSet accessor =
+  let
+      asPackageNameSet ::
+           (Package -> CompCollection component)
+        -> Set PackageName
+      asPackageNameSet accessor =
         S.map (mkPackageName . T.unpack) $ getBuildableSetText $ accessor pkg
       (!subLibNames, !foreignLibNames) =
         ( asPackageNameSet (.subLibraries)
@@ -824,6 +824,12 @@ topSortPackageComponent package target includeDirectTarget =
   topProcessPackageComponent package target processor mempty
  where
+  processor ::
+       HasQualiName component
+    => PackageType
+    -> component
+    -> Seq NamedComponent
+    -> Seq NamedComponent
   processor packageType component
     | not includeDirectTarget && packageType == PTProject = id
     | otherwise = \v -> v |> component.qualifiedName
@@ -846,7 +852,14 @@   -> b
   -> b
 topProcessPackageComponent package target fn res = do
-  let initialState = (mempty, res)
+  let
+      initialState :: (Set NamedComponent, b)
+      initialState = (mempty, res)
+      processInitialComponents ::
+           HasComponentInfo component
+        => component
+        -> (Set NamedComponent, b)
+        -> (Set NamedComponent, b)
       processInitialComponents c = case target of
         TargetAll{} -> processComponent PTProject c
         TargetComps targetSet -> if S.member c.qualifiedName targetSet
@@ -854,7 +867,8 @@           else id
   snd $ processPackageComponent package processInitialComponents initialState
  where
-  processComponent :: HasComponentInfo component
+  processComponent ::
+       HasComponentInfo component
     => PackageType
        -- ^ Finally add this component in the seq
     -> component
@@ -879,6 +893,10 @@   lookupLibName isMain name = if isMain
     then package.library
     else collectionLookup name package.subLibraries
+  processOneDep ::
+       Maybe DepValue
+    -> (Set NamedComponent, b)
+    -> (Set NamedComponent, b)
   processOneDep mDependency res' =
     case (.depType) <$> mDependency of
       Just (AsLibrary (DepLibrary mainLibDep subLibDeps)) -> do
src/Stack/PackageDump.hs view
@@ -48,7 +48,7 @@ data PackageDumpException
   = MissingSingleField Text (Map Text [Line])
   | Couldn'tParseField Text [Line]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception PackageDumpException where
   displayException (MissingSingleField name values) = unlines $
@@ -215,12 +215,15 @@       _ -> True
 
 -- | Convert a stream of bytes into a stream of @DumpPackage@s
-conduitDumpPackage :: MonadThrow m
-                   => ConduitM Text DumpPackage m ()
+conduitDumpPackage ::
+     MonadThrow m
+  => ConduitM Text DumpPackage m ()
 conduitDumpPackage = (.| CL.catMaybes) $ eachSection $ do
   pairs <- eachPair (\k -> (k, ) <$> CL.consume) .| CL.consume
   let m = Map.fromList pairs
-  let parseS k =
+
+      parseS :: MonadThrow m => Text -> m Line
+      parseS k =
         case Map.lookup k m of
           Just [v] -> pure v
           _ -> throwM $ MissingSingleField k m
src/Stack/PackageFile.hs view
@@ -20,6 +20,7 @@ import           Distribution.CabalSpecVersion ( CabalSpecVersion )
 import qualified Distribution.PackageDescription as Cabal
 import           Distribution.Simple.Glob ( matchDirFileGlob )
+import           Distribution.Utils.Path ( makeSymbolicPath, getSymbolicPath )
 import           Path ( parent, (</>) )
 import           Path.Extra ( forgivingResolveFile, rejectMissingFile )
 import           Path.IO ( doesFileExist )
@@ -64,8 +65,20 @@   packageExtraFile <- resolveGlobFilesFromStackPackageFile
               pkg.cabalSpec pkg.file
   let initialValue = mempty{packageExtraFile=packageExtraFile}
-  let accumulator f comp st = (insertComponentFile <$> st) <*> f comp
-  let gatherCompFileCollection createCompFileFn getCompFn res =
+      accumulator ::
+           Applicative f
+        => (t -> f (NamedComponent, ComponentFile))
+        -> t
+        -> f PackageComponentFile
+        -> f PackageComponentFile
+      accumulator f comp st = (insertComponentFile <$> st) <*> f comp
+      gatherCompFileCollection ::
+           (Applicative f, Foldable t)
+        => (a -> f (NamedComponent, ComponentFile))
+        -> (Package -> t a)
+        -> f PackageComponentFile
+        -> f PackageComponentFile
+      gatherCompFileCollection createCompFileFn getCompFn res =
         foldr' (accumulator createCompFileFn) res (getCompFn pkg)
   gatherCompFileCollection stackLibraryFiles (.library)
     . gatherCompFileCollection stackLibraryFiles (.subLibraries)
@@ -109,9 +122,9 @@        FilePath
     -> FilePath
     -> RIO GetPackageFileContext [FilePath]
-  matchDirFileGlob' dir glob =
+  matchDirFileGlob' dir glob = map getSymbolicPath <$> do
     catch
-      (liftIO (matchDirFileGlob minBound cabalFileVersion dir glob))
+      (liftIO $ matchDirFileGlob minBound cabalFileVersion (Just $ makeSymbolicPath dir) (makeSymbolicPath glob))
       ( \(e :: IOException) ->
         if isUserError e
           then do
@@ -171,9 +184,9 @@ stackPackageFileFromCabal :: Cabal.PackageDescription -> StackPackageFile
 stackPackageFileFromCabal cabalPkg =
   StackPackageFile
-    (Cabal.extraSrcFiles cabalPkg)
-    (Cabal.dataDir cabalPkg)
-    (Cabal.dataFiles cabalPkg)
+    (map getSymbolicPath $ Cabal.extraSrcFiles cabalPkg)
+    (getSymbolicPath $ Cabal.dataDir cabalPkg)
+    (map getSymbolicPath $ Cabal.dataFiles cabalPkg)
 
 insertComponentFile ::
      PackageComponentFile
src/Stack/Path.hs view
@@ -66,6 +66,7 @@ path keys = do
   let -- filter the chosen paths in flags (keys), or show all of them if no
       -- specific paths chosen.
+      filterKeys :: (String, Text, a) -> Bool
       filterKeys (_, key, _) = null keys || elem key keys
       goodPathsFromRunner = null keys || elem stackRootOptionName' keys
       goodPathsFromConfig = filter filterKeys pathsFromConfig
src/Stack/Prelude.hs view
@@ -273,9 +273,8 @@ -- print a message indicating that "y" or "n" is expected, and ask
 -- again.
 promptBool :: MonadIO m => Text -> m Bool
-promptBool txt = liftIO $ do
-  input <- prompt txt
-  case input of
+promptBool txt = liftIO $
+  prompt txt >>= \case
     "y" -> pure True
     "n" -> pure False
     _ -> do
src/Stack/Query.hs view
@@ -43,7 +43,7 @@   | IndexOutOfRange ![Text]
   | NoNumericSelector ![Text]
   | CannotApplySelector !Value ![Text]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception QueryException where
   displayException (SelectorNotFound sels) =
src/Stack/Runners.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -71,7 +70,7 @@   | DockerAndNixInvalid
   | NixWithinDockerInvalid
   | DockerWithinNixInvalid
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception RunnersException where
   displayException CommandInvalid =
@@ -90,11 +89,9 @@ 
 -- | Ensure that no project settings are used when running 'withConfig'.
 withGlobalProject :: RIO Runner a -> RIO Runner a
-withGlobalProject inner = do
-  oldSYL <- view stackYamlLocL
-  case oldSYL of
-    SYLDefault -> local (set stackYamlLocL SYLGlobalProject) inner
-    _ -> throwIO CommandInvalid
+withGlobalProject inner = view stackYamlLocL >>= \case
+  SYLDefault -> local (set stackYamlLocL SYLGlobalProject) inner
+  _ -> throwIO CommandInvalid
 
 -- | Helper for 'withEnvConfig' which passes in some default arguments:
 --
@@ -154,9 +151,8 @@ reexec inner = do
   nixEnable' <- asks $ (.nix.enable)
   notifyIfNixOnPath <- asks (.notifyIfNixOnPath)
-  when (not nixEnable' && notifyIfNixOnPath) $ do
-    eNix <- findExecutable nixProgName
-    case eNix of
+  when (not nixEnable' && notifyIfNixOnPath) $
+    findExecutable nixProgName >>= \case
       Left _ -> pure ()
       Right nix -> proc nix ["--version"] $ \pc -> do
         let nixProgName' = style Shell (fromString nixProgName)
@@ -179,8 +175,7 @@               <> blankLine
               <> muteMsg
               <> line
-        res <- tryAny (readProcess pc)
-        case res of
+        tryAny (readProcess pc) >>= \case
           Left e -> reportErr (ppException e)
           Right (ec, out, err) -> case ec of
             ExitFailure _ -> reportErr $ string (L8.unpack err)
@@ -225,21 +220,20 @@ -- action.
 withRunnerGlobal :: GlobalOpts -> RIO Runner a -> IO a
 withRunnerGlobal go inner = do
-  colorWhen <-
-    maybe defaultColorWhen pure $
-    getFirst go.configMonoid.colorWhen
-  useColor <- case colorWhen of
-    ColorNever -> pure False
-    ColorAlways -> pure True
-    ColorAuto -> hNowSupportsANSI stderr
-  termWidth <- clipWidth <$> maybe (fromMaybe defaultTerminalWidth
-                                    <$> getTerminalWidth)
-                                   pure go.termWidthOpt
+  useColor <-
+    maybe defaultColorWhen pure (getFirst go.configMonoid.colorWhen) >>= \case
+      ColorNever -> pure False
+      ColorAlways -> pure True
+      ColorAuto -> hNowSupportsANSI stderr
+  termWidth <- clipWidth <$> maybe
+    (fromMaybe defaultTerminalWidth <$> getTerminalWidth)
+    pure
+    go.termWidthOpt
   menv <- mkDefaultProcessContext
   -- MVar used to ensure the Docker entrypoint is performed exactly once.
   dockerEntrypointMVar <- newMVar False
   let update = go.stylesUpdate
-  withNewLogFunc go useColor update $ \logFunc -> do
+  withNewLogFunc go useColor update $ \logFunc ->
     runRIO Runner
       { globalOpts = go
       , useColor = useColor
@@ -263,7 +257,8 @@     let yesterday = addUTCTime (-(24 * 60 * 60)) now
     checks <- upgradeChecksSince yesterday
     when (checks == 0) $ do
-      mversion <- getLatestHackageVersion NoRequireHackageIndex "stack" UsePreferredVersions
+      mversion <-
+        getLatestHackageVersion NoRequireHackageIndex "stack" UsePreferredVersions
       case mversion of
         -- Compare the minor version so we avoid patch-level, Hackage-only releases.
         -- See: https://github.com/commercialhaskell/stack/pull/4729#pullrequestreview-227176315
src/Stack/SDist.hs view
@@ -72,7 +72,6 @@ import           Stack.Runners
                    ( ShouldReexec (..), withConfig, withDefaultEnvConfig )
 import           Stack.SourceMap ( mkProjectPackage )
-import           Stack.Types.Build ( TaskType (..) )
 import           Stack.Types.BuildConfig
                    ( BuildConfig (..), HasBuildConfig (..), configFileL )
 import           Stack.Types.BuildOpts ( BuildOpts (..) )
@@ -89,6 +88,7 @@                    ( LocalPackage (..), Package (..), PackageConfig (..)
                    , packageIdentifier
                    )
+import           Stack.Types.Plan ( TaskType (..) )
 import           Stack.Types.Platform ( HasPlatform (..) )
 import           Stack.Types.PvpBounds ( PvpBounds (..), PvpBoundsType (..) )
 import           Stack.Types.Runner ( HasRunner, Runner )
@@ -112,7 +112,7 @@   = CheckException (NonEmpty Check.PackageCheck)
   | CabalFilePathsInconsistentBug (Path Abs File) (Path Abs File)
   | ToTarPathException String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty SDistPrettyException where
   pretty (CheckException xs) =
@@ -211,9 +211,8 @@   lp <- readLocalPackage pkgDir
   forM_ lp.package.setupDeps $ \customSetupDeps ->
     case nonEmpty (map (T.pack . packageNameString) (Map.keys customSetupDeps)) of
-      Just nonEmptyDepTargets -> do
-        eres <- buildLocalTargets nonEmptyDepTargets
-        case eres of
+      Just nonEmptyDepTargets ->
+        buildLocalTargets nonEmptyDepTargets >>= \case
           Left err ->
             logError $
               "Error: [S-8399]\n" <>
@@ -573,18 +572,7 @@     , flow "for common mistakes using Cabal version"
     , fromString $ versionString cabalVersion <> "."
     ]
-  let pkgChecks =
-        -- MSS 2017-12-12: Try out a few different variants of pkgDesc to try
-        -- and provoke an error or warning. I don't know why, but when using
-        -- `Just pkgDesc`, it appears that Cabal does not detect that `^>=` is
-        -- used with `cabal-version: 1.24` or earlier. It seems like pkgDesc
-        -- (the one we create) does not populate the `buildDepends` field,
-        -- whereas flattenPackageDescription from Cabal does. In any event,
-        -- using `Nothing` seems more logical for this check anyway, and the
-        -- fallback to `Just pkgDesc` is just a crazy sanity check.
-        case Check.checkPackage gpd Nothing of
-          [] -> Check.checkPackage gpd (Just pkgDesc)
-          x -> x
+  let pkgChecks = Check.checkPackage gpd
   fileChecks <-
     liftIO $ Check.checkPackageFiles minBound pkgDesc (toFilePath pkgDir)
   let checks = pkgChecks ++ fileChecks
src/Stack/Script.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -42,7 +41,10 @@                    )
 import           Path.IO ( getModificationTime, resolveFile' )
 import qualified RIO.Directory as Dir
-import           RIO.Process ( exec, proc, readProcessStdout_, withWorkingDir )
+import           RIO.Process
+                   ( HasProcessContext, exec, proc, readProcessStdout_
+                   , withWorkingDir
+                   )
 import qualified RIO.Text as T
 import           Stack.Build ( build )
 import           Stack.Build.Installed ( getInstalled, toInstallMap )
@@ -81,7 +83,7 @@   | NoRunWithoutCompilationInvalid
   | FailedToParseScriptFileAsDirBug (Path Rel File)
   | FailedToParseFileAsDirBug (Path Abs Dir)
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ScriptException where
   displayException (MutableDependenciesForScript names) = unlines
@@ -221,6 +223,11 @@       SEOptimize -> shortCut shouldRun shouldCompile file exe
 
  where
+  runCompiled ::
+       (HasProcessContext env, HasTerm env)
+    => ShouldRun
+    -> Path Abs File
+    -> RIO env ()
   runCompiled shouldRun exe = do
     case shouldRun of
       YesRun -> exec (fromAbsFile exe) opts.args
@@ -425,7 +432,7 @@       -- currently we don't do flag checking here
       checkCond other = Left other
       mlibrary = snd . C.simplifyCondTree checkCond <$> PD.condLibrary gpd
-  pure $ case mlibrary  of
+  pure $ case mlibrary of
     Just lib -> PD.exposedModules lib ++
                 map moduleReexportName (PD.reexportedModules lib)
     Nothing  -> mempty
src/Stack/Setup.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE MultiWayIf            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
@@ -133,8 +131,9 @@                    )
 import           Stack.Types.BuildOptsCLI ( BuildOptsCLI (..) )
 import           Stack.Types.Compiler
-                   ( ActualCompiler (..), CompilerException (..)
-                   , CompilerRepository (..), WhichCompiler (..)
+                   ( ActualCompiler (..), CompilerBindistPath (..)
+                   , CompilerException (..), CompilerRepository (..)
+                   , CompilerTarget (..), WhichCompiler (..)
                    , compilerVersionText, getGhcVersion, isWantedCompiler
                    , wantedToActual, whichCompiler, whichCompilerL
                    )
@@ -192,7 +191,7 @@ data SetupException
   = WorkingDirectoryInvalidBug
   | StackBinaryArchiveZipUnsupportedBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception SetupException where
   displayException WorkingDirectoryInvalidBug = bugReport "[S-2076]"
@@ -253,7 +252,7 @@   | BinaryUpgradeOnOSUnsupported !Cabal.OS
   | BinaryUpgradeOnArchUnsupported !Cabal.Arch
   | ExistingMSYS2NotDeleted !(Path Abs Dir) !IOException
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty SetupPrettyException where
   pretty (GHCInstallFailed ex step cmd args wd tempDir destDir) =
@@ -607,7 +606,7 @@ -- | Type representing exceptions thrown by 'performPathChecking'
 data PerformPathCheckingException
   = ProcessExited ExitCode String [String]
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception PerformPathCheckingException where
   displayException (ProcessExited ec cmd args) = concat
@@ -1052,9 +1051,9 @@           , flow "Valiantly attempting to run anyway, but this is doomed."
           ]
         pure True
-    | ghcVersion >= mkVersion [9, 11] && notifyIfGhcUntested -> do
+    | ghcVersion >= mkVersion [9, 15] && notifyIfGhcUntested -> do
         prettyWarnL
-          [ flow "Stack has not been tested with GHC versions 9.12 and above, \
+          [ flow "Stack has not been tested with GHC versions 9.16 and above, \
                  \and using"
           , fromString (versionString ghcVersion) <> ","
           , flow "this may fail."
@@ -1096,9 +1095,9 @@           , parens (style Shell "nightly-2018-03-13")
           , flow "or later specify such GHC versions."
           ]
-    | cabalVersion >= mkVersion [3, 13] && notifyIfCabalUntested ->
+    | cabalVersion >= mkVersion [3, 17] && notifyIfCabalUntested ->
         prettyWarnL
-          [ flow "Stack has not been tested with Cabal versions 3.14 and \
+          [ flow "Stack has not been tested with Cabal versions 3.18 and \
                  \above, but version"
           , fromString (versionString cabalVersion)
           , flow "was found, this may fail."
@@ -1113,11 +1112,9 @@   -> Memoized SetupInfo
   -> RIO env (Maybe Tool)
 ensureMsys sopts getSetupInfo' = do
-  platform <- view platformL
   localPrograms <- view $ configL . to (.localPrograms)
   installed <- listInstalled localPrograms
-
-  case platform of
+  view platformL >>= \case
     Platform _ Cabal.Windows | not sopts.skipMsys ->
       case getInstalledTool installed (mkPackageName "msys2") (const True) of
         Just tool -> pure (Just tool)
@@ -1372,6 +1369,8 @@          getSetupInfo'
          installed
          config.compilerRepository
+         config.compilerTarget
+         config.compilerBindistPath
          commitId
          flavour
      _ -> installGhcBindist sopts getSetupInfo' installed
@@ -1573,119 +1572,130 @@   => Memoized SetupInfo
   -> [Tool]
   -> CompilerRepository
+  -> CompilerTarget
+     -- ^ The Hadrian build target.
+  -> CompilerBindistPath
+     -- ^ The Hadrian path to the built binary distribution.
   -> Text
      -- ^ Commit ID.
   -> Text
      -- ^ Hadrain flavour.
   -> RIO (WithMSYS env) (Tool, CompilerBuild)
-buildGhcFromSource getSetupInfo' installed (CompilerRepository url) commitId flavour = do
-  config <- view configL
-  let compilerTool = ToolGhcGit commitId flavour
-  -- detect when the correct GHC is already installed
-  if compilerTool `elem` installed
-    then pure (compilerTool, CompilerBuildStandard)
-    else
-      -- clone the repository and execute the given commands
-      withRepo (SimpleRepo url commitId RepoGit) $ do
-        -- withRepo is guaranteed to set workingDirL, so let's get it
-        mcwd <- traverse parseAbsDir =<< view workingDirL
-        cwd <- maybe (throwIO WorkingDirectoryInvalidBug) pure mcwd
-        let threads = config.jobs
-            relFileHadrianStackDotYaml' = toFilePath relFileHadrianStackDotYaml
-            ghcBootScriptPath = cwd </> ghcBootScript
-            boot = if osIsWindows
-              then proc "python3" ["boot"] runProcess_
-              else
-                proc (toFilePath ghcBootScriptPath) [] runProcess_
-            stack args = proc "stack" args'' runProcess_
-             where
-              args'' = "--stack-yaml=" <> relFileHadrianStackDotYaml' : args'
-              -- If a snapshot is specified on the command line, Stack will
-              -- apply it. This allows the snapshot specified in Hadrian's
-              -- stack.yaml file to be overridden.
-              args' = maybe args addSnapshot config.snapshot
-              addSnapshot snapshot = "--snapshot=" <> show snapshot : args
-            happy = stack ["install", "happy"]
-            alex = stack ["install", "alex"]
-            -- Executed in the Stack environment, because GHC is required.
-            configure = stack ("exec" : "--" : ghcConfigure)
-            ghcConfigure
-              | osIsWindows = ghcConfigureWindows
-              | osIsMacOS = ghcConfigureMacOS
-              | otherwise   = ghcConfigurePosix
-            hadrianScripts
-              | osIsWindows = hadrianScriptsWindows
-              | otherwise   = hadrianScriptsPosix
-            hadrianArgs = fmap T.unpack
-              [ "-j" <> tshow threads   -- parallel build
-              , "--flavour=" <> flavour -- selected flavour
-              , "binary-dist"
-              ]
-        foundHadrianPaths <-
-          filterM doesFileExist $ (cwd </>) <$> hadrianScripts
-        hadrianPath <- maybe (prettyThrowIO HadrianScriptNotFound) pure $
-          listToMaybe foundHadrianPaths
-        exists <- doesFileExist ghcBootScriptPath
-        unless exists $ prettyThrowIO GhcBootScriptNotFound
-        ensureConfigureScript cwd
-        logInfo "Running GHC boot script..."
-        boot
-        doesExecutableExist "happy" >>= \case
-          True -> logInfo "happy executable installed on the PATH."
-          False -> do
-            logInfo "Installing happy executable..."
-            happy
-        doesExecutableExist "alex" >>= \case
-          True -> logInfo "alex executable installed on the PATH."
-          False -> do
-            logInfo "Installing alex executable..."
-            alex
-        logInfo "Running GHC configure script..."
-        configure
-        logSticky $
-             "Building GHC from source with `"
-          <> display flavour
-          <> "` flavour. It can take a long time (more than one hour)..."
-        -- We need to provide an absolute path to the script since the process
-        -- package only sets working directory _after_ discovering the
-        -- executable.
-        proc (toFilePath hadrianPath) hadrianArgs runProcess_
+buildGhcFromSource
+    getSetupInfo'
+    installed
+    (CompilerRepository url)
+    (CompilerTarget hadrianBuildTarget)
+    (CompilerBindistPath hadrianBindistPath)
+    commitId
+    flavour
+  = do
+    config <- view configL
+    let compilerTool = ToolGhcGit commitId flavour
+    -- detect when the correct GHC is already installed
+    if compilerTool `elem` installed
+      then pure (compilerTool, CompilerBuildStandard)
+      else
+        -- clone the repository and execute the given commands
+        withRepo (SimpleRepo url commitId RepoGit) $ do
+          -- withRepo is guaranteed to set workingDirL, so let's get it
+          mcwd <- traverse parseAbsDir =<< view workingDirL
+          cwd <- maybe (throwIO WorkingDirectoryInvalidBug) pure mcwd
+          let threads = config.jobs
+              relFileHadrianStackDotYaml' = toFilePath relFileHadrianStackDotYaml
+              ghcBootScriptPath = cwd </> ghcBootScript
+              boot = if osIsWindows
+                then proc "python3" ["boot"] runProcess_
+                else
+                  proc (toFilePath ghcBootScriptPath) [] runProcess_
+              stack args = proc "stack" args'' runProcess_
+               where
+                args'' = "--stack-yaml=" <> relFileHadrianStackDotYaml' : args'
+                -- If a snapshot is specified on the command line, Stack will
+                -- apply it. This allows the snapshot specified in Hadrian's
+                -- stack.yaml file to be overridden.
+                args' = maybe args addSnapshot config.snapshot
+                addSnapshot snapshot = "--snapshot=" <> show snapshot : args
+              happy = stack ["install", "happy"]
+              alex = stack ["install", "alex"]
+              -- Executed in the Stack environment, because GHC is required.
+              configure = stack ("exec" : "--" : ghcConfigure)
+              ghcConfigure
+                | osIsWindows = ghcConfigureWindows
+                | osIsMacOS = ghcConfigureMacOS
+                | otherwise   = ghcConfigurePosix
+              hadrianScripts
+                | osIsWindows = hadrianScriptsWindows
+                | otherwise   = hadrianScriptsPosix
+              hadrianArgs = fmap T.unpack
+                [ "-j" <> tshow threads   -- parallel build
+                , "--flavour=" <> flavour -- selected flavour
+                , hadrianBuildTarget
+                ]
+          foundHadrianPaths <-
+            filterM doesFileExist $ (cwd </>) <$> hadrianScripts
+          hadrianPath <- maybe (prettyThrowIO HadrianScriptNotFound) pure $
+            listToMaybe foundHadrianPaths
+          exists <- doesFileExist ghcBootScriptPath
+          unless exists $ prettyThrowIO GhcBootScriptNotFound
+          ensureConfigureScript cwd
+          logInfo "Running GHC boot script..."
+          boot
+          doesExecutableExist "happy" >>= \case
+            True -> logInfo "happy executable installed on the PATH."
+            False -> do
+              logInfo "Installing happy executable..."
+              happy
+          doesExecutableExist "alex" >>= \case
+            True -> logInfo "alex executable installed on the PATH."
+            False -> do
+              logInfo "Installing alex executable..."
+              alex
+          logInfo "Running GHC configure script..."
+          configure
+          logSticky $
+               "Building GHC from source with `"
+            <> display flavour
+            <> "` flavour. It can take a long time (more than one hour)..."
+          -- We need to provide an absolute path to the script since the process
+          -- package only sets working directory _after_ discovering the
+          -- executable.
+          proc (toFilePath hadrianPath) hadrianArgs runProcess_
 
-        -- find the bindist and install it
-        bindistPath <- parseRelDir "_build/bindist"
-        (_,files) <- listDir (cwd </> bindistPath)
-        let isBindist p = do
-              extension <- fileExtension (filename p)
+          -- find the bindist and install it
+          bindistPath <- parseRelDir (T.unpack hadrianBindistPath)
+          (_,files) <- listDir (cwd </> bindistPath)
+          let isBindist p = do
+                extension <- fileExtension (filename p)
 
-              pure $
-                   "ghc-" `isPrefixOf` toFilePath (filename p)
-                && extension == ".xz"
+                pure $
+                     "ghc-" `isPrefixOf` toFilePath (filename p)
+                  && extension == ".xz"
 
-        mbindist <- filterM isBindist files
-        case mbindist of
-          [bindist] -> do
-            let bindist' = T.pack (toFilePath bindist)
-                dlinfo = DownloadInfo
-                  { url = bindist'
-                    -- we can specify a filepath instead of a URL
-                  , contentLength = Nothing
-                  , sha1 = Nothing
-                  , sha256 = Nothing
-                  }
-                ghcdlinfo = GHCDownloadInfo mempty mempty dlinfo
-                installer
-                   | osIsWindows = installGHCWindows
-                   | otherwise   = installGHCPosix ghcdlinfo
-            si <- runMemoized getSetupInfo'
-            _ <- downloadAndInstallTool
-              config.localPrograms
-              dlinfo
-              compilerTool
-              (installer si)
-            pure (compilerTool, CompilerBuildStandard)
-          _ -> do
-            forM_ files (logDebug . fromString . (" - " ++) . toFilePath)
-            prettyThrowIO HadrianBindistNotFound
+          filterM isBindist files >>= \case
+            [bindist] -> do
+              let bindist' = T.pack (toFilePath bindist)
+                  dlinfo = DownloadInfo
+                    { url = bindist'
+                      -- we can specify a filepath instead of a URL
+                    , contentLength = Nothing
+                    , sha1 = Nothing
+                    , sha256 = Nothing
+                    }
+                  ghcdlinfo = GHCDownloadInfo mempty mempty dlinfo
+                  installer
+                     | osIsWindows = installGHCWindows
+                     | otherwise   = installGHCPosix ghcdlinfo
+              si <- runMemoized getSetupInfo'
+              _ <- downloadAndInstallTool
+                config.localPrograms
+                dlinfo
+                compilerTool
+                (installer si)
+              pure (compilerTool, CompilerBuildStandard)
+            _ -> do
+              forM_ files (logDebug . fromString . (" - " ++) . toFilePath)
+              prettyThrowIO HadrianBindistNotFound
 
 -- | Determine which GHC builds to use depending on which shared libraries are
 -- available on the system.
@@ -1722,8 +1732,7 @@     -- Of course, could also try to make a static GHC bindist instead of all
     -- this rigamarole.
 
-    platform <- view platformL
-    case platform of
+    view platformL >>= \case
       Platform _ Cabal.Linux -> do
         -- Some systems don't have ldconfig in the PATH, so make sure to look in
         -- /sbin and /usr/sbin as well
@@ -1759,8 +1768,7 @@               libD = fromString (toFilePath lib)
               libT = T.pack (toFilePath lib)
             hasMatches lib dirs = do
-              matches <- filterM (doesFileExist . (</> lib)) dirs
-              case matches of
+              filterM (doesFileExist . (</> lib)) dirs >>= \case
                 [] ->
                      logDebug
                        (  "Did not find shared library "
@@ -1777,15 +1785,12 @@                   >> pure True
              where
               libD = fromString (toFilePath lib)
-            getLibc6Version = do
-              elddOut <-
-                -- On Alpine Linux, 'ldd --version' will send output to stderr,
-                -- which we wish to smother.
-                proc "ldd" ["--version"] $ tryAny . readProcess_
-              pure $ case elddOut of
+            getLibc6Version =
+              -- On Alpine Linux, 'ldd --version' will send output to stderr,
+              -- which we wish to smother.
+              proc "ldd" ["--version"] (tryAny . readProcess_) <&> \case
                 Right (lddOut, _) ->
-                  let lddOut' =
-                        decodeUtf8Lenient (LBS.toStrict lddOut)
+                  let lddOut' = decodeUtf8Lenient (LBS.toStrict lddOut)
                   in  case P.parse lddVersion lddOut' of
                         P.Done _ result -> Just result
                         _ -> Nothing
@@ -2138,11 +2143,10 @@   -> RIO env Text
 getGhcKey ghcBuild = do
   ghcVariant <- view ghcVariantL
-  wantedComiler <- view $ buildConfigL . to (.smWanted.compiler)
-  ghcVersion <- case wantedComiler of
-        WCGhc version -> pure version
-        WCGhcjs _ _ ->  throwIO GhcjsNotSupported
-        WCGhcGit _ _ -> throwIO DownloadAndInstallCompilerError
+  ghcVersion <- view (buildConfigL . to (.smWanted.compiler)) >>= \case
+    WCGhc version -> pure version
+    WCGhcjs _ _ ->  throwIO GhcjsNotSupported
+    WCGhcGit _ _ -> throwIO DownloadAndInstallCompilerError
   let variantSuffix = ghcVariantSuffix ghcVariant
       buildSuffix = compilerBuildSuffix ghcBuild
       ghcDir = style Dir $ mconcat
@@ -2162,10 +2166,8 @@   -> StyleDoc
      -- ^ Description of the root directory of the tool.
   -> RIO env Text
-getOSKey tool toolDir = do
-  programsDir <- view $ configL . to (.localPrograms)
-  platform <- view platformL
-  case platform of
+getOSKey tool toolDir =
+  view platformL >>= \case
     Platform I386                  Cabal.Linux   -> pure "linux32"
     Platform X86_64                Cabal.Linux   -> pure "linux64"
     Platform I386                  Cabal.OSX     -> pure "macosx"
@@ -2181,7 +2183,8 @@     Platform Sparc                 Cabal.Linux   -> pure "linux-sparc"
     Platform AArch64               Cabal.OSX     -> pure "macosx-aarch64"
     Platform AArch64               Cabal.FreeBSD -> pure "freebsd-aarch64"
-    Platform arch os ->
+    Platform arch os -> do
+      programsDir <- view $ configL . to (.localPrograms)
       prettyThrowM $ UnsupportedSetupCombo os arch tool toolDir programsDir
 
 downloadOrUseLocal ::
@@ -2376,9 +2379,8 @@ 
 instance Alternative (CheckDependency env) where
   empty = CheckDependency $ pure $ Left []
-  CheckDependency x <|> CheckDependency y = CheckDependency $ do
-    res1 <- x
-    case res1 of
+  CheckDependency x <|> CheckDependency y = CheckDependency $
+    x >>= \case
       Left _ -> y
       Right x' -> pure $ Right x'
 
@@ -2488,9 +2490,8 @@   => Path Abs File
   -> Path Abs Dir
   -> m (Path Abs Dir)
-expectSingleUnpackedDir archiveFile unpackDir = do
-  contents <- listDir unpackDir
-  case contents of
+expectSingleUnpackedDir archiveFile unpackDir =
+  listDir unpackDir >>= \case
     ([dir], _ ) -> pure dir
     _ -> prettyThrowIO $ UnknownArchiveStructure archiveFile
 
@@ -2956,9 +2957,7 @@       , pretty currExeFile <> "."
       ]
     tmpFile <- toFilePath <$> addExtension ".tmp" currExeFile
-    eres <- tryIO $
-      relocateStackExeFile currExeFile newExeFile currExeFile
-    case eres of
+    tryIO (relocateStackExeFile currExeFile newExeFile currExeFile) >>= \case
       Right () -> prettyInfoS "Stack executable copied successfully!"
       Left e
         | isPermissionError e -> if osIsWindows
src/Stack/Setup/Installed.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
-{-# LANGUAGE LambdaCase          #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 {-# LANGUAGE ViewPatterns        #-}
src/Stack/SetupCmd.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
src/Stack/Storage/Project.hs view
@@ -1,7 +1,4 @@ {-# LANGUAGE NoImplicitPrelude    #-}
-{-# LANGUAGE DataKinds            #-}
-{-# LANGUAGE DerivingStrategies   #-}
-{-# LANGUAGE GADTs                #-}
 {-# LANGUAGE OverloadedRecordDot  #-}
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE QuasiQuotes          #-}
@@ -12,10 +9,10 @@ 
 {-|
 Module      : Stack.Storage.Project
-Description : Work with SQLite DB for caches across a project.
+Description : Work with the SQLite database for a project's caches.
 License     : BSD-3-Clause
 
-Work with SQLite database used for caches across a single project.
+Work with the SQLite database used for a project's caches.
 -}
 
 module Stack.Storage.Project
@@ -40,20 +37,39 @@                    , sqlSettings
                    )
 import           Pantry.SQLite ( initStorage, withStorage_ )
+import           Stack.ConfigureOpts ( configureOptsFromDb )
 import           Stack.Prelude
 import           Stack.Storage.Util
                    ( handleMigrationException, listUpdateDiff, setUpdateDiff
                    , updateCollection
                    )
-import           Stack.Types.Build ( CachePkgSrc, ConfigCache (..) )
 import           Stack.Types.BuildConfig
                    ( BuildConfig (..), HasBuildConfig (..) )
-import           Stack.Types.Cache ( ConfigCacheType )
-import           Stack.Types.ConfigureOpts
-                   ( ConfigureOpts (..), configureOptsFromDb )
+import           Stack.Types.Cache
+                   ( CachePkgSrc, ConfigCache (..), ConfigCacheType )
+import           Stack.Types.ConfigureOpts ( ConfigureOpts (..) )
 import           Stack.Types.GhcPkgId ( GhcPkgId )
 import           Stack.Types.Storage ( ProjectStorage (..) )
 
+-- Uses the Persistent entity syntax to generate entities for five tables in a
+-- SQLite database:
+--
+-- config_cache
+-- config_cache_dir_option
+-- config_cache_no_dir_option
+-- config_cache_dep
+-- config_cache_component
+--
+-- The ID column for each table is automatically generated.
+--
+-- The other tables have a foreign key referring to the config_cache table, via:
+--
+--   parent ConfigCacheParentId sql="config_cache_id" OnDeleteCascade
+--
+-- The tables have UNIQUE constraints on multiple columns.
+--
+-- Creates a function migrateAll to perform all migrations for the generated
+-- entities.
 share [ mkPersist sqlSettings
       , mkMigrate "migrateAll"
       ]
@@ -95,11 +111,14 @@   deriving Show
 |]
 
--- | Initialize the database.
+-- | Initialize the project database for caches.
 initProjectStorage ::
      HasLogFunc env
-  => Path Abs File -- ^ storage file
+  => Path Abs File
+     -- ^ The storage file.
   -> (ProjectStorage -> RIO env a)
+     -- ^ Action, given a SQL database connection to the project database for
+     -- caches.
   -> RIO env a
 initProjectStorage fp f = handleMigrationException $
   initStorage "Stack" migrateAll fp $ f . ProjectStorage
@@ -113,11 +132,19 @@   storage <- view (buildConfigL . to (.projectStorage.projectStorage))
   withStorage_ storage inner
 
--- | Key used to retrieve configuration or flag cache
+-- | Type synonym representing keys used to retrieve a record from the Cabal
+-- configuration cache or the library or executable Cabal flag cache.
 type ConfigCacheKey = Unique ConfigCacheParent
 
--- | Build key used to retrieve configuration or flag cache
-configCacheKey :: Path Abs Dir -> ConfigCacheType -> ConfigCacheKey
+-- | For the given directory and type of cache, yields the key used to retrieve
+-- a record from the Cabal configuration cache or the library or executable
+-- Cabal flag cache.
+configCacheKey ::
+     Path Abs Dir
+     -- ^ Directory.
+  -> ConfigCacheType
+     -- ^ Type of cache.
+  -> ConfigCacheKey
 configCacheKey dir = UniqueConfigCacheParent (toFilePath dir)
 
 -- | Internal helper to read the t'ConfigCache'
@@ -153,22 +180,21 @@     , pathEnvVar
     }
 
--- | Load t'ConfigCache' from the database.
+-- | Load a t'ConfigCache' value from the project database for caches.
 loadConfigCache ::
      (HasBuildConfig env, HasLogFunc env)
   => ConfigCacheKey
   -> RIO env (Maybe ConfigCache)
 loadConfigCache key =
-  withProjectStorage $ do
-    mparent <- getBy key
-    case mparent of
+  withProjectStorage $
+    getBy key >>= \case
       Nothing -> pure Nothing
       Just parentEntity@(Entity _ configCacheParent)
         |  configCacheParent.configCacheParentActive ->
             Just <$> readConfigCache parentEntity
         | otherwise -> pure Nothing
 
--- | Insert or update t'ConfigCache' to the database.
+-- | Insert or update a t'ConfigCache' value to the project database for caches.
 saveConfigCache ::
      (HasBuildConfig env, HasLogFunc env)
   => ConfigCacheKey
@@ -176,9 +202,7 @@   -> RIO env ()
 saveConfigCache key@(UniqueConfigCacheParent dir type_) new =
   withProjectStorage $ do
-    mparent <- getBy key
-    (parentId, mold) <-
-      case mparent of
+    (parentId, mold) <- getBy key >>= \case
         Nothing ->
           (, Nothing) <$>
           insert
src/Stack/Storage/User.hs view
@@ -1,8 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
-{-# LANGUAGE DerivingStrategies    #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
 {-# LANGUAGE QuasiQuotes           #-}
@@ -53,9 +50,9 @@ import           Path.IO ( resolveFile', resolveDir' )
 import qualified RIO.FilePath as FP
 import           Stack.Prelude
-import           Stack.Storage.Util ( handleMigrationException, updateCollection, setUpdateDiff )
-import           Stack.Types.Build ( PrecompiledCache (..) )
-import           Stack.Types.Cache ( Action (..) )
+import           Stack.Storage.Util
+                   ( handleMigrationException, setUpdateDiff, updateCollection )
+import           Stack.Types.Cache ( Action (..), PrecompiledCache (..) )
 import           Stack.Types.Compiler ( ActualCompiler, compilerVersionText )
 import           Stack.Types.CompilerBuild ( CompilerBuild )
 import           Stack.Types.CompilerPaths
@@ -73,7 +70,7 @@   | GlobalPackageCacheFileMetadataMismatch
   | GlobalDumpParseFailure
   | CompilerCacheArchitectureInvalid Text
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception StorageUserException where
   displayException CompilerFileMetadataMismatch =
@@ -249,25 +246,23 @@   new
   = withUserStorage $ do
       let precompiledCacheParentLibrary = fmap toFilePath new.library
-      mIdOld <- readPrecompiledCache key
-      (parentId, mold) <-
-        case mIdOld of
-          Nothing -> (, Nothing) <$> insert PrecompiledCacheParent
-            { precompiledCacheParentPlatformGhcDir
-            , precompiledCacheParentCompiler
-            , precompiledCacheParentCabalVersion
-            , precompiledCacheParentPackageKey
-            , precompiledCacheParentOptionsHash
-            , precompiledCacheParentHaddock
-            , precompiledCacheParentLibrary
-            }
-          Just (parentId, old) -> do
-            update
-              parentId
-              [ PrecompiledCacheParentLibrary =.
-                precompiledCacheParentLibrary
-              ]
-            pure (parentId, Just old)
+      (parentId, mold) <- readPrecompiledCache key >>= \case
+        Nothing -> (, Nothing) <$> insert PrecompiledCacheParent
+          { precompiledCacheParentPlatformGhcDir
+          , precompiledCacheParentCompiler
+          , precompiledCacheParentCabalVersion
+          , precompiledCacheParentPackageKey
+          , precompiledCacheParentOptionsHash
+          , precompiledCacheParentHaddock
+          , precompiledCacheParentLibrary
+          }
+        Just (parentId, old) -> do
+          update
+            parentId
+            [ PrecompiledCacheParentLibrary =.
+              precompiledCacheParentLibrary
+            ]
+          pure (parentId, Just old)
       updateCollection
         (setUpdateDiff PrecompiledCacheSubLibValue)
         (PrecompiledCacheSubLib parentId)
src/Stack/Storage/Util.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE TypeFamilies          #-}
 
 {-|
@@ -38,10 +37,16 @@      , Foldable collection
      )
   => (collection rawValue -> collection rawValue -> ([Filter record], [value]))
+     -- ^ Function to yield items in old not in new, to delete, and values in
+     -- new not in old, to add, from the old and new collections of values.
   -> (value -> record)
+     -- ^ Function to yield new records from values in new not in old.
   -> [Filter record]
+     -- ^ Extra items to delete, if there are other items to delete.
   -> collection rawValue
+     -- ^ The old collection of values.
   -> collection rawValue
+     -- ^ The new collection of values.
   -> ReaderT backend m ()
 updateCollection fnDiffer recordCons extra old new =
   when (old /= new) $ do
src/Stack/Templates.hs view
@@ -29,7 +29,6 @@ data TemplatesPrettyException
   = DownloadTemplatesHelpFailed !HttpException
   | TemplatesHelpEncodingInvalid !String !UnicodeException
-  deriving Typeable
 
 deriving instance Show TemplatesPrettyException
 
src/Stack/Types/Build.hs view
@@ -1,9 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
-{-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE NoFieldSelectors      #-}
-{-# LANGUAGE OverloadedRecordDot   #-}
-{-# LANGUAGE OverloadedStrings     #-}
 
 {-|
 Module      : Stack.Types.Build
@@ -14,250 +9,13 @@ -}
 
 module Stack.Types.Build
-  ( InstallLocation (..)
-  , Installed (..)
-  , psVersion
-  , Task (..)
-  , taskAnyMissing
-  , taskIsTarget
-  , taskLocation
-  , taskProvides
-  , taskTargetIsMutable
-  , taskTypeLocation
-  , taskTypePackageIdentifier
-  , LocalPackage (..)
-  , Plan (..)
-  , TestOpts (..)
-  , BenchmarkOpts (..)
-  , FileWatchOpts (..)
-  , BuildOpts (..)
-  , BuildSubset (..)
-  , defaultBuildOpts
-  , TaskType (..)
-  , installLocationIsMutable
-  , TaskConfigOpts (..)
-  , BuildCache (..)
-  , ConfigCache (..)
-  , configureOpts
-  , CachePkgSrc (..)
-  , toCachePkgSrc
-  , FileCacheInfo (..)
-  , PrecompiledCache (..)
-  , ExcludeTHLoading (..)
+  ( ExcludeTHLoading (..)
   , ConvertPathsToAbsolute (..)
   , KeepOutputOpen (..)
   ) where
 
-import           Data.Aeson ( ToJSON, FromJSON )
-import qualified Data.ByteString as S
-import           Data.List as L
-import qualified Data.Text as T
-import           Database.Persist.Sql
-                   ( PersistField (..), PersistFieldSql (..)
-                   , PersistValue (PersistText), SqlType (SqlString)
-                   )
-import           Path ( parent )
-import qualified RIO.Set as Set
-import           Stack.BuildOpts ( defaultBuildOpts )
 import           Stack.Prelude
-import           Stack.Types.BuildOpts
-                   ( BenchmarkOpts (..), BuildOpts (..), TestOpts (..) )
-import           Stack.Types.BuildOptsCLI
-                   ( BuildSubset (..), FileWatchOpts (..) )
-import           Stack.Types.ComponentUtils ( StackUnqualCompName )
-import           Stack.Types.ConfigureOpts
-                   ( BaseConfigOpts, ConfigureOpts, PackageConfigureOpts
-                   , configureOpts
-                   )
-import           Stack.Types.GhcPkgId ( GhcPkgId )
-import           Stack.Types.IsMutable ( IsMutable (..) )
-import           Stack.Types.Package
-                   ( FileCacheInfo (..), InstallLocation (..), Installed (..)
-                   , LocalPackage (..), Package (..), PackageSource (..)
-                   , packageIdentifier, psVersion
-                   )
-import           Stack.Types.EnvConfig ( EnvConfig )
 
--- | Package dependency oracle.
-newtype PkgDepsOracle
-  = PkgDeps PackageName
-  deriving (Eq, NFData, Show, Typeable)
-
--- | Stored on disk to know whether the files have changed.
-newtype BuildCache = BuildCache
-  { times :: Map FilePath FileCacheInfo
-    -- ^ Modification times of files.
-  }
-  deriving (Eq, FromJSON, Generic, Show, ToJSON, Typeable)
-
-instance NFData BuildCache
-
--- | Stored on disk to know whether the flags have changed.
-data ConfigCache = ConfigCache
-  { configureOpts :: !ConfigureOpts
-    -- ^ All Cabal configure options used for this package.
-  , deps :: !(Set GhcPkgId)
-    -- ^ The GhcPkgIds of all of the dependencies. Since Cabal doesn't take
-    -- the complete GhcPkgId (only a PackageIdentifier) in the configure
-    -- options, just using the previous value is insufficient to know if
-    -- dependencies have changed.
-  , components :: !(Set S.ByteString)
-    -- ^ The components to be built. It's a bit of a hack to include this in
-    -- here, as it's not a configure option (just a build option), but this
-    -- is a convenient way to force compilation when the components change.
-  , buildHaddocks :: !Bool
-    -- ^ Are haddocks to be built?
-  , pkgSrc :: !CachePkgSrc
-  , pathEnvVar :: !Text
-  -- ^ Value of the PATH env var, see
-  -- <https://github.com/commercialhaskell/stack/issues/3138>
-  }
-  deriving (Data, Eq, Generic, Show, Typeable)
-
-instance NFData ConfigCache
-
-data CachePkgSrc
-  = CacheSrcUpstream
-  | CacheSrcLocal FilePath
-  deriving (Data, Eq, Generic, Read, Show, Typeable)
-
-instance NFData CachePkgSrc
-
-instance PersistField CachePkgSrc where
-  toPersistValue CacheSrcUpstream = PersistText "upstream"
-  toPersistValue (CacheSrcLocal fp) = PersistText ("local:" <> T.pack fp)
-  fromPersistValue (PersistText t) =
-    if t == "upstream"
-      then Right CacheSrcUpstream
-      else case T.stripPrefix "local:" t of
-        Just fp -> Right $ CacheSrcLocal (T.unpack fp)
-        Nothing -> Left $ "Unexpected CachePkgSrc value: " <> t
-  fromPersistValue _ = Left "Unexpected CachePkgSrc type"
-
-instance PersistFieldSql CachePkgSrc where
-  sqlType _ = SqlString
-
-toCachePkgSrc :: PackageSource -> CachePkgSrc
-toCachePkgSrc (PSFilePath lp) =
-  CacheSrcLocal (toFilePath (parent lp.cabalFP))
-toCachePkgSrc PSRemote{} = CacheSrcUpstream
-
--- | A type representing tasks to perform when building.
-data Task = Task
-  { taskType        :: !TaskType
-    -- ^ The task type, telling us how to build this
-  , configOpts      :: !TaskConfigOpts
-    -- ^ A set of the package identifiers of dependencies for which 'GhcPkgId'
-    -- are missing and a function which yields configure options, given a
-    -- dictionary of those identifiers and their 'GhcPkgId'.
-  , buildHaddocks   :: !Bool
-  , present         :: !(Map PackageIdentifier GhcPkgId)
-    -- ^ A dictionary of the package identifiers of already-installed
-    -- dependencies, and their 'GhcPkgId'.
-  , allInOne        :: !Bool
-    -- ^ indicates that the package can be built in one step
-  , cachePkgSrc     :: !CachePkgSrc
-  , buildTypeConfig :: !Bool
-    -- ^ Is the build type of this package Configure. Check out
-    -- ensureConfigureScript in Stack.Build.Execute for the motivation
-  }
-  deriving Show
-
--- | Given the IDs of any missing packages, produce the configure options
-data TaskConfigOpts = TaskConfigOpts
-  { missing :: !(Set PackageIdentifier)
-    -- ^ Dependencies for which we don't yet have a 'GhcPkgId'
-  , envConfig :: !EnvConfig
-  , baseConfigOpts :: !BaseConfigOpts
-  , isLocalNonExtraDep :: !Bool
-  , isMutable :: !IsMutable
-  , pkgConfigOpts :: PackageConfigureOpts
-  }
-
-instance Show TaskConfigOpts where
-  show tco = "Missing: " ++ show tco.missing
-
--- | Type representing different types of task, depending on what is to be
--- built.
-data TaskType
-  = TTLocalMutable LocalPackage
-    -- ^ Building local source code.
-  | TTRemotePackage IsMutable Package PackageLocationImmutable
-    -- ^ Building something from the package index (upstream).
-  deriving Show
-
--- | Were any of the dependencies missing?
-
-taskAnyMissing :: Task -> Bool
-taskAnyMissing task = not $ Set.null task.configOpts.missing
-
--- | A function to yield the package name and version of a given 'TaskType'
--- value.
-taskTypePackageIdentifier :: TaskType -> PackageIdentifier
-taskTypePackageIdentifier (TTLocalMutable lp) = packageIdentifier lp.package
-taskTypePackageIdentifier (TTRemotePackage _ p _) = packageIdentifier p
-
-taskIsTarget :: Task -> Bool
-taskIsTarget t =
-  case t.taskType of
-    TTLocalMutable lp -> lp.wanted
-    _ -> False
-
--- | A function to yield the relevant database (write-only or mutable) of a
--- given 'TaskType' value.
-taskTypeLocation :: TaskType -> InstallLocation
-taskTypeLocation (TTLocalMutable _) = Local
-taskTypeLocation (TTRemotePackage Mutable _ _) = Local
-taskTypeLocation (TTRemotePackage Immutable _ _) = Snap
-
--- | A function to yield the relevant database (write-only or mutable) of the
--- given task.
-taskLocation :: Task -> InstallLocation
-taskLocation = taskTypeLocation . (.taskType)
-
--- | A function to yield the package name and version to be built by the given
--- task.
-taskProvides :: Task -> PackageIdentifier
-taskProvides = taskTypePackageIdentifier . (.taskType)
-
-taskTargetIsMutable :: Task -> IsMutable
-taskTargetIsMutable task =
-  case task.taskType of
-    TTLocalMutable _ -> Mutable
-    TTRemotePackage mutable _ _ -> mutable
-
-installLocationIsMutable :: InstallLocation -> IsMutable
-installLocationIsMutable Snap = Immutable
-installLocationIsMutable Local = Mutable
-
--- | A complete plan of what needs to be built and how to do it
-data Plan = Plan
-  { tasks :: !(Map PackageName Task)
-  , finals :: !(Map PackageName Task)
-    -- ^ Final actions to be taken (test, benchmark, etc)
-  , unregisterLocal :: !(Map GhcPkgId (PackageIdentifier, Text))
-    -- ^ Text is reason we're unregistering, for display only
-  , installExes :: !(Map StackUnqualCompName InstallLocation)
-    -- ^ Executables that should be installed after successful building
-  }
-  deriving Show
-
--- | Information on a compiled package: the library .conf file (if relevant),
--- the sub-libraries (if present) and all of the executable paths.
-data PrecompiledCache base = PrecompiledCache
-  { library :: !(Maybe (Path base File))
-    -- ^ .conf file inside the package database
-  , subLibs :: ![Path base File]
-    -- ^ .conf file inside the package database, for each of the sub-libraries
-  , exes    :: ![Path base File]
-    -- ^ Full paths to executables
-  }
-  deriving (Eq, Generic, Show, Typeable)
-
-instance NFData (PrecompiledCache Abs)
-
-instance NFData (PrecompiledCache Rel)
-
 -- | Type representing treatments of GHC's informational messages during
 -- compilation when it evaluates Template Haskell code.
 data ExcludeTHLoading
@@ -270,8 +28,8 @@   = ConvertPathsToAbsolute
   | KeepPathsAsIs
 
--- | special marker for expected failures in curator builds, using those we need
--- to keep log handle open as build continues further even after a failure
+-- | Special marker for expected failures in curator builds, using those we need
+-- to keep log handle open as build continues further even after a failure.
 data KeepOutputOpen
   = KeepOpen
   | CloseOnException
src/Stack/Types/Build/ConstructPlan.hs view
@@ -32,8 +32,6 @@ import           RIO.Writer ( WriterT (..) )
 import           Stack.Package ( hasBuildableMainLibrary )
 import           Stack.Prelude hiding ( loadPackage )
-import           Stack.Types.Build
-                    ( Task (..), TaskType (..), taskProvides )
 import           Stack.Types.Build.Exception ( ConstructPlanException )
 import           Stack.Types.BuildConfig
                    ( BuildConfig (..), HasBuildConfig(..) )
@@ -55,6 +53,8 @@                    , PackageSource (..)
                    )
 import           Stack.Types.ParentMap ( ParentMap )
+import           Stack.Types.Plan
+                    ( Task (..), TaskType (..), taskProvides )
 import           Stack.Types.Platform ( HasPlatform (..) )
 import           Stack.Types.Runner ( HasRunner (..) )
 
@@ -158,7 +158,7 @@   , presentPackages :: !(Map PackageIdentifier GhcPkgId)
   , isMutable :: !IsMutable
   }
-  deriving (Show)
+  deriving Show
 
 instance Semigroup MissingPresentDeps where
   (<>) a b = MissingPresentDeps
src/Stack/Types/Build/Exception.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE OverloadedStrings   #-}
 
@@ -83,7 +82,7 @@   | HaddockIndexNotFound
   | ShowBuildErrorBug
   | CallStackEmptyBug
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception BuildException where
   displayException (Couldn'tFindPkgId name) = bugReport "[S-7178]" $ concat
@@ -267,7 +266,7 @@       WantedCompilerSetter -- Way that the wanted compiler is set
       StyleDoc -- recommended resolution
   | ActionNotFilteredBug StyleDoc
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty BuildPrettyException where
   pretty ( ConstructPlanFailed errs configFile stackRoot isImplicitGlobal parents wanted prunedGlobalDeps ) =
@@ -700,12 +699,13 @@         pkgName' = style Current (fromPackageName pkg.name)
         pkgIdent = style Current (fromPackageId $ packageIdentifier pkg)
   -- Skip these when they are redundant with 'NotInBuildPlan' info.
-  pprintException (UnknownPackage name)
+  pprintException (UnknownPackage compiler name)
     | name `Set.member` allNotInBuildPlan = Nothing
-    | name `Set.member` wiredInPackages = Just $ fillSep
-        [ flow "Can't build a package with same name as a wired-in-package:"
-        , style Current . fromPackageName $ name
-        ]
+    | name `Set.member` wiredInPackages compiler =
+        Just $ fillSep
+          [ flow "Can't build a package with same name as a wired-in-package:"
+          , style Current . fromPackageName $ name
+          ]
     | Just pruned <- Map.lookup name prunedGlobalDeps =
         let prunedDeps =
               map (style Current . fromPackageName) pruned
@@ -814,10 +814,11 @@   | DependencyPlanFailures
       Package
       (Map PackageName (VersionRange, LatestApplicableVersion, BadDependency))
-  | UnknownPackage PackageName -- TODO perhaps this constructor will be removed,
-                               -- and BadDependency will handle it all
+  | UnknownPackage ActualCompiler PackageName
+    -- TODO perhaps this constructor will be removed, and BadDependency will
+    -- handle it all
   -- ^ Recommend adding to extra-deps, give a helpful version number?
-  deriving (Eq, Show, Typeable)
+  deriving (Eq, Show)
 
 -- | The latest applicable version and it's latest Cabal file revision.
 -- For display purposes only, Nothing if package not found
@@ -831,7 +832,7 @@   | HasNoLibrary
   -- ^ See description of 'Stack.Types.Dependency.DepType'
   | BDDependencyCycleDetected ![PackageName]
-  deriving (Eq, Ord, Show, Typeable)
+  deriving (Eq, Ord, Show)
 
 missingExeError :: String -> Bool -> String -> String
 missingExeError errorCode isSimpleBuildType msg = unlines
src/Stack/Types/BuildConfig.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
-{-# LANGUAGE GADTs               #-}
 {-# LANGUAGE NoFieldSelectors    #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 {-# LANGUAGE TypeFamilies        #-}
src/Stack/Types/BuildOptsCLI.hs view
@@ -97,23 +97,27 @@   | Install
   deriving (Eq, Show)
 
--- | Generate a list of --PROG-option="<argument>" arguments for all PROGs.
+-- | Generate a list of @--PROG-option=<argument>@ arguments for all PROGs.
+
+-- At the command line, --PROG-option="<argument>" is received as
+-- --PROG-option=<argument> (without quotes). However, with the process library,
+-- what is received is --PROG-option="<argument>" (with quotes), which is NOT
+-- what is required.
 boptsCLIAllProgOptions :: BuildOptsCLI -> [Text]
 boptsCLIAllProgOptions boptsCLI =
   concatMap progOptionArgs boptsCLI.progsOptions
  where
-  -- Generate a list of --PROG-option="<argument>" arguments for a PROG.
+  -- Generate a list of --PROG-option=<argument> arguments for a PROG.
   progOptionArgs :: (Text, [Text]) -> [Text]
   progOptionArgs (prog, opts) = map progOptionArg opts
    where
-    -- Generate a --PROG-option="<argument>" argument for a PROG and option.
+    -- Generate a --PROG-option=<argument> argument for a PROG and option.
     progOptionArg :: Text -> Text
     progOptionArg opt = T.concat
       [ "--"
       , prog
-      , "-option=\""
+      , "-option="
       , opt
-      , "\""
       ]
 
 -- | Only flags set via 'ACFByName'
src/Stack/Types/Cache.hs view
@@ -1,5 +1,6 @@-{-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE NoImplicitPrelude   #-}
+{-# LANGUAGE OverloadedRecordDot #-}
+{-# LANGUAGE OverloadedStrings   #-}
 
 {-|
 Module      : Stack.Types.Cache
@@ -7,24 +8,38 @@ -}
 
 module Stack.Types.Cache
-  ( ConfigCacheType (..)
+  ( FileCache
+  , BuildFileCache (..)
+  , FileCacheInfo (..)
+  , ConfigCache (..)
+  , CachePkgSrc (..)
+  , PrecompiledCache (..)
+  , ConfigCacheType (..)
   , Action (..)
   ) where
 
+import           Data.Aeson
+                   ( ToJSON (..), FromJSON (..), (.=), (.:), object, withObject
+                   )
+import qualified Data.ByteString as S
 import qualified Data.Text as T
 import           Database.Persist.Sql
                    ( PersistField (..), PersistFieldSql (..), PersistValue (..)
                    , SqlType (..)
                    )
 import           Stack.Prelude
+import           Stack.Types.ConfigureOpts ( ConfigureOpts )
 import           Stack.Types.GhcPkgId
                    ( GhcPkgId, ghcPkgIdToText, parseGhcPkgId )
 
--- | Type of config cache
+-- | Type representing types of cache in the Stack project SQLite database.
 data ConfigCacheType
   = ConfigCacheTypeConfig
+    -- ^ Cabal configuration cache.
   | ConfigCacheTypeFlagLibrary GhcPkgId
+    -- ^ Library Cabal flag cache.
   | ConfigCacheTypeFlagExecutable PackageIdentifier
+    -- ^ Executable Cabal flag cache.
   deriving (Eq, Show)
 
 instance PersistField ConfigCacheType where
@@ -67,3 +82,100 @@ 
 instance PersistFieldSql Action where
   sqlType _ = SqlInt64
+
+-- | Type synonym representing caches of files and information about them
+-- sufficient to identify if they have changed subsequently.
+type FileCache = Map FilePath FileCacheInfo
+
+-- | Type representing caches of information about files sufficient to identify
+-- if they have changed subsequently. Stored on disk.
+newtype BuildFileCache = BuildFileCache
+  { fileCache :: FileCache
+  }
+  deriving (Eq, FromJSON, Generic, Show, ToJSON)
+
+instance NFData BuildFileCache
+
+-- | Type representing information about a file sufficient to identify if
+-- it has changed subsequently.
+newtype FileCacheInfo = FileCacheInfo
+  { hash :: SHA256
+    -- ^ SHA-256 hash of file contents.
+  }
+  deriving (Eq, Generic, Show)
+
+instance NFData FileCacheInfo
+
+-- Provided for storing the t'BuildFileCache' values in a file. But maybe
+-- JSON/YAML isn't the right choice here, worth considering.
+instance ToJSON FileCacheInfo where
+  toJSON fileCacheInfo = object
+    [ "hash" .= fileCacheInfo.hash
+    ]
+
+instance FromJSON FileCacheInfo where
+  parseJSON = withObject "FileCacheInfo" $ \o -> FileCacheInfo
+    <$> o .: "hash"
+
+-- | Stored in the project's SQLite database to know whether the Cabal
+-- configuration has changed or libarary or executable Cabal flags have changed.
+data ConfigCache = ConfigCache
+  { configureOpts :: !ConfigureOpts
+    -- ^ All Cabal configure options used for this package.
+  , deps :: !(Set GhcPkgId)
+    -- ^ The GhcPkgIds of all of the dependencies. Since Cabal doesn't take
+    -- the complete GhcPkgId (only a PackageIdentifier) in the configure
+    -- options, just using the previous value is insufficient to know if
+    -- dependencies have changed.
+  , components :: !(Set S.ByteString)
+    -- ^ The components to be built. It's a bit of a hack to include this in
+    -- here, as it's not a configure option (just a build option), but this
+    -- is a convenient way to force compilation when the components change.
+  , buildHaddocks :: !Bool
+    -- ^ Is Haddock documentation to be built?
+  , pkgSrc :: !CachePkgSrc
+    -- ^ The origin of the package's source code.
+  , pathEnvVar :: !Text
+    -- ^ Value of the PATH environment variable. See
+    -- <https://github.com/commercialhaskell/stack/issues/3138>
+  }
+  deriving (Data, Eq, Generic, Show)
+
+instance NFData ConfigCache
+
+data CachePkgSrc
+  = CacheSrcUpstream
+  | CacheSrcLocal FilePath
+  deriving (Data, Eq, Generic, Read, Show)
+
+instance NFData CachePkgSrc
+
+instance PersistField CachePkgSrc where
+  toPersistValue CacheSrcUpstream = PersistText "upstream"
+  toPersistValue (CacheSrcLocal fp) = PersistText ("local:" <> T.pack fp)
+  fromPersistValue (PersistText t) =
+    if t == "upstream"
+      then Right CacheSrcUpstream
+      else case T.stripPrefix "local:" t of
+        Just fp -> Right $ CacheSrcLocal (T.unpack fp)
+        Nothing -> Left $ "Unexpected CachePkgSrc value: " <> t
+  fromPersistValue _ = Left "Unexpected CachePkgSrc type"
+
+instance PersistFieldSql CachePkgSrc where
+  sqlType _ = SqlString
+
+-- | Information on a compiled package: the library .conf file (if relevant),
+-- the sub-libraries (if present) and all of the executable paths.
+data PrecompiledCache base = PrecompiledCache
+  { library :: !(Maybe (Path base File))
+    -- ^ .conf file inside the package database
+  , subLibs :: ![Path base File]
+    -- ^ .conf file inside the package database, for each of the sub-libraries
+  , exes    :: ![Path base File]
+    -- ^ Full paths to executables
+  }
+  deriving (Eq, Generic, Show)
+
+instance NFData (PrecompiledCache Abs)
+
+instance NFData (PrecompiledCache Rel)
src/Stack/Types/Casa.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE OverloadedStrings  #-}
 
 {-|
-Module      : Stack.Types.Cache
+Module      : Stack.Types.Casa
 Description : Casa configuration types.
 License     : BSD-3-Clause
 
src/Stack/Types/ColorWhen.hs view
@@ -33,9 +33,8 @@                  "option are 'never', 'always', or 'auto'.")
 
 readColorWhen :: ReadM ColorWhen
-readColorWhen = do
-  s <- OA.readerAsk
-  case s of
+readColorWhen =
+  OA.readerAsk >>= \case
     "never" -> pure ColorNever
     "always" -> pure ColorAlways
     "auto" -> pure ColorAuto
src/Stack/Types/CompCollection.hs view
@@ -1,8 +1,5 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
-{-# LANGUAGE FlexibleContexts    #-}
 {-# LANGUAGE OverloadedRecordDot #-}
-{-# LANGUAGE ScopedTypeVariables #-}
 
 {-|
 Module      : Stack.Types.CompCollection
@@ -51,7 +48,7 @@     -- require unbuildable components to be built. The field allows for
     -- intelligible error messages.
   }
-  deriving (Show)
+  deriving Show
 
 instance Semigroup (CompCollection component) where
   a <> b = CompCollection
src/Stack/Types/Compiler.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude  #-}
-{-# LANGUAGE DataKinds          #-}
 {-# LANGUAGE OverloadedStrings  #-}
 {-# LANGUAGE TypeFamilies       #-}
 
@@ -12,8 +11,12 @@   ( ActualCompiler (..)
   , WhichCompiler (..)
   , CompilerRepository (..)
+  , CompilerTarget (..)
+  , CompilerBindistPath (..)
   , CompilerException (..)
   , defaultCompilerRepository
+  , defaultCompilerTarget
+  , defaultCompilerBindistPath
   , getGhcVersion
   , whichCompiler
   , compilerVersionText
@@ -32,16 +35,17 @@ import           Database.Persist.Sql
                    ( PersistField (..), PersistFieldSql (..), SqlType (..) )
 import qualified Data.Text as T
+import           Distribution.Version ( mkVersion )
 import           Stack.Prelude
 import           Stack.Types.Version ( VersionCheck, checkVersion )
-import           Distribution.Version ( mkVersion )
+import           System.Permissions ( osIsWindows )
 
 -- | Type representing exceptions thrown by functions exported by the
 -- "Stack.Types.Compiler" module.
 data CompilerException
   = GhcjsNotSupported
   | PantryException PantryException
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception CompilerException where
   displayException GhcjsNotSupported =
@@ -63,7 +67,7 @@ data ActualCompiler
   = ACGhc !Version
   | ACGhcGit !Text !Text
-  deriving (Data, Eq, Generic, Ord, Show, Typeable)
+  deriving (Data, Eq, Generic, Ord, Show)
 
 instance NFData ActualCompiler
 
@@ -147,6 +151,32 @@ defaultCompilerRepository :: CompilerRepository
 defaultCompilerRepository =
   CompilerRepository "https://gitlab.haskell.org/ghc/ghc.git"
+
+-- | Target for Hadrian build
+newtype CompilerTarget
+  = CompilerTarget Text
+  deriving Show
+
+instance FromJSON CompilerTarget where
+  parseJSON = withText "CompilerTarget" (pure . CompilerTarget)
+
+defaultCompilerTarget :: CompilerTarget
+defaultCompilerTarget = if osIsWindows
+  then CompilerTarget "reloc-binary-dist"
+  else CompilerTarget "binary-dist"
+
+-- | Hadrian path to built binary distribution
+newtype CompilerBindistPath
+  = CompilerBindistPath Text
+  deriving Show
+
+instance FromJSON CompilerBindistPath where
+  parseJSON = withText "CompilerBindistPath" (pure . CompilerBindistPath)
+
+defaultCompilerBindistPath :: CompilerBindistPath
+defaultCompilerBindistPath = if osIsWindows
+  then CompilerBindistPath "_build/reloc-bindist"
+  else CompilerBindistPath "_build/bindist"
 
 whichCompilerL :: Getting r ActualCompiler WhichCompiler
 whichCompilerL = to whichCompiler
src/Stack/Types/CompilerBuild.hs view
@@ -13,7 +13,7 @@   ) where
 
 import           Data.Aeson.Types ( FromJSON, parseJSON, withText )
-import           Data.Text as T
+import qualified Data.Text as T
 import           Stack.Prelude
 
 -- | Build of the compiler distribution (e.g. standard, gmp4, tinfo6)
src/Stack/Types/Component.hs view
@@ -1,14 +1,7 @@ {-# LANGUAGE NoImplicitPrelude          #-}
-{-# LANGUAGE ConstraintKinds            #-}
-{-# LANGUAGE DataKinds                  #-}
-{-# LANGUAGE DeriveDataTypeable         #-}
-{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE DuplicateRecordFields      #-}
-{-# LANGUAGE FlexibleContexts           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE NoFieldSelectors           #-}
 {-# LANGUAGE OverloadedRecordDot        #-}
-{-# LANGUAGE ScopedTypeVariables        #-}
 
 {-|
 Module      : Stack.Types.Component
@@ -38,7 +31,8 @@ import           Distribution.PackageDescription
                    ( BenchmarkInterface, Dependency, TestSuiteInterface )
 import           Distribution.Simple ( Extension, Language )
-import           Distribution.Utils.Path ( PackageDir, SourceDir, SymbolicPath )
+import           Distribution.Utils.Path ( Pkg, Source, SymbolicPath )
+import qualified Distribution.Utils.Path as Cabal
 import           GHC.Records ( HasField (..) )
 import           Stack.Prelude
 import           Stack.Types.ComponentUtils
@@ -62,7 +56,7 @@   , exposedModules :: [ModuleName]
     -- |^ This is only used for gathering the files related to this component.
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | A type representing foreign library components of a package.
 --
@@ -72,7 +66,7 @@   { name :: StackUnqualCompName
   , buildInfo :: !StackBuildInfo
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | A type representing executable components of a package.
 --
@@ -83,7 +77,7 @@   , buildInfo :: !StackBuildInfo
   , modulePath :: FilePath
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | A type representing test suite components of a package.
 --
@@ -94,7 +88,7 @@   , buildInfo :: !StackBuildInfo
   , interface :: !TestSuiteInterface
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | A type representing benchmark components of a package.
 --
@@ -106,11 +100,11 @@   , interface :: BenchmarkInterface
     -- ^ This is only used for gathering the files related to this component.
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | Type representing the name of an executable.
 newtype ExeName = ExeName Text
-  deriving (Data, Eq, Hashable, IsString, Generic, NFData, Ord, Show, Typeable)
+  deriving (Data, Eq, Hashable, IsString, Generic, NFData, Ord, Show)
 
 -- | Type representing information needed to build. The file gathering-related
 -- fields are lazy because they are not always needed.
@@ -140,7 +134,7 @@     -- ^ Only used in file gathering. See usage in "Stack.ComponentFile" module.
   , jsSources :: [FilePath]
     -- ^ Only used in file gathering. See usage in "Stack.ComponentFile" module.
-  , hsSourceDirs :: [SymbolicPath PackageDir SourceDir]
+  , hsSourceDirs :: [SymbolicPath Pkg (Cabal.Dir Source)]
     -- ^ Only used in file & opts gathering. See usage in "Stack.ComponentFile"
     -- module for fle gathering.
   , cSources :: [FilePath]
@@ -164,7 +158,7 @@   , frameworks :: [String]
     -- ^ Only used in opts gathering.
   }
-  deriving (Show)
+  deriving Show
 
 -- | Type synonym for a 'HasField' constraint.
 type HasName component = HasField "name" component StackUnqualCompName
src/Stack/Types/ComponentUtils.hs view
@@ -1,12 +1,5 @@ {-# LANGUAGE NoImplicitPrelude          #-}
-{-# LANGUAGE ConstraintKinds            #-}
-{-# LANGUAGE DataKinds                  #-}
-{-# LANGUAGE DeriveDataTypeable         #-}
-{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE DuplicateRecordFields      #-}
-{-# LANGUAGE FlexibleContexts           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE ScopedTypeVariables        #-}
 
 {-|
 Module      : Stack.Types.ComponentUtils
@@ -47,7 +40,7 @@ -- unnecessary work, but there is no 'Hashable' instance for
 -- 'Distribution.Types.UnqualComponentName.UnqualComponentName' yet.
 newtype StackUnqualCompName = StackUnqualCompName UnqualComponentName
-  deriving (Data, Eq, Generic, IsString, NFData, Ord, Read, Show, Typeable)
+  deriving (Data, Eq, Generic, IsString, NFData, Ord, Read, Show)
 
 instance Hashable StackUnqualCompName where
   hashWithSalt a v = hashWithSalt a (show v)
src/Stack/Types/Config.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE DefaultSignatures   #-}
-{-# LANGUAGE GADTs               #-}
 {-# LANGUAGE MultiWayIf          #-}
 {-# LANGUAGE NoFieldSelectors    #-}
 {-# LANGUAGE OverloadedRecordDot #-}
@@ -42,7 +40,8 @@ import           Stack.Types.ApplyProgOptions ( ApplyProgOptions (..) )
 import           Stack.Types.BuildOpts ( BuildOpts )
 import           Stack.Types.CabalConfigKey ( CabalConfigKey )
-import           Stack.Types.Compiler ( CompilerRepository )
+import           Stack.Types.Compiler
+                   ( CompilerBindistPath, CompilerRepository, CompilerTarget )
 import           Stack.Types.CompilerBuild ( CompilerBuild )
 import           Stack.Types.Docker ( DockerOpts )
 import           Stack.Types.DumpLogs ( DumpLogs )
@@ -116,6 +115,10 @@     -- ^ Specifies which versions of the compiler are acceptable.
   , compilerRepository      :: !CompilerRepository
     -- ^ Specifies the repository containing the compiler sources
+  , compilerTarget          :: !CompilerTarget
+    -- ^ Specifies the Hadrian build target
+  , compilerBindistPath     :: !CompilerBindistPath
+    -- ^ Specifies the Hadrian path to built binary distribution
   , localBin                :: !(Path Abs Dir)
     -- ^ Directory we should install executables into
   , fileWatchHook           :: !(Maybe (Path Abs File))
@@ -214,6 +217,9 @@   , notifyIfNoRunBenchmarks :: !Bool
     -- ^ Notify if the --no-run-benchmarks flag has prevented the running of a
     -- targeted benchmark?
+  , notifyIfBaseNotBoot     :: !Bool
+    -- ^ Notify if the specified base package is other than the GHC boot
+    -- package?
   , noRunCompile            :: !Bool
     -- ^ Use --no-run and --compile options when using `stack script`
   , stackDeveloperMode      :: !Bool
src/Stack/Types/Config/Exception.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
-{-# LANGUAGE GADTs                 #-}
 {-# LANGUAGE OverloadedStrings     #-}
 {-# LANGUAGE TypeFamilies          #-}
 
@@ -51,7 +49,7 @@   | NoSnapshotWhenUsingNoProject
   | NoLTSWithMajorVersion Int
   | NoLTSFound
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ConfigException where
   displayException (ParseCustomSnapshotException url exception) = concat
@@ -174,7 +172,7 @@   | NoMsysEnvironmentBug
   | ConfigFileNotProjectLevelBug
   | NoExecutablePath !String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty ConfigPrettyException where
   pretty (ParseConfigFileException configFile exception) =
@@ -259,7 +257,7 @@ -- "Stack.Config" module.
 data ParseAbsolutePathException
   = ParseAbsolutePathException String String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception ParseAbsolutePathException where
   displayException (ParseAbsolutePathException envVar dir) = concat
src/Stack/Types/ConfigMonoid.hs view
@@ -44,7 +44,8 @@ import           Stack.Types.Casa ( CasaOptsMonoid )
 import           Stack.Types.CabalConfigKey ( CabalConfigKey )
 import           Stack.Types.ColorWhen ( ColorWhen )
-import           Stack.Types.Compiler ( CompilerRepository )
+import           Stack.Types.Compiler
+                   ( CompilerBindistPath, CompilerRepository, CompilerTarget )
 import           Stack.Types.CompilerBuild ( CompilerBuild )
 import           Stack.Types.Docker ( DockerOptsMonoid, VersionRangeJSON (..) )
 import           Stack.Types.DumpLogs ( DumpLogs )
@@ -101,6 +102,10 @@     -- ^ See: 'Stack.Types.Config.compilerCheck'
   , compilerRepository      :: !(First CompilerRepository)
     -- ^ See: 'Stack.Types.Config.compilerRepository'
+  , compilerTarget          :: !(First CompilerTarget)
+    -- ^ See: 'Stack.Types.Config.compilerTarget'
+  , compilerBindistPath     :: !(First CompilerBindistPath)
+    -- ^ See: 'Stack.Types.Config.compilerBindistPath'
   , requireStackVersion     :: !IntersectingVersionRange
     -- ^ See: 'Stack.Types.Config.requireStackVersion'
   , arch                    :: !(First String)
@@ -199,6 +204,8 @@     -- ^ See 'Stack.Types.Config.notifyIfNoRunTests'
   , notifyIfNoRunBenchmarks :: !FirstTrue
     -- ^ See 'Stack.Types.Config.notifyIfNoRunBenchmarks'
+  , notifyIfBaseNotBoot     :: !FirstTrue
+    -- ^ See 'Stack.Types.Config.notifyIfBaseNotBoot'
   , casaOpts                :: !CasaOptsMonoid
     -- ^ Casa configuration options.
   , casaRepoPrefix          :: !(First CasaRepoPrefix)
@@ -243,14 +250,12 @@   hideTHLoading <- FirstTrue <$> obj ..:? configMonoidHideTHLoadingName
   prefixTimestamps <- First <$> obj ..:? configMonoidPrefixTimestampsName
 
-  murls :: Maybe Value <- obj ..:? configMonoidUrlsName
-  latestSnapshot <-
-    case murls of
-      Nothing -> pure $ First Nothing
-      Just urls -> jsonSubWarnings $ lift $ withObjectWarnings
-        "urls"
-        (\o -> First <$> o ..:? "latest-snapshot" :: WarningParser (First Text))
-        urls
+  latestSnapshot <- obj ..:? configMonoidUrlsName >>= \case
+    Nothing -> pure $ First Nothing
+    Just urls -> jsonSubWarnings $ lift $ withObjectWarnings
+      "urls"
+      (\o -> First <$> o ..:? "latest-snapshot" :: WarningParser (First Text))
+      (urls :: Value)
 
   packageIndex <-
     First <$> jsonSubWarningsT (obj ..:?  configMonoidPackageIndexName)
@@ -281,16 +286,17 @@   concurrentTests <- First <$> obj ..:? configMonoidConcurrentTestsName
   localBinPath <- First <$> obj ..:? configMonoidLocalBinPathName
   fileWatchHook <- First <$> obj ..:? configMonoidFileWatchHookName
-  templates <- obj ..:? "templates"
-  (scmInit, templateParameters) <-
-    case templates of
-      Nothing -> pure (First Nothing,M.empty)
-      Just tobj -> do
-        scmInit <- tobj ..:? configMonoidScmInitName
-        params <- tobj ..:? configMonoidTemplateParametersName
-        pure (First scmInit,fromMaybe M.empty params)
+  (scmInit, templateParameters) <- obj ..:? "templates" >>= \case
+    Nothing -> pure (First Nothing,M.empty)
+    Just tobj -> do
+      scmInit <- tobj ..:? configMonoidScmInitName
+      params <- tobj ..:? configMonoidTemplateParametersName
+      pure (First scmInit,fromMaybe M.empty params)
   compilerCheck <- First <$> obj ..:? configMonoidCompilerCheckName
   compilerRepository <- First <$> (obj ..:? configMonoidCompilerRepositoryName)
+  compilerTarget <- First <$> (obj ..:? configMonoidCompilerTargetName)
+  compilerBindistPath <-
+    First <$> (obj ..:? configMonoidCompilerBindistPathName)
 
   options <- Map.map (.ghcOptions) <$>
     obj ..:? configMonoidGhcOptionsName ..!= (mempty :: Map GhcOptionKey GhcOptions)
@@ -355,6 +361,8 @@     FirstTrue <$> obj ..:? configMonoidNotifyIfNoRunTestsName
   notifyIfNoRunBenchmarks <-
     FirstTrue <$> obj ..:? configMonoidNotifyIfNoRunBenchmarksName
+  notifyIfBaseNotBoot <-
+    FirstTrue <$> obj ..:? configMonoidNotifyIfBaseNotBootName
   casaOpts <- jsonSubWarnings (obj ..:? configMonoidCasaOptsName ..!= mempty)
   casaRepoPrefix <- First <$> obj ..:? configMonoidCasaRepoPrefixName
   snapshotLocation <- First <$> obj ..:? configMonoidSnapshotLocationName
@@ -381,6 +389,8 @@     , msysEnvironment
     , compilerCheck
     , compilerRepository
+    , compilerTarget
+    , compilerBindistPath
     , requireStackVersion
     , arch
     , ghcVariant
@@ -427,6 +437,7 @@     , notifyIfArchUnknown
     , notifyIfNoRunTests
     , notifyIfNoRunBenchmarks
+    , notifyIfBaseNotBoot
     , casaOpts
     , casaRepoPrefix
     , snapshotLocation
@@ -537,6 +548,12 @@ configMonoidCompilerRepositoryName :: Text
 configMonoidCompilerRepositoryName = "compiler-repository"
 
+configMonoidCompilerTargetName :: Text
+configMonoidCompilerTargetName = "compiler-target"
+
+configMonoidCompilerBindistPathName :: Text
+configMonoidCompilerBindistPathName = "compiler-bindist-path"
+
 configMonoidGhcOptionsName :: Text
 configMonoidGhcOptionsName = "ghc-options"
 
@@ -626,6 +643,9 @@ 
 configMonoidNotifyIfNoRunBenchmarksName :: Text
 configMonoidNotifyIfNoRunBenchmarksName = "notify-if-no-run-benchmarks"
+
+configMonoidNotifyIfBaseNotBootName :: Text
+configMonoidNotifyIfBaseNotBootName = "notify-if-base-not-boot"
 
 configMonoidCasaOptsName :: Text
 configMonoidCasaOptsName = "casa"
src/Stack/Types/ConfigureOpts.hs view
@@ -1,8 +1,5 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE NoFieldSelectors    #-}
-{-# LANGUAGE OverloadedRecordDot #-}
-{-# LANGUAGE OverloadedStrings   #-}
 
 {-|
 Module      : Stack.Types.ConfigureOpts
@@ -13,37 +10,11 @@   ( ConfigureOpts (..)
   , BaseConfigOpts (..)
   , PackageConfigureOpts (..)
-  , configureOpts
-  , configureOptsFromDb
-  , renderConfigureOpts
-  , packageConfigureOptsFromPackage
   ) where
 
-import qualified Data.Map as Map
-import qualified Data.Text as T
-import           Database.Persist ( Entity, entityVal )
-import           Distribution.Types.MungedPackageName
-                   ( decodeCompatPackageName )
-import           Distribution.Types.PackageName ( unPackageName )
-import           Distribution.Types.UnqualComponentName
-                   ( unUnqualComponentName )
-import           GHC.Records ( HasField )
-import           Path ( (</>), parseRelDir )
-import           Path.Extra ( toFilePathNoTrailingSep )
-import           Stack.Constants
-                   ( bindirSuffix, compilerOptionsCabalFlag, docDirSuffix
-                   , relDirEtc, relDirLib, relDirLibexec, relDirShare
-                   )
 import           Stack.Prelude
 import           Stack.Types.BuildOpts ( BuildOpts (..) )
 import           Stack.Types.BuildOptsCLI ( BuildOptsCLI )
-import           Stack.Types.Compiler ( whichCompiler )
-import           Stack.Types.Config ( Config (..), HasConfig (..) )
-import           Stack.Types.EnvConfig ( EnvConfig, actualCompilerVersionL )
-import           Stack.Types.GhcPkgId ( GhcPkgId, ghcPkgIdString )
-import           Stack.Types.IsMutable ( IsMutable (..) )
-import           Stack.Types.Package ( Package(..), packageIdentifier )
-import           System.FilePath ( pathSeparator )
 
 -- | Basic information used to calculate what the configure options are
 data BaseConfigOpts = BaseConfigOpts
@@ -68,172 +39,6 @@   }
   deriving Show
 
-packageConfigureOptsFromPackage ::
-     Package
-  -> PackageConfigureOpts
-packageConfigureOptsFromPackage pkg = PackageConfigureOpts
-  { pkgCabalConfigOpts = pkg.cabalConfigOpts
-  , pkgGhcOptions = pkg.ghcOptions
-  , pkgFlags = pkg.flags
-  , pkgDefaultFlags = pkg.defaultFlags
-  , pkgIdentifier = packageIdentifier pkg
-  }
-
-configureOptsFromDb ::
-     ( HasField "configCacheDirOptionValue" b1 String
-     , HasField "configCacheNoDirOptionValue" b2 String
-     )
-  => [Entity b1]
-  -> [Entity b2]
-  -> ConfigureOpts
-configureOptsFromDb x y = ConfigureOpts
-  { pathRelated = map ((.configCacheDirOptionValue) . entityVal) x
-  , nonPathRelated = map ((.configCacheNoDirOptionValue) . entityVal) y
-  }
-
--- | Render a @BaseConfigOpts@ to an actual list of options
-configureOpts ::
-     EnvConfig
-  -> BaseConfigOpts
-  -> Map PackageIdentifier GhcPkgId -- ^ dependencies
-  -> Bool -- ^ local non-extra-dep?
-  -> IsMutable
-  -> PackageConfigureOpts
-  -> ConfigureOpts
-configureOpts econfig bco deps isLocal isMutable pkgConfigureOpts = ConfigureOpts
-  { pathRelated = configureOptsPathRelated bco isMutable pkgConfigureOpts
-  , nonPathRelated =
-      configureOptsNonPathRelated econfig bco deps isLocal pkgConfigureOpts
-  }
-
-configureOptsPathRelated ::
-     BaseConfigOpts
-  -> IsMutable
-  -> PackageConfigureOpts
-  -> [String]
-configureOptsPathRelated bco isMutable pkgOpts = concat
-  [ ["--user", "--package-db=clear", "--package-db=global"]
-  , map (("--package-db=" ++) . toFilePathNoTrailingSep) $ case isMutable of
-      Immutable -> bco.extraDBs ++ [bco.snapDB]
-      Mutable -> bco.extraDBs ++ [bco.snapDB] ++ [bco.localDB]
-  , [ "--libdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirLib)
-    , "--bindir=" ++ toFilePathNoTrailingSep (installRoot </> bindirSuffix)
-    , "--datadir=" ++ toFilePathNoTrailingSep (installRoot </> relDirShare)
-    , "--libexecdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirLibexec)
-    , "--sysconfdir=" ++ toFilePathNoTrailingSep (installRoot </> relDirEtc)
-    , "--docdir=" ++ toFilePathNoTrailingSep docDir
-    , "--htmldir=" ++ toFilePathNoTrailingSep docDir
-    , "--haddockdir=" ++ toFilePathNoTrailingSep docDir]
-  ]
- where
-  installRoot =
-    case isMutable of
-      Immutable -> bco.snapInstallRoot
-      Mutable -> bco.localInstallRoot
-  docDir =
-    case pkgVerDir of
-      Nothing -> installRoot </> docDirSuffix
-      Just dir -> installRoot </> docDirSuffix </> dir
-  pkgVerDir = parseRelDir
-    (  packageIdentifierString pkgOpts.pkgIdentifier
-    ++ [pathSeparator]
-    )
-
--- | Same as 'configureOpts', but does not include directory path options
-configureOptsNonPathRelated ::
-     EnvConfig
-  -> BaseConfigOpts
-  -> Map PackageIdentifier GhcPkgId -- ^ Dependencies.
-  -> Bool -- ^ Is this a local, non-extra-dep?
-  -> PackageConfigureOpts
-  -> [String]
-configureOptsNonPathRelated econfig bco deps isLocal package = concat
-  [ depOptions
-  , [ "--enable-library-profiling"
-    | bopts.libProfile || bopts.exeProfile
-    ]
-  , ["--enable-profiling" | bopts.exeProfile && isLocal]
-  , ["--enable-split-objs" | bopts.splitObjs]
-  , [ "--disable-library-stripping"
-    | not $ bopts.libStrip || bopts.exeStrip
-    ]
-  , ["--disable-executable-stripping" | not bopts.exeStrip && isLocal]
-  , flags
-  , map T.unpack package.pkgCabalConfigOpts
-  , processGhcOptions package.pkgGhcOptions
-  , map ("--extra-include-dirs=" ++) config.extraIncludeDirs
-  , map ("--extra-lib-dirs=" ++) config.extraLibDirs
-  , maybe
-      []
-      (\customGcc -> ["--with-gcc=" ++ toFilePath customGcc])
-      config.overrideGccPath
-  , ["--exact-configuration"]
-  , ["--ghc-option=-fhide-source-paths" | hideSourcePaths]
-  ]
- where
-  -- This function parses the GHC options that are providing in the
-  -- stack.yaml file. In order to handle RTS arguments correctly, we need
-  -- to provide the RTS arguments as a single argument.
-  processGhcOptions :: [Text] -> [String]
-  processGhcOptions args =
-    let (preRtsArgs, mid) = break ("+RTS" ==) args
-        (rtsArgs, end) = break ("-RTS" ==) mid
-        fullRtsArgs =
-          case rtsArgs of
-            [] ->
-              -- This means that we didn't have any RTS args - no `+RTS` - and
-              -- therefore no need for a `-RTS`.
-              []
-            _ ->
-              -- In this case, we have some RTS args. `break` puts the `"-RTS"`
-              -- string in the `snd` list, so we want to append it on the end of
-              -- `rtsArgs` here.
-              --
-              -- We're not checking that `-RTS` is the first element of `end`.
-              -- This is because the GHC RTS allows you to omit a trailing -RTS
-              -- if that's the last of the arguments. This permits a GHC options
-              -- in stack.yaml that matches what you might pass directly to GHC.
-              [T.unwords $ rtsArgs ++ ["-RTS"]]
-        -- We drop the first element from `end`, because it is always either
-        -- `"-RTS"` (and we don't want that as a separate argument) or the list
-        -- is empty (and `drop _ [] = []`).
-        postRtsArgs = drop 1 end
-        newArgs = concat [preRtsArgs, fullRtsArgs, postRtsArgs]
-    in  concatMap (\x -> [compilerOptionsCabalFlag wc, T.unpack x]) newArgs
-
-  wc = view (actualCompilerVersionL . to whichCompiler) econfig
-
-  hideSourcePaths = config.hideSourcePaths
-
-  config = view configL econfig
-  bopts = bco.buildOpts
-  mapAndAppend fn = Map.foldrWithKey' (fmap (:) . fn)
-  -- Unioning atop defaults is needed so that all flags are specified with
-  -- --exact-configuration.
-  flags = mapAndAppend
-    renderFlags
-    []
-    (package.pkgFlags `Map.union` package.pkgDefaultFlags)
-  renderFlags name enabled =
-       "-f"
-    <> (if enabled then "" else "-")
-    <> flagNameString name
-
-  depOptions = mapAndAppend toDepOption [] deps
-
-  toDepOption (PackageIdentifier name _) gid = concat
-    [ "--dependency="
-    , depOptionKey
-    , "="
-    , ghcPkgIdString gid
-    ]
-   where
-    MungedPackageName subPkgName lib = decodeCompatPackageName name
-    depOptionKey = case lib of
-      LMainLibName -> unPackageName name
-      LSubLibName cn ->
-        unPackageName subPkgName <> ":" <> unUnqualComponentName cn
-
 -- | Configure options to be sent to Setup.hs configure.
 data ConfigureOpts = ConfigureOpts
   { pathRelated :: ![String]
@@ -243,10 +48,6 @@   , nonPathRelated :: ![String]
     -- ^ Options other than path-related options.
   }
-  deriving (Data, Eq, Generic, Show, Typeable)
+  deriving (Data, Eq, Generic, Show)
 
 instance NFData ConfigureOpts
-
--- | Render configure options as a single list of options.
-renderConfigureOpts :: ConfigureOpts -> [String]
-renderConfigureOpts copts = copts.pathRelated ++ copts.nonPathRelated
src/Stack/Types/Dependency.hs view
@@ -36,7 +36,7 @@   { versionRange :: !VersionRange
   , depType :: !DepType
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | Is this package being used as a library, or just as a build tool? If the
 -- former, we need to ensure that a library actually exists. See
src/Stack/Types/DependencyTree.hs view
@@ -10,6 +10,7 @@ 
 module Stack.Types.DependencyTree
   ( DependencyTree (..)
+  , DependencyGraph
   , DotPayload (..)
   , licenseText
   , versionText
@@ -35,9 +36,12 @@   }
   deriving (Eq, Show)
 
+-- | Type synoynm representing dependency graphs.
+type DependencyGraph = Map PackageName (Set PackageName, DotPayload)
+
+-- | Type representing dependency trees.
 data DependencyTree =
-  DependencyTree (Set PackageName)
-                 (Map PackageName (Set PackageName, DotPayload))
+  DependencyTree (Set PackageName) DependencyGraph
 
 instance ToJSON DependencyTree where
   toJSON (DependencyTree _ dependencyMap) =
@@ -86,11 +90,14 @@   , "subdir" .= repoSubdir repo
   ]
 
+-- | For the given dot payload, yield a text representation of the name of the
+-- licence.
 licenseText :: DotPayload -> Text
 licenseText payload =
   maybe "<unknown>" (Text.pack . display . either licenseFromSPDX id)
                     payload.license
 
+-- | For the given dot payload, yield a text representation of the version.
 versionText :: DotPayload -> Text
 versionText payload =
   maybe "<unknown>" (Text.pack . display) payload.version
src/Stack/Types/Docker.hs view
@@ -108,7 +108,7 @@     -- ^ Using host stack-exe on unsupported platform.
   | DockerStackExeParseException String
     -- ^ @stack-exe@ option fails to parse.
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception DockerException where
   displayException DockerMustBeEnabledException =
src/Stack/Types/EnvConfig.hs view
@@ -152,20 +152,20 @@   root <- view stackRootL
   platform <- platformGhcRelDir
   pure $ root </> relDirSnapshots </> platform
+{-# DEPRECATED snapshotsDir "Not used by Stack >= 1.0.4. May be removed from a future version of stack." #-}
 
--- | Installation root for dependencies
+-- | Installation root for dependencies.
 installationRootDeps :: HasEnvConfig env => RIO env (Path Abs Dir)
 installationRootDeps = do
   root <- view stackRootL
-  -- TODO: also useShaPathOnWindows here, once #1173 is resolved.
   psc <- platformSnapAndCompilerRel
   pure $ root </> relDirSnapshots </> psc
 
--- | Installation root for locals
+-- | Installation root for locals.
 installationRootLocal :: HasEnvConfig env => RIO env (Path Abs Dir)
 installationRootLocal = do
   workDir <- getWorkDir
-  psc <- useShaPathOnWindows =<< platformSnapAndCompilerRel
+  psc <- platformSnapAndCompilerRel
   pure $ workDir </> relDirInstall </> psc
 
 -- | Get the hoogle database path.
@@ -214,7 +214,7 @@ hoogleRoot :: HasEnvConfig env => RIO env (Path Abs Dir)
 hoogleRoot = do
   workDir <- getWorkDir
-  psc <- useShaPathOnWindows =<< platformSnapAndCompilerRel
+  psc <- platformSnapAndCompilerRel
   pure $ workDir </> relDirHoogle </> psc
 
 compilerVersionDir ::
src/Stack/Types/FileDigestCache.hs view
@@ -12,8 +12,8 @@   ) where
 
 import qualified Data.Map.Strict as Map
-import           Stack.Prelude
 import qualified Pantry.SHA256 as SHA256
+import           Stack.Prelude
 
 -- | Type synonym representing caches of digests of files.
 type FileDigestCache = IORef (Map FilePath SHA256)
src/Stack/Types/GhcPkgExe.hs view
@@ -29,7 +29,7 @@   | CannotParseRelFileBug !String
   | CannotParseDirectoryWithDBug !String
   | CannotRecacheAfterUnregister !(Path Abs Dir) !SomeException
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty GhcPkgPrettyException where
   pretty (CannotParse str what e) =
src/Stack/Types/GhcPkgId.hs view
@@ -33,7 +33,7 @@ -- | A parse fail.
 newtype GhcPkgIdParseFail
   = GhcPkgIdParseFail Text
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception GhcPkgIdParseFail where
   displayException (GhcPkgIdParseFail bs) = concat
@@ -45,7 +45,7 @@ -- | A ghc-pkg package identifier.
 newtype GhcPkgId
   = GhcPkgId UnitId
-  deriving (Data, Eq, Generic, Ord, Typeable)
+  deriving (Data, Eq, Generic, Ord)
 
 instance PersistField GhcPkgId where
   toPersistValue = toPersistValue . ghcPkgIdToText
src/Stack/Types/Package.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude     #-}
-{-# LANGUAGE DataKinds             #-}
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
@@ -14,7 +13,6 @@   ( BioInput (..)
   , BuildInfoOpts (..)
   , ExeName (..)
-  , FileCacheInfo (..)
   , InstallLocation (..)
   , Installed (..)
   , InstalledLibraryInfo (..)
@@ -47,9 +45,6 @@   , toPackageDbVariety
   ) where
 
-import           Data.Aeson
-                   ( ToJSON (..), FromJSON (..), (.=), (.:), object, withObject
-                   )
 import qualified Data.Map as M
 import qualified Data.Set as Set
 import           Distribution.CabalSpecVersion
@@ -63,6 +58,7 @@                    ( encodeCompatPackageName )
 import qualified RIO.Text as T
 import           Stack.Prelude
+import           Stack.Types.Cache ( FileCache )
 import           Stack.Types.CompCollection ( CompCollection )
 import           Stack.Types.Compiler ( ActualCompiler )
 import           Stack.Types.Component
@@ -100,7 +96,7 @@   | CabalFileNameParseFail FilePath
   | CabalFileNameInvalidPackageName FilePath
   | ComponentNotParsedBug String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception PackageException where
   displayException (PackageInvalidCabalFile loc _mversion errs warnings) = concat
@@ -164,7 +160,7 @@ -- | Name of an executable.
 newtype ExeName
   = ExeName { exeName :: Text }
-  deriving (Data, Eq, Generic, Hashable, IsString, NFData, Ord, Show, Typeable)
+  deriving (Data, Eq, Generic, Hashable, IsString, NFData, Ord, Show)
 
 -- | Some package info.
 data Package = Package
@@ -212,7 +208,7 @@     -- package dependencies should ignore benchmark dependencies. Directly set
     -- from 'enableBenchmarks'.
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 packageIdentifier :: Package -> PackageIdentifier
 packageIdentifier p = PackageIdentifier p.name p.version
@@ -249,7 +245,7 @@   , platform :: !Platform
     -- ^ host platform
   }
- deriving (Show, Typeable)
+ deriving Show
 
 -- | Compares the package name.
 instance Ord Package where
@@ -307,16 +303,13 @@     -- ^ Nothing == not dirty, Just == dirty. Note that the Set may be empty if
     -- we forced the build to treat packages as dirty. Also, the Set may not
     -- include all modified files.
-  , newBuildCaches :: !( MemoizedWith
-                           EnvConfig
-                           (Map NamedComponent (Map FilePath FileCacheInfo))
-                       )
-    -- ^ current state of the files
+  , newBuildCaches :: !(MemoizedWith EnvConfig (Map NamedComponent FileCache))
+    -- ^ Current state of the files.
   , componentFiles :: !( MemoizedWith
                            EnvConfig
                            (Map NamedComponent (Set (Path Abs File)))
                        )
-    -- ^ all files used by this package
+    -- ^ All files used by this package.
   }
   deriving Show
 
@@ -328,9 +321,7 @@ memoizeRefWith action = do
   ref <- newIORef Nothing
   pure $ MemoizedWith $ do
-    mres <- readIORef ref
-    res <-
-      case mres of
+    res <- readIORef ref >>= \case
         Just res -> pure res
         Nothing -> do
           res <- tryAny action
@@ -360,23 +351,6 @@ lpFilesForComponents components lp = runMemoizedWith $ do
   componentFiles <- lp.componentFiles
   pure $ mconcat (M.elems (M.restrictKeys componentFiles components))
-
-newtype FileCacheInfo = FileCacheInfo
-  { hash :: SHA256
-  }
-  deriving (Eq, Generic, Show, Typeable)
-
-instance NFData FileCacheInfo
-
--- Provided for storing the BuildCache values in a file. But maybe JSON/YAML
--- isn't the right choice here, worth considering.
-instance ToJSON FileCacheInfo where
-  toJSON (FileCacheInfo hash') = object
-    [ "hash" .= hash'
-    ]
-instance FromJSON FileCacheInfo where
-  parseJSON = withObject "FileCacheInfo" $ \o -> FileCacheInfo
-    <$> o .: "hash"
 
 -- | Maybe get the module name from the .cabal descriptor.
 dotCabalModule :: DotCabalDescriptor -> Maybe ModuleName
src/Stack/Types/PackageFile.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude   #-}
-{-# LANGUAGE DataKinds           #-}
 {-# LANGUAGE NoFieldSelectors    #-}
 {-# LANGUAGE OverloadedRecordDot #-}
 
@@ -118,7 +117,7 @@   , dataDir :: FilePath
   , dataFiles :: [FilePath]
   }
-  deriving (Show, Typeable)
+  deriving Show
 
 -- | Files that the package depends on, relative to package directory.
 data PackageComponentFile = PackageComponentFile
+ src/Stack/Types/Plan.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE NoImplicitPrelude     #-}
+{-# LANGUAGE DuplicateRecordFields #-}
+{-# LANGUAGE NoFieldSelectors      #-}
+{-# LANGUAGE OverloadedRecordDot   #-}
+{-# LANGUAGE OverloadedStrings     #-}
+
+{-|
+Module      : Stack.Types.Plan
+Description : Plan-related types and functions.
+License     : BSD-3-Clause
+
+Plan-related types and functions.
+-}
+
+module Stack.Types.Plan
+  ( Plan (..)
+  , Task (..)
+  , TaskType (..)
+  , TaskConfigOpts (..)
+  , taskAnyMissing
+  , taskIsTarget
+  , taskLocation
+  , taskProvides
+  , taskTargetIsMutable
+  , taskTypeLocation
+  , taskTypePackageIdentifier
+  , installLocationIsMutable
+  ) where
+
+import           Data.List as L
+import qualified RIO.Set as Set
+import           Stack.Prelude
+import           Stack.Types.Cache ( CachePkgSrc )
+import           Stack.Types.ComponentUtils ( StackUnqualCompName )
+import           Stack.Types.ConfigureOpts
+                   ( BaseConfigOpts, PackageConfigureOpts )
+import           Stack.Types.EnvConfig ( EnvConfig )
+import           Stack.Types.GhcPkgId ( GhcPkgId )
+import           Stack.Types.IsMutable ( IsMutable (..) )
+import           Stack.Types.Package
+                   ( InstallLocation (..), LocalPackage (..), Package (..)
+                   , packageIdentifier
+                   )
+
+-- | A complete plan of what needs to be built and how to do it
+data Plan = Plan
+  { tasks :: !(Map PackageName Task)
+  , finals :: !(Map PackageName Task)
+    -- ^ Final actions to be taken (test, benchmark, etc)
+  , unregisterLocal :: !(Map GhcPkgId (PackageIdentifier, Text))
+    -- ^ Text is reason we're unregistering, for display only
+  , installExes :: !(Map StackUnqualCompName InstallLocation)
+    -- ^ Executables that should be installed after successful building
+  }
+  deriving Show
+
+-- | A type representing tasks to perform when building.
+data Task = Task
+  { taskType        :: !TaskType
+    -- ^ The task type, telling us how to build this
+  , configOpts      :: !TaskConfigOpts
+    -- ^ A set of the package identifiers of dependencies for which 'GhcPkgId'
+    -- are missing and a function which yields configure options, given a
+    -- dictionary of those identifiers and their 'GhcPkgId'.
+  , buildHaddocks   :: !Bool
+  , present         :: !(Map PackageIdentifier GhcPkgId)
+    -- ^ A dictionary of the package identifiers of already-installed
+    -- dependencies, and their 'GhcPkgId'.
+  , allInOne        :: !Bool
+    -- ^ indicates that the package can be built in one step
+  , cachePkgSrc     :: !CachePkgSrc
+  , buildTypeConfig :: !Bool
+    -- ^ Is the build type of this package Configure. Check out
+    -- ensureConfigureScript in Stack.Build.Execute for the motivation
+  }
+  deriving Show
+
+-- | Type representing different types of task, depending on what is to be
+-- built.
+data TaskType
+  = TTLocalMutable LocalPackage
+    -- ^ Building local source code.
+  | TTRemotePackage IsMutable Package PackageLocationImmutable
+    -- ^ Building something from the package index (upstream).
+  deriving Show
+
+-- | Given the IDs of any missing packages, produce the configure options
+data TaskConfigOpts = TaskConfigOpts
+  { missing :: !(Set PackageIdentifier)
+    -- ^ Dependencies for which we don't yet have a 'GhcPkgId'
+  , envConfig :: !EnvConfig
+  , baseConfigOpts :: !BaseConfigOpts
+  , isLocalNonExtraDep :: !Bool
+  , isMutable :: !IsMutable
+  , pkgConfigOpts :: PackageConfigureOpts
+  }
+
+instance Show TaskConfigOpts where
+  show tco = "Missing: " ++ show tco.missing
+
+-- | Were any of the dependencies missing?
+
+taskAnyMissing :: Task -> Bool
+taskAnyMissing task = not $ Set.null task.configOpts.missing
+
+-- | A function to yield the package name and version of a given 'TaskType'
+-- value.
+taskTypePackageIdentifier :: TaskType -> PackageIdentifier
+taskTypePackageIdentifier (TTLocalMutable lp) = packageIdentifier lp.package
+taskTypePackageIdentifier (TTRemotePackage _ p _) = packageIdentifier p
+
+taskIsTarget :: Task -> Bool
+taskIsTarget t =
+  case t.taskType of
+    TTLocalMutable lp -> lp.wanted
+    _ -> False
+
+-- | A function to yield the relevant database (write-only or mutable) of a
+-- given 'TaskType' value.
+taskTypeLocation :: TaskType -> InstallLocation
+taskTypeLocation (TTLocalMutable _) = Local
+taskTypeLocation (TTRemotePackage Mutable _ _) = Local
+taskTypeLocation (TTRemotePackage Immutable _ _) = Snap
+
+-- | A function to yield the relevant database (write-only or mutable) of the
+-- given task.
+taskLocation :: Task -> InstallLocation
+taskLocation = taskTypeLocation . (.taskType)
+
+-- | A function to yield the package name and version to be built by the given
+-- task.
+taskProvides :: Task -> PackageIdentifier
+taskProvides = taskTypePackageIdentifier . (.taskType)
+
+taskTargetIsMutable :: Task -> IsMutable
+taskTargetIsMutable task =
+  case task.taskType of
+    TTLocalMutable _ -> Mutable
+    TTRemotePackage mutable _ _ -> mutable
+
+installLocationIsMutable :: InstallLocation -> IsMutable
+installLocationIsMutable Snap = Immutable
+installLocationIsMutable Local = Mutable
src/Stack/Types/PvpBounds.hs view
@@ -24,13 +24,13 @@   | PvpBoundsUpper
   | PvpBoundsLower
   | PvpBoundsBoth
-  deriving (Bounded, Enum, Eq, Ord, Read, Show, Typeable)
+  deriving (Bounded, Enum, Eq, Ord, Read, Show)
 
 data PvpBounds = PvpBounds
   { pbType :: !PvpBoundsType
   , pbAsRevision :: !Bool
   }
-  deriving (Eq, Ord, Read, Show, Typeable)
+  deriving (Eq, Ord, Read, Show)
 
 pvpBoundsText :: PvpBoundsType -> Text
 pvpBoundsText PvpBoundsNone = "none"
src/Stack/Types/Runner.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 
src/Stack/Types/Snapshot.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE NoImplicitPrelude    #-}
-{-# LANGUAGE DataKinds            #-}
-{-# LANGUAGE GADTs                #-}
 {-# LANGUAGE NoFieldSelectors     #-}
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE TypeFamilies         #-}
@@ -35,7 +33,7 @@ data TypesSnapshotException
   = ParseSnapshotException !Text
   | FilepathInDownloadedSnapshot !Text
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception TypesSnapshotException where
   displayException (ParseSnapshotException t) = concat
src/Stack/Types/Storage.hs view
@@ -22,7 +22,7 @@ -- modules beginning @Stack.Storage@.
 data StoragePrettyException
   = StorageMigrationFailure !Text !(Path Abs File) !SomeException
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty StoragePrettyException where
   pretty (StorageMigrationFailure desc fp ex) =
@@ -64,12 +64,15 @@ 
 instance Exception StoragePrettyException
 
--- | A bit of type safety to ensure we're talking to the right database.
+-- | Type representing SQL database connections to the user database. This
+-- provides a bit of type safety to ensure we're talking to the right database.
 newtype UserStorage = UserStorage
   { userStorage :: Storage
   }
 
--- | A bit of type safety to ensure we're talking to the right database.
+-- | Type representing SQL database connections to the project database for
+-- caches. This provides a bit of type safety to ensure we're talking to the
+-- right database.
 newtype ProjectStorage = ProjectStorage
   { projectStorage :: Storage
   }
src/Stack/Types/TemplateName.hs view
@@ -34,7 +34,7 @@ -- "Stack.Types.TemplateName" module.
 newtype TypeTemplateNameException
   = DefaultTemplateNameNotParsedBug String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception TypeTemplateNameException where
   displayException (DefaultTemplateNameNotParsedBug s) = bugReport "[S-7410]" $
@@ -72,6 +72,7 @@   = GitHub
   | GitLab
   | Bitbucket
+  | Codeberg
   deriving (Eq, Ord, Show)
 
 instance FromJSON TemplateName where
@@ -148,6 +149,7 @@     ["github"    , rest] -> parseRepoPathWithService GitHub rest
     ["gitlab"    , rest] -> parseRepoPathWithService GitLab rest
     ["bitbucket" , rest] -> parseRepoPathWithService Bitbucket rest
+    ["codeberg"  , rest] -> parseRepoPathWithService Codeberg rest
     _                    -> Nothing
 
 -- | Parses a template path of the form @user/template@, given a service
src/Stack/Types/WantedCompilerSetter.hs view
@@ -19,4 +19,4 @@     -- ^ At the command line with --snapshot (or --resolver) option.
   | YamlConfiguration (Maybe (Path Abs File))
     -- ^ Via a configuration file.
-  deriving (Show, Typeable)
+  deriving Show
src/Stack/Uninstall.hs view
@@ -77,7 +77,7 @@              [ flow "(1) the tool's subdirectory;"
              ]
          , hang 4 $ fillSep
-             [ flow "(2) the tool's archive file"
+             [ flow "(2) if present, the tool's archive file"
              , parens (style File "<tool>.tar.xz") <> "; and"
              ]
          , hang 4 $ fillSep
@@ -85,6 +85,7 @@              , parens (style File "<tool>.installed") <> "."
              ]
          ]
+    <> blankLine
     )
  where
   styleShell = style Shell
src/Stack/Unpack.hs view
@@ -39,7 +39,7 @@   | CouldNotParsePackageSelectors [StyleDoc]
   | PackageCandidatesRequireVersions [PackageName]
   | PackageLocationInvalid PackageIdentifierRevision
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty UnpackPrettyException where
   pretty (UnpackDirectoryAlreadyExists dirs) =
src/Stack/Upgrade.hs view
@@ -50,7 +50,7 @@   | CommitsNotFound String String
   | StackInPackageIndexNotFound
   | VersionWithNoRevision
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty UpgradePrettyException where
   pretty SnapshotOptionInvalid =
src/Stack/Upload.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude     #-}
 {-# LANGUAGE DuplicateRecordFields #-}
-{-# LANGUAGE LambdaCase            #-}
 {-# LANGUAGE NoFieldSelectors      #-}
 {-# LANGUAGE OverloadedRecordDot   #-}
 {-# LANGUAGE OverloadedStrings     #-}
@@ -89,7 +88,7 @@   | PackageIdNotSpecifiedForDocsUploadBug
   | PackageIdSpecifiedForPackageUploadBug
   | TarGzFileNameInvalidBug !String
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Pretty UploadPrettyException where
   pretty AuthenticationFailure =
src/System/Process/Pager.hs view
@@ -30,7 +30,7 @@ -- "System.Process.Pager" module.
 data PagerException
   = PagerExitFailure CmdSpec Int
-  deriving (Show, Typeable)
+  deriving Show
 
 instance Exception PagerException where
   displayException (PagerExitFailure cmd n) =
@@ -47,22 +47,21 @@ -- | Run pager, providing a function that writes to the pager's input.
 pageWriter :: (Handle -> IO ()) -> IO ()
 pageWriter writer = do
-  mpager <- runMaybeT $ cmdspecFromEnvVar
-                    <|> cmdspecFromExeName "less"
-                    <|> cmdspecFromExeName "more"
-  case mpager of
-    Just pager ->
-      do (Just h,_,_,procHandle) <- createProcess pager
-                                      { std_in = CreatePipe
-                                      , close_fds = True
-                                      , delegate_ctlc = True
-                                      }
-         (_ :: Either IOException ()) <- try (do writer h
-                                                 hClose h)
-         exit <- waitForProcess procHandle
-         case exit of
-           ExitSuccess -> pure ()
-           ExitFailure n -> throwIO (PagerExitFailure (cmdspec pager) n)
+  let alternatives =
+            cmdspecFromEnvVar
+        <|> cmdspecFromExeName "less"
+        <|> cmdspecFromExeName "more"
+  runMaybeT alternatives >>= \case
+    Just pager -> do
+      (Just h,_,_,procHandle) <- createProcess pager
+                                   { std_in = CreatePipe
+                                   , close_fds = True
+                                   , delegate_ctlc = True
+                                   }
+      (_ :: Either IOException ()) <- try (do writer h; hClose h)
+      waitForProcess procHandle >>= \case
+        ExitSuccess -> pure ()
+        ExitFailure n -> throwIO (PagerExitFailure (cmdspec pager) n)
     Nothing -> writer stdout
  where
   cmdspecFromEnvVar = shell <$> MaybeT (lookupEnv "PAGER")
src/windows/System/Terminal.hs view
@@ -58,8 +58,7 @@             , std_err = CreatePipe
             }
         (_, mbStdout, _, rStty) <- createProcess stty
-        exStty <- waitForProcess rStty
-        case exStty of
+        waitForProcess rStty >>= \case
           ExitFailure _ -> pure Nothing
           ExitSuccess ->
             maybe (pure Nothing)
stack.cabal view
@@ -1,26 +1,34 @@ cabal-version:      2.2 name:               stack-version:            3.7.1+version:            3.9.1 license:            BSD-3-Clause license-file:       LICENSE-maintainer:         manny@fpcomplete.com+maintainer:+    Mike Pilgrem <public@pilgrem.com>,+    Emanuel Borsboom <manny@fpcomplete.com>+ author:             Commercial Haskell SIG homepage:           http://haskellstack.org bug-reports:        https://github.com/commercialhaskell/stack/issues-synopsis:           The Haskell Tool Stack+synopsis:           A program for developing Haskell projects description:-    Please see the documentation at <https://docs.haskellstack.org>-    for usage information.+    Stack (the Haskell Tool Stack) is a program for developing Haskell projects.+    It is aimed at new and experienced users of Haskell and seeks to support them+    fully on Linux, macOS and Windows.     .+    For information about how to use Stack, see <https://docs.haskellstack.org>.+    .     If building a 'stack' executable for distribution, please download the     source code from <https://github.com/commercialhaskell/stack/releases>-    and build it using Stack itself in order to ensure identical behaviour-    to official binaries. This package on Hackage is provided for convenience-    and bootstrapping purposes.+    and build it with Stack in order to ensure identical behaviour to official+    binaries.     .-    Note that the API for the library is not currently stable, and may-    change significantly, even between minor releases. It is-    currently only intended for use by the executable.+    This package is provided on Hackage for convenience and bootstrapping+    purposes.+    .+    Currently, the library exposed by the package is intended for use only by the+    executable. The library's API may change significantly, even between minor+    releases.  category:           Development build-type:         Custom@@ -104,6 +112,7 @@     doc/topics/developing_on_windows.md     doc/topics/docker_integration.md     doc/topics/editor_integration.md+    doc/topics/GHC_from_source.md     doc/topics/haskell_and_c_code.md     doc/topics/index.md     doc/topics/lock_files.md@@ -150,9 +159,9 @@  custom-setup     setup-depends:-        Cabal >=3.10.3.0 && <3.12,+        Cabal >=3.14 && <3.18,         base >=4.14.3.0 && <5,-        filepath >=1.4.301.0+        filepath >=1.5.4.0  flag developer-mode     description: By default, output extra developer information.@@ -237,6 +246,7 @@         Stack.Config.ConfigureScript         Stack.Config.Docker         Stack.Config.Nix+        Stack.ConfigureOpts         Stack.ConfigCmd         Stack.Constants         Stack.Constants.Config@@ -379,6 +389,7 @@         Stack.Types.PackageFile         Stack.Types.PackageName         Stack.Types.ParentMap+        Stack.Types.Plan         Stack.Types.Platform         Stack.Types.Project         Stack.Types.ProjectAndConfigMonoid@@ -417,13 +428,13 @@         Build_stack         Paths_stack -    default-language: GHC2021+    default-language: GHC2024     ghc-options:         -fwrite-ide-info -hiedir=.hie -Wall -Wmissing-export-lists         -optP-Wno-nonportable-include-path -Widentities      build-depends:-        Cabal >=3.8.1.0 && <3.12,+        Cabal >=3.14 && <3.17,         aeson >=2.0.3.0,         aeson-warning-parser >=0.1.1,         ansi-terminal >=1.0.2,@@ -432,66 +443,66 @@         attoparsec >=0.14.4,         base >=4.16.0.0 && <5,         base64-bytestring >=1.2.1.0,-        bytestring >=0.12.1.0,+        bytestring >=0.12.2.0,         casa-client >=0.0.2,         companion >=0.1.0,         conduit >=1.3.6.1,-        conduit-extra >=1.3.7,-        containers >=0.6.8,+        conduit-extra >=1.3.8,+        containers >=0.7,         crypton >=1.0.4,         directory >=1.3.8.5,         echo >=0.1.4,-        exceptions >=0.10.7,-        extra >=1.7.16,+        exceptions >=0.10.9,+        extra >=1.8.1,         file-embed >=0.0.16.0,-        filelock >=0.1.1.7,-        filepath >=1.4.301.0,+        filelock >=0.1.1.8,+        filepath >=1.5.4.0,         fsnotify >=0.4.1,         generic-deriving >=1.14.6,-        ghc-boot >=9.8.4,-        hashable >=1.4.7.0,-        hi-file-parser >=0.1.7.0,+        ghc-boot >=9.10.3,+        hashable >=1.5.0.0,+        hi-file-parser >=0.1.8.0,         hpack >=0.36.0,-        hpc >=0.7.0.0,+        hpc >=0.7.0.2,         http-client >=0.7.19,         http-client-tls >=0.3.6.2,         http-conduit >=2.3.9.1,         http-download >=0.2.1.0,         http-types >=0.12.4,         memory >=0.18.0,-        microlens >=0.4.13.1,+        microlens >=0.4.14.0,         mtl >=2.3.1,         mustache >=2.4.3.1,         neat-interpolation >=0.5.1.4,-        open-browser >=0.2.1.1,+        open-browser >=0.4.0.0,         optparse-applicative >=0.18.1.0,-        pantry >=0.10.1,+        pantry >=0.11.0,         path >=0.9.5,         path-io >=1.8.2,-        persistent >=2.14.0.0 && <2.18,-        persistent-sqlite >=2.13.3.0,+        persistent >=2.14.0.0 && <2.19,+        persistent-sqlite >=2.13.3.1,         pretty >=1.1.3.6,         process >=1.6.13.2,         project-template >=0.2.1.0,         random >=1.2.1.3,-        rio >=0.1.22.0,+        rio >=0.1.22.0 && <0.1.23.0 || >0.1.23.0,         rio-prettyprint >=0.1.8.0,         split >=0.2.5,         stm >=2.5.3.1,         tar >=0.6.2.0,-        template-haskell >=2.21.0.0,-        text >=2.1.1,+        template-haskell >=2.22.0.0,+        text >=2.1.3,         time >=1.12.2,-        transformers >=0.6.1.0,-        unix-compat >=0.7.4,-        unordered-containers >=0.2.20,+        transformers >=0.6.1.1,+        unix-compat >=0.7.4.1,+        unordered-containers >=0.2.20.1,         vector >=0.13.2.0,         yaml >=0.11.11.2,-        zlib >=0.7.1.0+        zlib >=0.7.1.1      if os(windows)         cpp-options:   -DWINDOWS-        build-depends: Win32 >=2.13.4.0+        build-depends: Win32 >=2.14.1.0      else         build-tool-depends: hsc2hs:hsc2hs@@ -545,13 +556,13 @@     hs-source-dirs:   app     other-modules:    Paths_stack     autogen-modules:  Paths_stack-    default-language: GHC2021+    default-language: GHC2024     ghc-options:         -fwrite-ide-info -hiedir=.hie -Wall -Wmissing-export-lists         -optP-Wno-nonportable-include-path -threaded -rtsopts      build-depends:-        Cabal >=3.8.1.0 && <3.12,+        Cabal >=3.14 && <3.17,         aeson >=2.0.3.0,         aeson-warning-parser >=0.1.1,         ansi-terminal >=1.0.2,@@ -560,67 +571,67 @@         attoparsec >=0.14.4,         base >=4.16.0.0 && <5,         base64-bytestring >=1.2.1.0,-        bytestring >=0.12.1.0,+        bytestring >=0.12.2.0,         casa-client >=0.0.2,         companion >=0.1.0,         conduit >=1.3.6.1,-        conduit-extra >=1.3.7,-        containers >=0.6.8,+        conduit-extra >=1.3.8,+        containers >=0.7,         crypton >=1.0.4,         directory >=1.3.8.5,         echo >=0.1.4,-        exceptions >=0.10.7,-        extra >=1.7.16,+        exceptions >=0.10.9,+        extra >=1.8.1,         file-embed >=0.0.16.0,-        filelock >=0.1.1.7,-        filepath >=1.4.301.0,+        filelock >=0.1.1.8,+        filepath >=1.5.4.0,         fsnotify >=0.4.1,         generic-deriving >=1.14.6,-        ghc-boot >=9.8.4,-        hashable >=1.4.7.0,-        hi-file-parser >=0.1.7.0,+        ghc-boot >=9.10.3,+        hashable >=1.5.0.0,+        hi-file-parser >=0.1.8.0,         hpack >=0.36.0,-        hpc >=0.7.0.0,+        hpc >=0.7.0.2,         http-client >=0.7.19,         http-client-tls >=0.3.6.2,         http-conduit >=2.3.9.1,         http-download >=0.2.1.0,         http-types >=0.12.4,         memory >=0.18.0,-        microlens >=0.4.13.1,+        microlens >=0.4.14.0,         mtl >=2.3.1,         mustache >=2.4.3.1,         neat-interpolation >=0.5.1.4,-        open-browser >=0.2.1.1,+        open-browser >=0.4.0.0,         optparse-applicative >=0.18.1.0,-        pantry >=0.10.1,+        pantry >=0.11.0,         path >=0.9.5,         path-io >=1.8.2,-        persistent >=2.14.0.0 && <2.18,-        persistent-sqlite >=2.13.3.0,+        persistent >=2.14.0.0 && <2.19,+        persistent-sqlite >=2.13.3.1,         pretty >=1.1.3.6,         process >=1.6.13.2,         project-template >=0.2.1.0,         random >=1.2.1.3,-        rio >=0.1.22.0,+        rio >=0.1.22.0 && <0.1.23.0 || >0.1.23.0,         rio-prettyprint >=0.1.8.0,         split >=0.2.5,         stack,         stm >=2.5.3.1,         tar >=0.6.2.0,-        template-haskell >=2.21.0.0,-        text >=2.1.1,+        template-haskell >=2.22.0.0,+        text >=2.1.3,         time >=1.12.2,-        transformers >=0.6.1.0,-        unix-compat >=0.7.4,-        unordered-containers >=0.2.20,+        transformers >=0.6.1.1,+        unix-compat >=0.7.4.1,+        unordered-containers >=0.2.20.1,         vector >=0.13.2.0,         yaml >=0.11.11.2,-        zlib >=0.7.1.0+        zlib >=0.7.1.1      if os(windows)         cpp-options:   -DWINDOWS-        build-depends: Win32 >=2.13.4.0+        build-depends: Win32 >=2.14.1.0      else         build-tool-depends: hsc2hs:hsc2hs@@ -653,14 +664,14 @@         Paths_stack      autogen-modules:  Paths_stack-    default-language: GHC2021+    default-language: GHC2024     ghc-options:         -fwrite-ide-info -hiedir=.hie -Wall -Wmissing-export-lists         -optP-Wno-nonportable-include-path -threaded -rtsopts         -with-rtsopts=-N      build-depends:-        Cabal >=3.8.1.0 && <3.12,+        Cabal >=3.14 && <3.17,         aeson >=2.0.3.0,         aeson-warning-parser >=0.1.1,         ansi-terminal >=1.0.2,@@ -669,68 +680,68 @@         attoparsec >=0.14.4,         base >=4.16.0.0 && <5,         base64-bytestring >=1.2.1.0,-        bytestring >=0.12.1.0,+        bytestring >=0.12.2.0,         casa-client >=0.0.2,         companion >=0.1.0,         conduit >=1.3.6.1,-        conduit-extra >=1.3.7,-        containers >=0.6.8,+        conduit-extra >=1.3.8,+        containers >=0.7,         crypton >=1.0.4,         directory >=1.3.8.5,         echo >=0.1.4,-        exceptions >=0.10.7,-        extra >=1.7.16,+        exceptions >=0.10.9,+        extra >=1.8.1,         file-embed >=0.0.16.0,-        filelock >=0.1.1.7,-        filepath >=1.4.301.0,+        filelock >=0.1.1.8,+        filepath >=1.5.4.0,         fsnotify >=0.4.1,         generic-deriving >=1.14.6,-        ghc-boot >=9.8.4,-        hashable >=1.4.7.0,-        hi-file-parser >=0.1.7.0,+        ghc-boot >=9.10.3,+        hashable >=1.5.0.0,+        hi-file-parser >=0.1.8.0,         hpack >=0.36.0,-        hpc >=0.7.0.0,-        hspec >=2.11.12,+        hpc >=0.7.0.2,+        hspec >=2.11.16,         http-client >=0.7.19,         http-client-tls >=0.3.6.2,         http-conduit >=2.3.9.1,         http-download >=0.2.1.0,         http-types >=0.12.4,         memory >=0.18.0,-        microlens >=0.4.13.1,+        microlens >=0.4.14.0,         mtl >=2.3.1,         mustache >=2.4.3.1,         neat-interpolation >=0.5.1.4,-        open-browser >=0.2.1.1,+        open-browser >=0.4.0.0,         optparse-applicative >=0.18.1.0,         optparse-generic >=1.5.2,-        pantry >=0.10.1,+        pantry >=0.11.0,         path >=0.9.5,         path-io >=1.8.2,-        persistent >=2.14.0.0 && <2.18,-        persistent-sqlite >=2.13.3.0,+        persistent >=2.14.0.0 && <2.19,+        persistent-sqlite >=2.13.3.1,         pretty >=1.1.3.6,         process >=1.6.13.2,         project-template >=0.2.1.0,         random >=1.2.1.3,-        rio >=0.1.22.0,+        rio >=0.1.22.0 && <0.1.23.0 || >0.1.23.0,         rio-prettyprint >=0.1.8.0,         split >=0.2.5,         stm >=2.5.3.1,         tar >=0.6.2.0,-        template-haskell >=2.21.0.0,-        text >=2.1.1,+        template-haskell >=2.22.0.0,+        text >=2.1.3,         time >=1.12.2,-        transformers >=0.6.1.0,-        unix-compat >=0.7.4,-        unordered-containers >=0.2.20,+        transformers >=0.6.1.1,+        unix-compat >=0.7.4.1,+        unordered-containers >=0.2.20.1,         vector >=0.13.2.0,         yaml >=0.11.11.2,-        zlib >=0.7.1.0+        zlib >=0.7.1.1      if os(windows)         cpp-options:   -DWINDOWS-        build-depends: Win32 >=2.13.4.0+        build-depends: Win32 >=2.14.1.0      else         build-tool-depends: hsc2hs:hsc2hs@@ -779,14 +790,14 @@         Paths_stack      autogen-modules:    Paths_stack-    default-language:   GHC2021+    default-language:   GHC2024     ghc-options:         -fwrite-ide-info -hiedir=.hie -Wall -Wmissing-export-lists         -optP-Wno-nonportable-include-path -threaded      build-depends:-        Cabal >=3.8.1.0 && <3.12,-        QuickCheck >=2.14.3,+        Cabal >=3.14 && <3.17,+        QuickCheck >=2.15.0.1,         aeson >=2.0.3.0,         aeson-warning-parser >=0.1.1,         ansi-terminal >=1.0.2,@@ -795,69 +806,69 @@         attoparsec >=0.14.4,         base >=4.16.0.0 && <5,         base64-bytestring >=1.2.1.0,-        bytestring >=0.12.1.0,+        bytestring >=0.12.2.0,         casa-client >=0.0.2,         companion >=0.1.0,         conduit >=1.3.6.1,-        conduit-extra >=1.3.7,-        containers >=0.6.8,+        conduit-extra >=1.3.8,+        containers >=0.7,         crypton >=1.0.4,         directory >=1.3.8.5,         echo >=0.1.4,-        exceptions >=0.10.7,-        extra >=1.7.16,+        exceptions >=0.10.9,+        extra >=1.8.1,         file-embed >=0.0.16.0,-        filelock >=0.1.1.7,-        filepath >=1.4.301.0,+        filelock >=0.1.1.8,+        filepath >=1.5.4.0,         fsnotify >=0.4.1,         generic-deriving >=1.14.6,-        ghc-boot >=9.8.4,-        hashable >=1.4.7.0,-        hi-file-parser >=0.1.7.0,+        ghc-boot >=9.10.3,+        hashable >=1.5.0.0,+        hi-file-parser >=0.1.8.0,         hpack >=0.36.0,-        hpc >=0.7.0.0,-        hspec >=2.11.12,+        hpc >=0.7.0.2,+        hspec >=2.11.16,         http-client >=0.7.19,         http-client-tls >=0.3.6.2,         http-conduit >=2.3.9.1,         http-download >=0.2.1.0,         http-types >=0.12.4,         memory >=0.18.0,-        microlens >=0.4.13.1,+        microlens >=0.4.14.0,         mtl >=2.3.1,         mustache >=2.4.3.1,         neat-interpolation >=0.5.1.4,-        open-browser >=0.2.1.1,+        open-browser >=0.4.0.0,         optparse-applicative >=0.18.1.0,-        pantry >=0.10.1,+        pantry >=0.11.0,         path >=0.9.5,         path-io >=1.8.2,-        persistent >=2.14.0.0 && <2.18,-        persistent-sqlite >=2.13.3.0,+        persistent >=2.14.0.0 && <2.19,+        persistent-sqlite >=2.13.3.1,         pretty >=1.1.3.6,         process >=1.6.13.2,         project-template >=0.2.1.0,         random >=1.2.1.3,         raw-strings-qq >=1.1,-        rio >=0.1.22.0,+        rio >=0.1.22.0 && <0.1.23.0 || >0.1.23.0,         rio-prettyprint >=0.1.8.0,         split >=0.2.5,         stack,         stm >=2.5.3.1,         tar >=0.6.2.0,-        template-haskell >=2.21.0.0,-        text >=2.1.1,+        template-haskell >=2.22.0.0,+        text >=2.1.3,         time >=1.12.2,-        transformers >=0.6.1.0,-        unix-compat >=0.7.4,-        unordered-containers >=0.2.20,+        transformers >=0.6.1.1,+        unix-compat >=0.7.4.1,+        unordered-containers >=0.2.20.1,         vector >=0.13.2.0,         yaml >=0.11.11.2,-        zlib >=0.7.1.0+        zlib >=0.7.1.1      if os(windows)         cpp-options:   -DWINDOWS-        build-depends: Win32 >=2.13.4.0+        build-depends: Win32 >=2.14.1.0      else         build-tool-depends: hsc2hs:hsc2hs
stack.yaml view
@@ -1,19 +1,23 @@-snapshot: lts-23.24 # GHC 9.8.4
+snapshot: lts-24.24 # GHC 9.10.3
 
 extra-deps:
-# lts-23.24 provides hpack-0.37.0
-- hpack-0.38.1@rev:0
-# lts-23.24 provides persistent-2.14.6.3
-- persistent-2.17.0.0@rev:0
-# lts-23.24 provides tls-2.1.1
-- tls-2.1.8@rev:0
+# lts-24.24 specifies Cabal-3.12.1.0
+- Cabal-3.16.0.0@sha256:9972c2bd263168a20bd990962a68d4fd024f50c30a00519a6b942e8871d1bd67,14455
+- Cabal-syntax-3.16.0.0@sha256:6a35036763557301876c5b7a448de4f1cb54fe1e223ff6c4c0c1fdd6df635a65,7509
+# lts-24.24 specifies hpack-0.38.3
+- hpack-0.39.1@sha256:d7378debd96e805760540e3640aeda3a1ebee1d000dac99726ed55c827c81a94,5229
+# lts-24.24 specifies pantry-0.10.1
+- pantry-0.11.2@sha256:bc14e75f512deb22e0d9d645e62eb63b319d1732bfed6509491601215ecbd307,7896
+# lts-24.24 specifies persistent-2.17.1.0
+- persistent-2.18.0.0@sha256:baa3e0959cf10bbd1da462efeb61d4f073d0cc924a149325494ba5ce29bc17a4,7096
 
 docker:
   enable: false
-  repo: quay.io/benz0li/ghc-musl:9.8.4
+  repo: quay.io/benz0li/ghc-musl:9.10.3
+
 # See LICENSE. In order to build a statically-linked Stack executable for Linux
 # that is not linked against GMP, use this alternative Docker image:
-# repo: quay.io/benz0li/ghc-musl:9.8.4-int-native
+# repo: quay.io/benz0li/ghc-musl:9.10.3-int-native
 
 nix:
   # --nix on the command-line to enable.
tests/integration/IntegrationSpec.hs view
@@ -162,11 +162,9 @@             }
       runRIO app $ withModifyEnvVars modifyEnvCommon inner
     _ -> do
-      morigStackRoot <- liftIO $ lookupEnv "STACK_ROOT"
-      origStackRoot <-
-        case morigStackRoot of
-          Nothing -> getAppUserDataDirectory "stack"
-          Just x -> pure x
+      origStackRoot <- liftIO (lookupEnv "STACK_ROOT") >>= \case
+        Nothing -> getAppUserDataDirectory "stack"
+        Just x -> pure x
 
       logInfo "Initializing/updating the original Pantry store"
       proc stack ["update"] runProcess_
tests/integration/lib/StackTest.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE ScopedTypeVariables #-}
-
 module StackTest
   ( run'
   , run
@@ -280,7 +278,7 @@ -- the main @stack.yaml@.
 --
 defaultSnapshotArg :: String
-defaultSnapshotArg = "--snapshot=lts-23.24"
+defaultSnapshotArg = "--snapshot=lts-24.24"
 
 -- | Remove a file and ignore any warnings about missing files.
 removeFileIgnore :: HasCallStack => FilePath -> IO ()
tests/unit/Stack/ConfigSpec.hs view
@@ -53,12 +53,12 @@ 
 sampleConfig :: String
 sampleConfig =
-  "snapshot: lts-23.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "packages: ['.']\n"
 
 buildOptsConfig :: String
 buildOptsConfig =
-  "snapshot: lts-23.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "packages: ['.']\n" ++
   "build:\n" ++
   "  library-profiling: true\n" ++
@@ -104,7 +104,7 @@ 
 buildOptsHaddockForHackageConfig :: String
 buildOptsHaddockForHackageConfig =
-  "snapshot: lts-23.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "packages: ['.']\n" ++
   "build:\n" ++
   "  haddock: true\n" ++
@@ -120,24 +120,24 @@ 
 hpackConfig :: String
 hpackConfig =
-  "snapshot: lts-23.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "with-hpack: /usr/local/bin/hpack\n" ++
   "packages: ['.']\n"
 
 resolverConfig :: String
 resolverConfig =
-  "resolver: lts-23.24\n" ++
+  "resolver: lts-24.24\n" ++
   "packages: ['.']\n"
 
 snapshotConfig :: String
 snapshotConfig =
-  "snapshot: lts-23.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "packages: ['.']\n"
 
 resolverSnapshotConfig :: String
 resolverSnapshotConfig =
-  "resolver: lts-23.24\n" ++
-  "snapshot: lts-23.24\n" ++
+  "resolver: lts-24.24\n" ++
+  "snapshot: lts-24.24\n" ++
   "packages: ['.']\n"
 
 stackDotYaml :: Path Rel File
@@ -187,11 +187,11 @@ 
     it "parses snapshot using 'resolver'" $ inTempDir $ do
       loadProject resolverConfig $ \project ->
-        project.snapshot `shouldBe` RSLSynonym (LTS 23 24)
+        project.snapshot `shouldBe` RSLSynonym (LTS 24 24)
 
     it "parses snapshot using 'snapshot'" $ inTempDir $ do
       loadProject snapshotConfig $ \project ->
-        project.snapshot `shouldBe` RSLSynonym (LTS 23 24)
+        project.snapshot `shouldBe` RSLSynonym (LTS 24 24)
 
     it "throws if both 'resolver' and 'snapshot' are present" $ inTempDir $ do
       loadProject resolverSnapshotConfig (const (pure ()))
@@ -314,7 +314,7 @@             packageYaml =
               childRel </> either impureThrow id (parseRelFile "package.yaml")
         createDirectoryIfMissing True $ toFilePath $ parent yamlAbs
-        writeFile (toFilePath yamlAbs) "snapshot: ghc-9.8.4"
+        writeFile (toFilePath yamlAbs) "snapshot: ghc-9.10.3"
         writeFile (toFilePath packageYaml) "name: foo"
         withEnvVar "STACK_YAML" (toFilePath yamlRel) $
           loadConfig' $ \config -> liftIO $ do
tests/unit/Stack/Types/TemplateNameSpec.hs view
@@ -19,6 +19,7 @@         pathOf "github:user/name"     `shouldBe` RepoPath (RepoTemplatePath GitHub    "user" "name.hsfiles")
         pathOf "bitbucket:user/name"  `shouldBe` RepoPath (RepoTemplatePath Bitbucket "user" "name.hsfiles")
         pathOf "gitlab:user/name"     `shouldBe` RepoPath (RepoTemplatePath GitLab    "user" "name.hsfiles")
+        pathOf "codeberg:user/name"   `shouldBe` RepoPath (RepoTemplatePath Codeberg  "user" "name.hsfiles")
 
         pathOf "http://www.com/file"  `shouldBe` UrlPath "http://www.com/file"
         pathOf "https://www.com/file" `shouldBe` UrlPath "https://www.com/file"