Add hooks to allow bypassing the FinderCache
The FinderCache
is a bit of mutable state we carry around throughout the frontend pipeline, but initialising/updating/clearing it is managed by the driver in quite a subtle way. This does not work well for GHC API clients that don't use the GHC driver and define their own downsweep, as managing the FinderCache can be a source of bugs and inefficiencies.
We should provide an API (possibly via additonal Hooks
) that allow GHC API clients to override lookups in the cache and handle it via their own internal state, instead of using the state of the FinderCache
in the HscEnv
.