Sockets on Solaris

Luis Diego Fallas
Tue, 6 Nov 2001 16:57:19 -0800 (PST)

Hi everyone,

    I'm having trouble using the Socket module on

The following program:

import System
import Socket
import IO

main =
    d <- connectTo "localhost" (PortNumber  80)
    hPutStr d "GET / HTTP/1.0\n\n"
    hFlush d
    c  <- (hGetContents d)
    putStr c

fails with:

Fail: invalid argument
Action: getSocketOption
Reason: Invalid argument

I'm using ghc-5.02.1 .


Do You Yahoo!?
Find a job, post your resume.