Skip to content

improve .ghci load order and safety

Fraser Tweedale requested to merge (removed):dotghci-enhancements into master

These commits fix the load order of .ghci files so that local .ghci files are processed after global and user config. This fixes the surprising behaviour that user configuration can override project-specific configuration.

These commits also introduce a new config: :set local-config { source | ignore }, to control whether local .ghci is sourced or not. (Sourcing an untrusted local .ghci is a security issue).

The default remains to source local .ghci. If there is appetite to change that (I urge it!) I shall do that in a separate commit.

Fixes: #14689 (closed)

Related: #6017

Related: #14250 (closed)

Merge request reports