Conversation
d8da75a to
d767796
Compare
|
@fendor the reason why d767796 still has one testsuite failure is because of orphan instances not being available by default, even if we fully resolve the name of the method being compiled. So, if we don't set the context to include the hs debugger view modules, we will still display the non-orphan instances properly (because depending on the method name or type with instance means we forcibly load those instances into scope); but not so for the orphan instances to which there are no references anywhere. Is there a way to force certain modules to be included in the orphan instances set? Or perhaps we should go back to the design of setting all haskell-debugger-view modules in the context... we just have to figure out why that wasn't working right. (related: #243) |
When we compile at runtime function applications of debugValue/debugFields to some runtime heap value, we *already* qualify it with the exact unit-id we discovered at setup for the haskell-debugger-view (either one in the dependencies closure or an in-memory one). So, why did we add those modules to the interactive context with `setContext` too? Historial accident. Previously, naming a variable in the REPL didn't print it with the debug view, so perhaps it'd be useful to have the debugView functions in the environment; second, probably because we didn't realize the full qualification of the methods in `findDebugViewInstance` originally were sufficient. Removing these imports also means we won't introduce potential conflicts unnecessarily. Fixes #224
This reverts commit d767796. We must still add the debugger-view modules to the context because otherwise the built-in orphan instances (e.g. for `Text`) are not made available.
Previously, they were just being added to each home unit's dflags but not to the interactive unit's dflags. Now that we do not forget the flags, we need to drop the -fno-it we were adding previously (that was completely ignored before); since we depend on binding @it@ to bind variables at the REPL on every evaluation!
5e45cb2 to
680cb78
Compare
Trying to fix #234, potentially #238 at the same time