
"Simon Marlow"
For unix, there are couple different tacks one could take. The locale system is standard, and does work, but is ugly and a pain to work with. In particular, it's another (set of) global variables. And what do you do with a character not expressible in the current locale? I'd like to possibility of different character sets for different files, for example.
Not a problem. Have you looked at the streams proposal?
I don't suppose this will make (stream)getContents any more efficient, beyond reducing the data size from Char to Word8? (So I still need to use explicit buffering (as described by Peter Simons, IIRC) to get fast IO?) And one small comment: is it still considered good form to prefix functions with argument type (instead of using modules - i.e. streamGetContents and fileGetContents as opposed to Stream.getContents and File.getContents). -kzm -- If I haven't seen further, it is by standing in the footprints of giants