diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-03-15 18:19:16 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-23 13:01:15 -0400 |
commit | 05c5c0549bee022be84344cef46f0eded5564c3b (patch) | |
tree | 1c50af925a1993c602b78c96155126b65c477af7 /utils | |
parent | 7a6577513633b943202fc82ab7aa162e1d293c0a (diff) | |
download | haskell-05c5c0549bee022be84344cef46f0eded5564c3b.tar.gz |
Move loader state into Interp
The loader state was stored into HscEnv. As we need to have two
interpreters and one loader state per interpreter in #14335, it's
natural to make the loader state a field of the Interp type.
As a side effect, many functions now only require a Interp parameter
instead of HscEnv. Sadly we can't fully free GHC.Linker.Loader of HscEnv
yet because the loader is initialised lazily from the HscEnv the first
time it is used. This is left as future work.
HscEnv may not contain an Interp value (i.e. hsc_interp :: Maybe Interp).
So a side effect of the previous side effect is that callers of the
modified functions now have to provide an Interp. It is satisfying as it
pushes upstream the handling of the case where HscEnv doesn't contain an
Interpreter. It is better than raising a panic (less partial functions,
"parse, don't validate", etc.).
Diffstat (limited to 'utils')
0 files changed, 0 insertions, 0 deletions