diff options
author | Gauvain 'GovanifY' Roussel-Tarbouriech <gauvain@govanify.com> | 2020-12-05 23:02:44 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-18 13:46:19 -0500 |
commit | 763d28551de32377a1dca8bdde02979e3686f400 (patch) | |
tree | b96de6da511d3fc2f7b29260d8250afb787df758 /docs/users_guide | |
parent | 2adfb404111c220ef4df0206d9cda20c2fe5db46 (diff) | |
download | haskell-763d28551de32377a1dca8bdde02979e3686f400.tar.gz |
directory: ensure xdg compliance (Fix #6077)
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/9.2.1-notes.rst | 4 | ||||
-rw-r--r-- | docs/users_guide/ghci.rst | 4 | ||||
-rw-r--r-- | docs/users_guide/packages.rst | 12 |
3 files changed, 12 insertions, 8 deletions
diff --git a/docs/users_guide/9.2.1-notes.rst b/docs/users_guide/9.2.1-notes.rst index a29a744f8b..e06aa5b11b 100644 --- a/docs/users_guide/9.2.1-notes.rst +++ b/docs/users_guide/9.2.1-notes.rst @@ -101,6 +101,10 @@ GHCi :envvar:`EDITOR`, following UNIX convention. (:ghc-ticket:`19030`) +- GHC now follows by default the XDG Base Directory Specification. If + ``$HOME/.ghc`` is found it will fallback to the old paths to give you + time to migrate. This fallback will be removed in three releases. + Runtime system ~~~~~~~~~~~~~~ diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index 6ff9c1f20a..f32692f472 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -2063,7 +2063,7 @@ mostly obvious. :reverse: -fno-local-ghci-history :category: - By default, GHCi keeps global history in ``~/.ghc/ghci_history`` or + By default, GHCi keeps global history in ``$XDG_DATA_HOME/ghc/ghci_history`` or ``%APPDATA%/<app>/ghci_history``, but you can use current directory, e.g.: .. code-block:: none @@ -3248,7 +3248,7 @@ they exist: Unix or :file:`C:/Documents and Settings/user/Application Data/ghc` on Windows. -2. :file:`$HOME/.ghci` +2. :file:`$XDG_CONFIG_HOME/.ghci` 3. :file:`./.ghci` diff --git a/docs/users_guide/packages.rst b/docs/users_guide/packages.rst index 75774c8055..f24275311b 100644 --- a/docs/users_guide/packages.rst +++ b/docs/users_guide/packages.rst @@ -393,7 +393,7 @@ GHC knows about two package databases in particular: e.g. ``/usr/lib/ghc-6.12.1/package.conf.d``. - The *user package database* private to each user. On Unix systems this will - be ``$HOME/.ghc/arch-os-version/package.conf.d``, and on Windows it will + be ``$XDG_DATA_HOME/ghc/arch-os-version/package.conf.d``, and on Windows it will be something like ``C:\Documents And Settings\user\ghc\package.conf.d``. The ``ghc-pkg`` tool knows where this file should be located, and will @@ -515,7 +515,7 @@ The ``GHC_PACKAGE_PATH`` environment variable .. code-block:: none - $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf: + $ export GHC_PACKAGE_PATH=$XDG_DATA_HOME/.my-ghc-packages.conf: To check whether your `GHC_PACKAGE_PATH` setting is doing the right thing, ``ghc-pkg list`` will list all the databases in use, in the @@ -578,7 +578,7 @@ must be relative to the location of the package environment file. :category: Use the package environment in ⟨file⟩, or in - ``$HOME/.ghc/arch-os-version/environments/⟨name⟩`` + ``$XDG_DATA_HOME/ghc/arch-os-version/environments/⟨name⟩`` If set to ``-`` no package environment is read. .. envvar:: GHC_ENVIRONMENT @@ -591,13 +591,13 @@ locations: - File ⟨file⟩ if you pass the option :ghc-flag:`-package-env ⟨file⟩|⟨name⟩`. -- File ``$HOME/.ghc/arch-os-version/environments/name`` if you pass the +- File ``$XDG_DATA_HOME/ghc/arch-os-version/environments/name`` if you pass the option ``-package-env ⟨name⟩``. - File ⟨file⟩ if the environment variable :envvar:`GHC_ENVIRONMENT` is set to ⟨file⟩. -- File ``$HOME/.ghc/arch-os-version/environments/name`` if the +- File ``$XDG_DATA_HOME/ghc/arch-os-version/environments/name`` if the environment variable :envvar:`GHC_ENVIRONMENT` is set to ⟨name⟩. Additionally, unless ``-hide-all-packages`` is specified ``ghc`` will also @@ -606,7 +606,7 @@ look for the package environment in the following locations: - File ``.ghc.environment.arch-os-version`` if it exists in the current directory or any parent directory (but not the user's home directory). -- File ``$HOME/.ghc/arch-os-version/environments/default`` if it +- File ``$XDG_DATA_HOME/ghc/arch-os-version/environments/default`` if it exists. Package environments can be modified by further command line arguments; |