IsString [Char] instance

Roman Cheplyaka roma at ro-che.info
Mon May 18 15:19:35 UTC 2015


You can always newtype your list.

I'm opposed to having everyone suffer today just because someone someday
may want to write an alternative instance.

On 18/05/15 17:57, Yitzchak Gale wrote:
> Michael Snoyman wrote:
>> I have a hard time thinking of a list of something besides
>> `Char`s for which we'd want an `IsString` instance to work for.
> 
> I have an easy time. The `Data.Char` module is always
> woefully behind the Unicode standard, and there are
> always Unicode features that are implemented differently
> than what some people might want.
> 
> A case in point is toUpper and toLower. Those were fixed
> in Data.Text, but are still broken in Data.Char.
> 
> For me, so far this has not been important enough for
> me to need to implement my own Char type, or a newtype
> wrapper with improvements. But it is certainly conceivable
> that others might need this.
> 
> Whether or not you like those examples - it is really the
> wrong approach to outlaw IsString [a] instance forever more
> for any a except Char.
> 
> Yes, this is a serious problem that should be solved. But
> are we really giving up on doing it the right way and fixing
> defaulting rules? Simon wrote that it wouldn't be hard.
> 
> I propose: Set a reasonable time limit for someone to step
> up and provide a suggested fix to the defaulting rules. If that
> doesn't happen, then bite the bullet and do it using
> the type equality
> 
> Thanks,
> Yitz
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150518/f98fbb09/attachment.sig>


More information about the Libraries mailing list