@@ -932,18 +932,45 @@ Stack's defaults differ between Unix-like operating systems and Windows.
932
932
933
933
The MSYS2 tool is also installed in the Stack 'programs' directory.
934
934
935
- !!! warning
935
+ !!! warning "Space character in the path to Stack's 'programs' directory"
936
936
937
937
If there is a space character in the path to Stack's 'programs'
938
- directory this may cause problems with building packages that make use
939
- of the GNU project's `autoconf` package and `configure` shell script
940
- files. That may be the case particularly if there is no corresponding
941
- short name ('8 dot 3' name) for the directory in the path with the space
942
- (which may be the case if '8 dot 3' names have been stripped or their
943
- creation not enabled by default). If there are problems building, it
944
- will be necessary to specify an alternative path that does not contain
945
- space characters. Examples of packages on Hackage that make use of
946
- `configure` are `network` and `process`.
938
+ directory this may cause problems:
939
+
940
+ * with building packages that make use of the GNU project's `autoconf`
941
+ package and `configure` shell script files. That may be the case
942
+ particularly if there is no corresponding short name ('8 dot 3'
943
+ name) for the directory in the path with the space (which may be the
944
+ case if '8 dot 3' names have been stripped or their creation not
945
+ enabled by default). Examples of packages on Hackage that make use
946
+ of `configure` are `network` and `process`; and
947
+
948
+ * building with GHC 9.4.1 and later. These versions of GHC have a bug
949
+ which means they do not work if the path to the `ghc` executable has
950
+ a space in it.
951
+
952
+ The default location for Stack's 'programs' directory will have a space
953
+ in the path if the value of the `USERNAME` environment variable includes
954
+ a space.
955
+
956
+ If there are problems building, it will be necessary to specify an
957
+ alternative path that does not contain spaces. For example, the
958
+ `programs` directory in the [Stack root](../../topics/stack_root.md)
959
+ (assuming that path is space-free). For example, if the relevant
960
+ directory is `C:\sr\programs`, add:
961
+ ~~~yaml
962
+ local-program-paths: C:\sr\programs
963
+ ~~~
964
+
965
+ to Stack's [global configuration](https://docs.haskellstack.org/en/stable/configure/yaml/#location-of-global-configuration)
966
+ file (`config.yaml`).
967
+
968
+ If that global configuration file does not yet exist, command:
969
+ ~~~text
970
+ stack --no-install-ghc setup
971
+ ~~~
972
+
973
+ to cause Stack to create it (without also installing GHC).
947
974
948
975
=== "Windows (Command Prompt)"
949
976
0 commit comments