Haskell Platform Proposal: add the 'text' library

Krasimir Angelov kr.angelov at gmail.com
Tue Sep 7 23:58:58 EDT 2010


2010/9/8 Brandon S Allbery KF8NH <allbery at ece.cmu.edu>:
> He means that text won't work with 6.10 *if* it's changed to use the
> conversion routines that only exist in 6.12+ as you seem to be demanding.

Exactly. But it is probably possible to make version of text which
with 6.10 uses some copy of the routines and with 6.12 uses the
routines in base. The compatibility issue is only temporary i.e. until
there are many users of 6.10. The API from text will have to stay
forever. For now at least the API should be made compatible with base.

For example something like that:

encode :: TextEncoding -> Text -> ByteString
decode :: TextEncoding -> ByteString -> Text

where TextEncoding could be defined in the text package when it is
compiled with GHC 6.10 or just reexported from base when it is
compiled with GHC 6.12.

Krasimir


More information about the Libraries mailing list