Skip to content

Give plugins a better interface (#17957)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/plugins-type into master

Plugins were directly fetched from HscEnv (hsc_static_plugins and hsc_plugins). The tight coupling of plugins and of HscEnv is undesirable and it's better to store them in a new Plugins datatype and to use it in the plugins' API (e.g. withPlugins, mapPlugins...).

In the process, the interactive context (used by GHCi) got proper support for different static plugins than those used for loaded modules.

(Preliminary refactoring for #14335)

Merge request reports