I am using Basic Hugs, Jun 20 1999, on Mac OS 8.6.
The following session appears to do the right thing:
Prelude> writeFile "test" $ map chr [0..15]
Prelude> do {f <- readFile "test"; putStr $ show $ map ord f}
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
Prelude>
But if I do a hex dump of the file "test" I get:
00 01 02 03 04 05 06 07 08 09 0D 0B 0C 0A 0E 0F ................
^^ ^^
If I create the file "test" using Hugs on a Unix system then read it using
Mac Hugs I get:
[0,1,2,3,4,5,6,7,8,9,13,11,12,10,14,15]
^^ ^^
It appears that Mac Hugs switches \r and \n characters when it reads and
writes files.
By the way, if Mac Hugs allowed command line editing it would be almost perfect!
Peter