Skip to content

Commit 7c39d6f

Browse files
committed
Update the code for GHC 9.13
1 parent 123190b commit 7c39d6f

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

Main.hs

+2-4
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ main = do
109109
inh <- getGhcHandle rfd2
110110
outh <- getGhcHandle wfd1
111111
installSignalHandlers
112-
lo_ref <- newIORef Nothing
113-
let in_pipe = Pipe{pipeRead = inh, pipeWrite = outh, pipeLeftovers = lo_ref}
112+
in_pipe <- mkPipeFromHandles inh outh
114113

115114
when verbose $
116115
trace ("Trying to connect to " ++ host_ip ++ ":" ++ (show port))
@@ -307,5 +306,4 @@ socketToPipe sock = do
307306
hdl <- socketToHandle sock ReadWriteMode
308307
hSetBuffering hdl NoBuffering
309308

310-
lo_ref <- newIORef Nothing
311-
pure Pipe{ pipeRead = hdl, pipeWrite = hdl, pipeLeftovers = lo_ref }
309+
mkPipeFromHandles hdl hdl

iserv-proxy.cabal

+2-4
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ Library
8080
directory >= 1.3 && < 1.4,
8181
network >= 2.6,
8282
filepath >= 1.4 && < 1.5,
83-
ghci == 9.3,
84-
libiserv == 9.3
83+
ghci
8584

8685
Executable iserv-proxy
8786
Default-Language: Haskell2010
@@ -92,8 +91,7 @@ Executable iserv-proxy
9291
directory >= 1.3 && < 1.4,
9392
network >= 2.6,
9493
filepath >= 1.4 && < 1.5,
95-
ghci == 9.3,
96-
libiserv == 9.3,
94+
ghci,
9795
iserv-proxy
9896

9997
Executable iserv-proxy-interpreter

src/IServ/Remote/Interpreter.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ module IServ.Remote.Interpreter where
33

44
import Network.Socket
55

6-
import IServ (serv)
6+
import GHCi.Server (serv)
7+
import GHCi.Message
78
import IServ.Remote.Message
89

910
import System.IO
@@ -153,7 +154,7 @@ socketToPipe sock = do
153154
hSetBuffering hdl NoBuffering
154155

155156
lo_ref <- newIORef Nothing
156-
pure Pipe{ pipeRead = hdl, pipeWrite = hdl, pipeLeftovers = lo_ref }
157+
mkPipeFromHandles hdl hdl
157158

158159
acceptSocket :: Socket -> IO Socket
159160
acceptSocket = fmap fst . accept

0 commit comments

Comments
 (0)