withSocketsDo +network

withSocketsDo :: IO a -> IO a
network Network.Socket.Internal, network Network.Socket, network Network
On Windows operating systems, the networking subsystem has to be initialised using withSocketsDo before any networking operations can be used. eg. > main = withSocketsDo $ do {...} Although this is only strictly necessary on Windows platforms, it is harmless on other platforms, so for portability it is good practice to use it all the time.