String != [Char]
Johan Tibell
johan.tibell at gmail.com
Sat Mar 24 22:37:45 CET 2012
On Sat, Mar 24, 2012 at 2:31 PM, Brandon Allbery <allbery.b at gmail.com> wrote:
> I was under the impression they have been very carefully designed to do the
> right thing with characters represented by multiple codepoints, which is
> something the String version *cannot* do. It would help if Bryan were
> involved with this discussion, though. (I'm cc:ing him on this.) Since the
> whole point of Data.Text is to handle stuff like this properly I would be
> surprised if your assertion that
>
>> > upcase :: String -> String
>> > upcase = map toUpper
>>
>> This is no more incorrect than
>> upcase = Data.Text.map toUpper
>
>
> is correct.
This is simply not possible given the Unicode specification. There's
no code point that corresponds to the two characters used to represent
an upcased version of the essets. I think the list based API predates
Bryan.
-- Johan
More information about the Haskell-prime
mailing list