Skip to content

Refactor runtime interpreter code

Sylvain Henry requested to merge hsyl20/ghc:hsyl20-iserv-dynflags into master

In #14335 we want to be able to use both the internal interpreter (for the plugins) and the external interpreter (for TH and GHCi) at the same time.

This patch performs some preliminary refactoring: the hsc_interp field of HscEnv replaces hsc_iserv and is now used to indicate which interpreter (internal, external) to use to execute TH and GHCi.

Opt_ExternalInterpreter flag and iserv options in DynFlags are now queried only when we set the session DynFlags. In the future, it would help making GHC multi-target by selecting an interpreter according to the selected target.

Edited by Sylvain Henry

Merge request reports