
2011/4/4 Roel van Dijk
Hello,
The Haskell 2010 language specification states that "Haskell uses the Unicode character set" [1]. I interpret this as saying that, at the lowest level, a Haskell program is a sequence of Unicode code points. The standard doesn't say how such a sequence should be encoded. You can argue that the encoding of source files is not part of the language. But I think it would be highly practical to standardise on an encoding scheme.
Strictly speaking it is not possible to reliably exchange Haskell source files on the byte level. If I download some package from hackage I can't tell how the source files are encoded from just looking at the files.
Not from looking with your eyes perhaps. Does that matter? Your text editor, and the compiler, can surely figure it out for themselves. There aren't many Unicode encoding formats, and there aren't very many possibilities for the leading characters of a Haskell source file, are there?