IsString [Char] instance

Yitzchak Gale gale at sefer.org
Mon May 18 14:57:49 UTC 2015


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


More information about the Libraries mailing list