@@ -980,18 +980,45 @@ Stack's defaults differ between Unix-like operating systems and Windows.
980980
981981 The MSYS2 tool is also installed in the Stack 'programs' directory.
982982
983- !!! warning
983+ !!! warning "Space character in the path to Stack's 'programs' directory"
984984
985985 If there is a space character in the path to Stack's 'programs'
986- directory this may cause problems with building packages that make use
987- of the GNU project's `autoconf` package and `configure` shell script
988- files. That may be the case particularly if there is no corresponding
989- short name ('8 dot 3' name) for the directory in the path with the space
990- (which may be the case if '8 dot 3' names have been stripped or their
991- creation not enabled by default). If there are problems building, it
992- will be necessary to specify an alternative path that does not contain
993- space characters. Examples of packages on Hackage that make use of
994- `configure` are `network` and `process`.
986+ directory this may cause problems:
987+
988+ * with building packages that make use of the GNU project's `autoconf`
989+ package and `configure` shell script files. That may be the case
990+ particularly if there is no corresponding short name ('8 dot 3'
991+ name) for the directory in the path with the space (which may be the
992+ case if '8 dot 3' names have been stripped or their creation not
993+ enabled by default). Examples of packages on Hackage that make use
994+ of `configure` are `network` and `process`; and
995+
996+ * building with GHC 9.4.1 and later. These versions of GHC have a bug
997+ which means they do not work if the path to the `ghc` executable has
998+ a space in it.
999+
1000+ The default location for Stack's 'programs' directory will have a space
1001+ in the path if the value of the `USERNAME` environment variable includes
1002+ a space.
1003+
1004+ If there are problems building, it will be necessary to specify an
1005+ alternative path that does not contain spaces. For example, the
1006+ `programs` directory in the [Stack root](../../topics/stack_root.md)
1007+ (assuming that path is space-free). For example, if the relevant
1008+ directory is `C:\sr\programs`, add:
1009+ ~~~yaml
1010+ local-program-paths: C:\sr\programs
1011+ ~~~
1012+
1013+ to Stack's [global configuration](https://docs.haskellstack.org/en/stable/configure/yaml/#location-of-global-configuration)
1014+ file (`config.yaml`).
1015+
1016+ If that global configuration file does not yet exist, command:
1017+ ~~~text
1018+ stack --no-install-ghc setup
1019+ ~~~
1020+
1021+ to cause Stack to create it (without also installing GHC).
9951022
9961023## modify-code-page
9971024
0 commit comments