Re: [Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-16 Thread Ian Lynagh
Hi Scott, On Mon, Apr 09, 2007 at 10:03:55AM -0600, Scott Bell wrote: Have you got a complete (but preferably small) program showing the problem? Great example, thanks! Sorry for the delay in tracking it down. main :: IO () main = do (_, h, _, p) - runInteractiveCommand telnet nyx.nyx.net

Re: [Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-09 Thread Scott Bell
Have you got a complete (but preferably small) program showing the problem? Ian, Here is the source and behavior that I'm seeing (Linux x86, under both 6.6 and 6.7-20070404: module Main where import System.IO import System.IO.Unsafe import System.Process import Text.ParserCombinators.Parsec

[Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-07 Thread Scott Bell
you should write compiler version and OS for such problems. Of course, this was 6.7-20070404 on Linux x86. I haven't had a change to test it on my 6.6 build. I/O in Windows threaded RTS was fixed after initial 6.6 release and afaik hWaitForInput should work better now. alternatively, you can

Re: [Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-07 Thread Ian Lynagh
On Fri, Apr 06, 2007 at 01:44:01PM -0600, Scott Bell wrote: Ooops! It seems that this doesn't behave well with a -threaded RTS. I get an EOF on handles that I know for a fact shouldn't be receiving them. It still works well without -threaded, but does anyone know why I'm getting this behavior?

[Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-06 Thread Scott Bell
Ooops! It seems that this doesn't behave well with a -threaded RTS. I get an EOF on handles that I know for a fact shouldn't be receiving them. It still works well without -threaded, but does anyone know why I'm getting this behavior? hGetContentsTimeout :: Handle - Int - IO String

Re: [Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-06 Thread Bulat Ziganshin
Hello Scott, Friday, April 6, 2007, 11:44:01 PM, you wrote: you should write compiler version and OS for such problems. if it's 6.6 and Win, try to upgrade to current STABLE build: smth like http://www.haskell.org/ghc/dist/stable/dist/ghc-6.6.20061207-i386-unknown-mingw32.tar.gz but newer (this