Skip to content
Snippets Groups Projects
Commit e9b7802b authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

ghci: Serialise mi_top_env

When loading core from interface files (or from a bytecode object in
future) it's important to store what the top-level context of a module
is.
Otherwise, when you load the module into GHCi from the interface files,
only exported identifiers from the top-level module are in scope on the
repl.

See the added test which demonstrates what this enables.

The context at the GHCi prompt is everything that's in-scope in the
TopEnvIface module. Since TopEnvIface imports identifier "a", we can
evaluate "a" in the repl.

In addition to all this, we can use this information in order to
implement reifyModule in a more principled manner.

This becomes even more important when you're debugging and what to set
break-points on functions which are not imported.
parent c331eebf
No related branches found
No related tags found
Loading
Showing
with 156 additions and 56 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment