On Mon, Apr 4, 2011 at 3:52 PM, Roel van Dijk <vandijk.roel@gmail.com> wrote:
I made an official proposal on the haskell-prime list:

http://www.haskell.org/pipermail/haskell-prime/2011-April/003368.html

Let's have further discussion there.

I'm not on that mailing list, so I'll comment here:

My only caveat is that the encoding provision should apply when Haskell source is presented to the compiler as a bare stream of octets. Where Haskell source is interchanged as a stream of Unicode characters, then encoding is not relevant -- but may be likely governed by some outer protocol - and hence may not be UTF-8 but nonetheless invisible at the Haskell level.

Two examples where this might come into play are:

1) An IDE that stores module source in some database. It would not be relevant what encoding that IDE and database choose to store the source in if the source is presented to the integrated compiler as Unicode characters.

2) If a compilation system fetches module source via HTTP (I could imagine a compiler that chased down included modules directly off of Hackage, say), then HTTP already has a mechanism (via MIME types) of transmitting the encoding clearly. As such, there should be no problem if that outer protocol (HTTP) transmits the source to the compiler via some other encoding. There is no reason (and only potential interoperability restrictions) to enforce that UTF-8 be the only legal encoding here.