Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re #292: GHC.IO.Handle.utf8 --> GHC.IO.Encoding.utf8 #296

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ghci-wrapper/src/Language/Haskell/GhciWrapper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ new Config{..} args_ = do
setMode stdout_
let interpreter = Interpreter {hIn = stdin_, hOut = stdout_, process = processHandle}
_ <- eval interpreter "import qualified System.IO"
_ <- eval interpreter "import qualified GHC.IO.Encoding"
_ <- eval interpreter "import qualified GHC.IO.Handle"
-- The buffering of stdout and stderr is NoBuffering
_ <- eval interpreter "GHC.IO.Handle.hDuplicateTo System.IO.stdout System.IO.stderr"
Expand All @@ -66,8 +67,8 @@ new Config{..} args_ = do

-- this is required on systems that don't use utf8 as default encoding (e.g.
-- Windows)
_ <- eval interpreter "GHC.IO.Handle.hSetEncoding System.IO.stdout GHC.IO.Handle.utf8"
_ <- eval interpreter "GHC.IO.Handle.hSetEncoding System.IO.stderr GHC.IO.Handle.utf8"
_ <- eval interpreter "GHC.IO.Handle.hSetEncoding System.IO.stdout GHC.IO.Encoding.utf8"
_ <- eval interpreter "GHC.IO.Handle.hSetEncoding System.IO.stderr GHC.IO.Encoding.utf8"

_ <- eval interpreter ":m - System.IO"
_ <- eval interpreter ":m - GHC.IO.Handle"
Expand Down