Haskell Platform Proposal: add the 'text' library

Duncan Coutts duncan.coutts at googlemail.com
Wed Oct 20 20:38:42 EDT 2010


On Wed, 2010-10-20 at 07:52 +0100, Roman Leshchinskiy wrote:

> True. But I didn't say it's a list of characters. It's a list of
> Chars, i.e., of Unicode code points.

> But text *does* have a list API. It doesn't get any "listier" than
> uncons, foldr and unfoldr. From my point of view, if these functions
> make sense for the data type then it's a list. If it's not a list then
> these functions don't make sense and shouldn't be provided.

So yes it is a list of code points, there's no getting away from that.
But that does not mean that the operations you want on it are the same
as you want on say a list of records, where each element is independent.
It's more like a sequence of DNA where you very often want to consider
short sequences of code points, rather than individual ones.

Duncan



More information about the Libraries mailing list