RE: Socket.hs problem under Windows 2000

You need to init WinSock first, i.e., main = withSocketsDo $ do {...} --sigbjorn Martijn [mailto:martijn@cs.uu.nl] writes:
Hi,
I'm trying to set up some socket connections with Haskell on a Windows 2000 platform, but I can't seem to get them working.
My program is rather simple: -- import Socket
main = do { socket <- listenOn (PortNumber 1234) ; return () } --
I know this shouldn't do anything at all, but instead it gives an error message:
Fail: does not exist Action: getProtocolByName Reason: no such protocol entry
I get the same message for any socket operation I try to perform. Also a basic call like getHostName from module BSD does not work. I've compiled with ghc version 4.05 with option "-syslib misc"
Should I compile differently, is this a problem with CygWin, or am I overlooking something?
TIA, Martijn Schrage
participants (1)
-
Sigbjorn Finne