H98 Text IO

Ross Paterson ross at soi.city.ac.uk
Tue Feb 26 07:44:53 EST 2008

On Tue, Feb 26, 2008 at 11:47:49AM +0000, Duncan Coutts wrote:
> The major problem is with code that assumes GHC's Handles are
> essentially Word8 and layer their own UTF8 or other decoding over the
> top. The utf8-string package has this problem for example. Such code
> should be using openBinaryFile because they are reading/writing binary
> data, not String text.

As I was saying on cabal-devel, I think this distinction ought to be in
the types, i.e. we need, in base, a type distinct from Handle that offers
a Word8 interface to binary I/O, as a foundation for various experiments
with encodings (which need not all be in base).

More information about the Libraries mailing list