Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Improve GHC's ghc package environment lookup logic
Documentation for package enviroments which describes the current lookup logic: https://downloads.haskell.org/\~ghc/latest/docs/html/users_guide/packages.html\#package-environments There's two things I'd like to improve: 1. Define a special magic "null" environment, which instructs GHC to ignore any package environment files. To this end, I propose to use the name `-` (i.e. a single dash), as that is more portable than using the empty string for environment variables. In other words: - `-package-env -` or - `GHC_ENVIRONMENT=-` (unless a `-package-env` flag which has higher priority overrides it) would prevent GHC from interpreting any package environment files. 1. Provide a way to disambiguate environment names (i.e. those that are looked up in `$HOME/.ghc/arch-os-version/environments/name`) and environment files arguments. Currently, if you say `GHC_ENVIRONMENT=test` then a local file `test` would shadow the environment named `test` which would result in rather confusing errors. Instead I suggest to have package-env identifiers be interpreted as "names" by default, and only if they look like relative or absolute paths (i.e. `./foobar` or `/home/foo/...`) be interpreted as file locations (relative to $CWD). <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | -------------- | | Version | 8.0.1 | | Type | FeatureRequest | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Compiler | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Improve GHC's ghc package environment lookup logic","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.2.2","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Documentation for package enviroments which describes the current lookup logic: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/packages.html#package-environments\r\n\r\nThere's two things I'd like to improve:\r\n\r\n 1. Define a special magic \"null\" environment, which instructs GHC to ignore any package environment files.\r\n To this end, I propose to use the name `-` (i.e. a single dash), as that is more portable than using the empty string for environment variables. In other words:\r\n * `-package-env -` or\r\n * `GHC_ENVIRONMENT=-` (unless a `-package-env` flag which has higher priority overrides it)\r\n would prevent GHC from interpreting any package environment files.\r\n\r\n 2. Provide a way to disambiguate environment names (i.e. those that are looked up in `$HOME/.ghc/arch-os-version/environments/name`) and environment files arguments.\r\n Currently, if you say `GHC_ENVIRONMENT=test` then a local file `test` would shadow the environment named `test` which would result in rather confusing errors. Instead I suggest to have package-env identifiers be interpreted as \"names\" by default, and only if they look like relative or absolute paths (i.e. `./foobar` or `/home/foo/...`) be interpreted as file locations (relative to $CWD).","type_of_failure":"OtherFailure","blocking":[]} -->
issue