Keep old bindings until :load succeeds
|Reported by:||tibbe||Owned by:|
|Keywords:||Cc:||jonas.duregard@…, patrick@…, etienne@…, bgamari@…|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Imagine you make a change to a module which is already loaded into GHCi and then try to
:load it again. If the load fails not only will you not have the new bindings but the old ones are lost as well. This prevents you from e.g. using
:type to figure out why your new change doesn't type check.
A more ambitious solution would be to try to incrementally load the module and keep all bindings up to the one that fails (and its dependents.) This would allow you to debug the failure more interactively (e.g. compose functions and look at their combined types.) This is probably trickier as previous bindings might be invalidated.