default instance for IsString
Erik Hesselink
hesselink at gmail.com
Wed Apr 25 11:04:11 CEST 2012
On Wed, Apr 25, 2012 at 10:15, Yitzchak Gale <gale at sefer.org> wrote:
> The only reason I don't like using OverloadedStrings
> for typing string literals as Text and ByteString
> is that when you turn on OverloadedStrings, you turn
> it on for all types, not just Text and ByteString.
> I don't want to be forced to do that. Because
> all other uses of OverloadedStrings that I have
> seen, and there are many, are ill-advised in my
> opinion. They all should have been quasiquoters.
I don't think IsString should be dismissed so easily. I agree that
instances should be total functions (and I don't like the
ByteString.Char8 instance for that reason) but there are many more
good use cases than Text and (UTF8) ByteStrings. For example, we have
a couple of newtypes over Text that do different kinds of
normalization. An IsString instance for these is useful and total.
Erik
More information about the Glasgow-haskell-users
mailing list