[Hugs-users] WinHugs bug: putChar (chr 255)

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Feb 6 06:24:54 EST 2006


Bulat Ziganshin <bulatz at HotPOP.com> writes:

> import System.IO
> import Data.Char
> main = do h <- openBinaryFile "test" WriteMode
>           hPutChar h (chr 255)
>           hPutChar h 'a'  -- never executed

In the underlying C API,  (char)255  ==  (char)-1  ==  EOF.
Regards,
    Malcolm


More information about the Hugs-Users mailing list