ghci: Don't rely on resolution of System.IO to base module
authorBen Gamari <ben@smart-cactus.org>
Sun, 16 Jun 2019 15:15:11 +0000 (11:15 -0400)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Sat, 22 Jun 2019 14:06:05 +0000 (10:06 -0400)
commit655c6e265e06acbebcb6f9aa084efb3ce933e189
treee916c8cfbc01efffa8261e174a5ccc3d723be165
parente0595d22ce5bc19699079abdb47377b5707cdbbc
ghci: Don't rely on resolution of System.IO to base module

Previously we would hackily evaluate a textual code snippet to compute
actions to disable I/O buffering and flush the stdout/stderr handles.
This broke in a number of ways (#15336, #16563).

Instead we now ship a module (`GHC.GHCi.Helpers`) with `base` containing
the needed actions. We can then easily refer to these via `Orig` names.
13 files changed:
compiler/prelude/PrelNames.hs
ghc/GHCi/UI/Monad.hs
libraries/base/GHC/GHCi/Helpers.hs [new file with mode: 0644]
libraries/base/base.cabal
testsuite/tests/ghci.debugger/scripts/break006.stdout
testsuite/tests/ghci.debugger/scripts/break013.stdout
testsuite/tests/ghci.debugger/scripts/hist001.stdout
testsuite/tests/ghci.debugger/scripts/hist002.stdout
testsuite/tests/ghci/scripts/T4175.stdout
testsuite/tests/ghci/scripts/T7627.stdout
testsuite/tests/ghci/scripts/T8469.stdout
testsuite/tests/ghci/scripts/ghci011.stdout
testsuite/tests/ghci/scripts/ghci064.stdout