File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -317,16 +317,16 @@ followAddrInfo ptr_ai
317
317
| otherwise = do
318
318
a <- peek ptr_ai
319
319
ptr <- (# peek struct addrinfo, ai_next) ptr_ai
320
- go ptr a
320
+ (a :| ) <$> go ptr
321
321
where
322
- go :: Ptr AddrInfo -> AddrInfo -> IO ( NonEmpty AddrInfo )
323
- go ptr a
324
- | ptr == nullPtr = return $ NE. singleton a
322
+ go :: Ptr AddrInfo -> IO [ AddrInfo ]
323
+ go ptr
324
+ | ptr == nullPtr = return []
325
325
| otherwise = do
326
326
a' <- peek ptr
327
327
ptr' <- (# peek struct addrinfo, ai_next) ptr
328
- as <- go ptr' a '
329
- return $ NE. cons a as
328
+ as' <- go ptr'
329
+ return (a' : as')
330
330
331
331
foreign import ccall safe " hsnet_getaddrinfo"
332
332
c_getaddrinfo :: CString -> CString -> Ptr AddrInfo -> Ptr (Ptr AddrInfo )
You can’t perform that action at this time.
0 commit comments