OverloadedLists

Johan Tibell johan.tibell at gmail.com
Thu Feb 14 17:00:47 CET 2013


On Thu, Feb 14, 2013 at 7:58 AM, Stephen Paul Weber <
singpolyma at singpolyma.net> wrote:

> So, this has probably been asked before, but out of curiosity, given:
>
>          instance IsList Text where
>                 type Item Text = Char
>                 fromList = Text.pack
>                 toList   = Text.unpack
>
> What is the relationship to OverloadedStrings?  Since "blah" is sugar for
> ['b','l','a','h'], could OverloadedLists also work for string literals /
> string patterns?


It's described in the wiki. OverloadedLists could subsume OverloadedStrings
if the former had an statically allocated compact representation for
certain lists, which we have for Strings today (see unpackCString#).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130214/367f768a/attachment.htm>


More information about the ghc-devs mailing list