[Haskell-cafe] ANNOUNCE: text, fast Unicode text support

Brandon S Allbery KF8NH allbery at ece.cmu.edu
Wed Sep 1 23:15:17 EDT 2010

Hash: SHA1

On 09/01/2010 02:44 AM, Ivan Lazar Miljenovic wrote:
> On 1 September 2010 16:27, David Virebayre
> <dav.vire+haskell at gmail.com> wrote:
>> Sometimes I'd love if I could program using String and the
>> compiler would automatically convert that to Text, or
>> Bytestrings, but of course it's wishful thinking.
> Well, there's OverloadedStrings for String literals...
> But the problem with automagic conversion would be one of encoding
> for Bytestrings at least.

This reminds me:  it would be nice if Text, ByteString, etc. exported
their own definitions of "type String".  As most users have to import
them qualified to avoid collisions with Data.List (and the Prelude?)
anyway, this would enable someone to import their desired module as,
say, S, then use type S.String and string ops S.foo.  Anyone who *did*
use them unqualified would have to add (hiding (String)) to their
imports, of course.

The flip side of this would be a module which contained the definition
for String and re-exported Data.List, so that the above S.mumble could
work for String as well.  (The obvious choice would be Data.String,
but that's taken for IsString and of course that would be required to
pull this off so it can't just have the list implementation stuffed
into it.)
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100901/e6af33fe/attachment.html

More information about the Haskell-Cafe mailing list