On Sat, Mar 24, 2012 at 16:16, Ian Lynagh <igloo@earth.li> wrote:
On Sat, Mar 24, 2012 at 11:50:10AM -0700, Johan Tibell wrote:
> Using list-based operations on Strings are almost always wrong

Data.Text seems to think that many of them are worth reimplementing for
Text. It looks like someone's systematically gone through Data.List.
And in fact, very few functions there /don't/ look like they are
directly equivalent to list functions.

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.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms