String != [Char]

Johan Tibell johan.tibell at gmail.com
Tue Mar 20 16:05:25 CET 2012


On Tue, Mar 20, 2012 at 2:25 AM, Simon Marlow <simonmar at microsoft.com> wrote:
> Is there a reason not to put all these methods in the IsString class, with appropriate default definitions?  You would need a UTF-8 encoder (& decoder) of course, but it would reduce the burden on clients and improve backwards compatibility.

That sounds fine to me. I'm leaning towards only having
unpackUTF8String (in addition to the existing method), as in the
absence of proper byte literals we would have literals which change
types, depending on which bytes they contain*. Ugh!

* Is it even possible to create non-UTF8 literals without using
escaped sequences?

-- Johan



More information about the Haskell-prime mailing list