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