daml/compiler/repl-service
Moritz Kiefer 275eaedd2a
Fix closure references in Daml Repl (#8950)
* Fix closure references in Daml Repl

Turns out the comment "we probably need to extend this to merge the
modules from each line" was exactly correct: If the result evaluates
to a closure (or a value including a closure), it can reference
definitions from the current module. This happens if the simplifier
lifted something out of the current definition (otherwise we have only
one and it cannot be recursive so no chance of leaking a reference).

This PR fixes this by checking whether the result references the
current module and if it does, we keep it around.

changelog_begin
changelog_end

* Address review comments

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end
2021-02-26 13:29:42 +00:00
..
client Upgrade nixpkgs (#8190) 2021-02-08 11:12:07 +00:00
protos Fix closure references in Daml Repl (#8950) 2021-02-26 13:29:42 +00:00
server Fix closure references in Daml Repl (#8950) 2021-02-26 13:29:42 +00:00