Fix #16392: revertCAFs in external interpreter when necessary
authorPhuong Trinh <lolotp@fb.com>
Tue, 5 Mar 2019 15:48:46 +0000 (15:48 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Thu, 7 Mar 2019 19:01:42 +0000 (14:01 -0500)
commit7a68254a7284db5bf8f1fa82aba4a6825d8f050a
treef5c7e7a51f305514376f4ff09b63465b93621e96
parent25c3dd39f7d446f66b5c967be81f80cd7facb509
Fix #16392: revertCAFs in external interpreter when necessary

We revert CAFs when loading/adding modules in ghci (presumably to refresh
execution states and to allow for object code to be unloaded from the runtime).
However, with `-fexternal-interpreter` enabled, we are only doing it in the
ghci process instead of the external interpreter process where the cafs are
allocated and computed. This makes sure that revertCAFs is done in the
appropriate process no matter if that flag is present or not.
ghc/GHCi/UI/Monad.hs
libraries/ghci/GHCi/Message.hs
libraries/ghci/GHCi/Run.hs
testsuite/tests/ghci/T16392/A.hs [new file with mode: 0644]
testsuite/tests/ghci/T16392/T16392.script [new file with mode: 0644]
testsuite/tests/ghci/T16392/T16392.stderr [new file with mode: 0644]
testsuite/tests/ghci/T16392/T16392.stdout [new file with mode: 0644]
testsuite/tests/ghci/T16392/all.T [new file with mode: 0644]