Generalize IsString

Mario blamario at rogers.com
Sun Jun 7 21:38:08 UTC 2020


On 2020-06-06 2:11 a.m., Dannyu NDos wrote:
> As we already have IsList, shouldn't we just do this?
>
> class(IsListl, Iteml~Char) => IsStringl
> instance(a~Char) => IsString[a]
> instance(a~Char) => IsString(NonEmptya)
> instance(a~Char) => IsString(ZipLista)
>

That's not a generalization, it's a restriction. It would, for example, 
exclude both ByteString (whose IsString instance is admittedly broken) 
and ByteStringUTF8 (whose isn't).




More information about the Libraries mailing list