File tree 3 files changed +7
-10
lines changed
3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,7 @@ main = do
109
109
inh <- getGhcHandle rfd2
110
110
outh <- getGhcHandle wfd1
111
111
installSignalHandlers
112
- lo_ref <- newIORef Nothing
113
- let in_pipe = Pipe {pipeRead = inh, pipeWrite = outh, pipeLeftovers = lo_ref}
112
+ in_pipe <- mkPipeFromHandles inh outh
114
113
115
114
when verbose $
116
115
trace (" Trying to connect to " ++ host_ip ++ " :" ++ (show port))
@@ -307,5 +306,4 @@ socketToPipe sock = do
307
306
hdl <- socketToHandle sock ReadWriteMode
308
307
hSetBuffering hdl NoBuffering
309
308
310
- lo_ref <- newIORef Nothing
311
- pure Pipe { pipeRead = hdl, pipeWrite = hdl, pipeLeftovers = lo_ref }
309
+ mkPipeFromHandles hdl hdl
Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ Library
80
80
directory >= 1.3 && < 1.4 ,
81
81
network >= 2.6 ,
82
82
filepath >= 1.4 && < 1.5 ,
83
- ghci == 9.3 ,
84
- libiserv == 9.3
83
+ ghci
85
84
86
85
Executable iserv-proxy
87
86
Default-Language : Haskell2010
@@ -92,8 +91,7 @@ Executable iserv-proxy
92
91
directory >= 1.3 && < 1.4 ,
93
92
network >= 2.6 ,
94
93
filepath >= 1.4 && < 1.5 ,
95
- ghci == 9.3 ,
96
- libiserv == 9.3 ,
94
+ ghci,
97
95
iserv-proxy
98
96
99
97
Executable iserv-proxy-interpreter
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ module IServ.Remote.Interpreter where
3
3
4
4
import Network.Socket
5
5
6
- import IServ (serv )
6
+ import GHCi.Server (serv )
7
+ import GHCi.Message
7
8
import IServ.Remote.Message
8
9
9
10
import System.IO
@@ -153,7 +154,7 @@ socketToPipe sock = do
153
154
hSetBuffering hdl NoBuffering
154
155
155
156
lo_ref <- newIORef Nothing
156
- pure Pipe { pipeRead = hdl, pipeWrite = hdl, pipeLeftovers = lo_ref }
157
+ mkPipeFromHandles hdl hdl
157
158
158
159
acceptSocket :: Socket -> IO Socket
159
160
acceptSocket = fmap fst . accept
You can’t perform that action at this time.
0 commit comments