summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-05-10 11:24:30 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2023-05-10 11:30:06 +0100
commita930c3ab0a4c36e39fde809f89b1b9d108405f8c (patch)
treee0a94dba68cb62577f6343d3183340c47798c48d
parent1e6861dd8612d8f71cc4635c4f73f84f316a6c7e (diff)
downloadhaskell-wip/tmpdir.tar.gz
docs: Document that TMP/TEMP/USERPROFILE are consulted for temporary directory on windowswip/tmpdir
It confused me that the TMPDIR variable worked on windows but not on linux. Our implementation relies on the directory implementation of `getTemporaryDirectory` which consults these variables so I have reflected that in our documentation.
-rw-r--r--docs/users_guide/separate_compilation.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/users_guide/separate_compilation.rst b/docs/users_guide/separate_compilation.rst
index abcc2f3e31..123ea017fc 100644
--- a/docs/users_guide/separate_compilation.rst
+++ b/docs/users_guide/separate_compilation.rst
@@ -542,9 +542,17 @@ Redirecting temporary files
.. index::
single: TMPDIR environment variable
- Alternatively, use your :envvar:`TMPDIR` environment variable. Set it to the
- name of the directory where temporary files should be put. GCC and other
- programs will honour the :envvar:`TMPDIR` variable as well.
+ Alternatively, on unix, use your :envvar:`TMPDIR` environment variable. Set it to the
+ name of the directory where temporary files should be put.
+
+ On Windows the environment variables :envvar:`TMP`, :envar:`TEMP`,
+ :envvar:`USERPROFILE` are consulted in that order in order to determine the
+ directory for temporary files.
+
+ The cross-platform way to specify the temporary directory is to use the
+ command-line flag.
+
+
.. _hi-options: