Generalize IsString

chessai . chessai1996 at gmail.com
Sat Jun 6 06:24:32 UTC 2020


This would require desugaring string literals using `fromListN`, which
would require GHC effort.

Also, consider ByteString. Is `Item ByteString` `Word8` or `Char`?

Additionally, I'm not convinced this coupling really buys us much. You
could always define `fromString = fromList`.

On Fri, Jun 5, 2020, 11:12 PM Dannyu NDos <ndospark320 at gmail.com> wrote:

> As we already have IsList, shouldn't we just do this?
>
> class (IsList l, Item l ~ Char) => IsString l
>
> instance (a ~ Char) => IsString [a]
> instance (a ~ Char) => IsString (NonEmpty a)
> instance (a ~ Char) => IsString (ZipList a)
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200605/6ed8bcd3/attachment.html>


More information about the Libraries mailing list