[Haskell-cafe] Problem with System.Timeout in Windows

Adolfo Builes builes.adolfo at googlemail.com
Thu Aug 5 01:35:13 EDT 2010


Hi All:

I have been trying to use System.timeout in windows, but for some
reason it doesn't work, a concrete example is:

import Network.HTTP
import System.Timeout

main = do
  rsp <- timeout 10000000  $ simpleHTTP $ getRequest "http://10.1.2.3"
  case rsp of
    Just rsp -> print $ show  rsp
    Nothing  -> error "Nothing"

In this case I would expect to receive "Nothing" after 10 seconds, but
it ignores the timeout function.

I'm compiling with -threaded, but it does not work either, I'm using ghc 6.12.2.

Does someone know what could be going wrong ?

Thanks !


More information about the Haskell-Cafe mailing list