Load order of .ghci config files is counterintuitive
Basically ghci seems to give precedence to global .ghci conguration settings by applying them after any local/project specific .ghci files:
https://github.com/ghc/ghc/blob/314bc31489f1f4cd69e913c3b1e33236b2bdf553/ghc/GHCi/UI.hs#L561
OTOH there are a couple of open issues where people dont like the idea of local ghci evaluation for security reasons:
I suggest the following resolution:
- Change the order or evaluation from global first to local
- include a new ghci setting that prevents/enables the evaluation of local/project specific .ghci files for people who wish to avoid the security concerns some people have
- This flag can then be set in the global .ghci file
I believe this would both address the counterintuitive loading strategy implied currently (i was convinced local .ghci files didnt work because when i changed the prompt it was always overwritten by my global config) and the security question.
The only question then would be if evaluation of project/local .ghci files would be on or off by default. I would favour the former but that is just personal preference.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |