On Mon, Mar 26, 2012 at 1:12 PM, Christian Siefkes <christ...@siefkes.net> wrote: > On 03/26/2012 06:58 PM, Johan Tibell wrote: >> On Mon, Mar 26, 2012 at 9:42 AM, Christian Siefkes >> <christ...@siefkes.net> wrote: >>> On 03/26/2012 05:50 PM, Johan Tibell wrote: >>>> Normalization isn't quite enough unfortunately, as it does solve e.g. >>>> >>>> upcase = map toUppper >>>> >>>> You need all-at-once functions on strings (which we could add.) I'm >>>> just pointing out that most (all?) list functions do the wrong thing >>>> when used on Strings. >>> >>> Hm, do you have any other examples besides toUpper/toLower? >> >> length, cons, head, tail, filter, folds, anything that works on an >> element-by-element basis. > > Hm, but aren't these all matters of Unicode normalization? Your argument > seems to go in circles, since above you wrote: "Normalization isn't quite > enough unfortunately".
Unicode contains a set of precomposed characters, like ö, that can be normalized to a single code point, but this is not true of every combination of characters. Prelude> "ā́" "a\772\769" As far as I know, there is no representation of ā́ which uses a single code point. -- Dave Menendez <d...@zednenem.com> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime