Haskell Platform call for consensus: add 'text' package
igloo at earth.li
Sat Nov 6 12:03:59 EDT 2010
On Sat, Nov 06, 2010 at 08:51:46AM -0700, Donald Bruce Stewart wrote:
> Malcolm's proposal, which Bryan reviewed, seems to be the proposed
> function to smooth out the APIs somewhat.
FWIW, I don't think that goes far enough. For example, we have
BS: count :: Char -> ByteString -> Int
Text: count :: Text -> Text -> Int
but I think we should have
Text: count :: Char -> Text -> Int
while Malcolm says
Proposal: these are equivalent, no action.
More generally, I don't think that treating Text effectively as the
element type is really any more correct in general. It does mean that
you can act on graphemes composed of multiple codepoints, but doesn't
help you act on graphemes that may be followed by more combining
characters. Furthermore, acting on general sequences can be useful with
any of lists, bytestrings and text.
More information about the Libraries