Proposal: Improving the IsString String instance

Ian Lynagh igloo at
Mon Aug 26 19:03:59 CEST 2013

On Mon, Aug 26, 2013 at 12:45:31PM -0400, Edward Kmett wrote:
> If Ian can make defaulting work, then I'd prefer that solution.

I'm not planning on implementing it myself any time soon, but I don't
think the libraries should be changed if changing defaulting instead
would be both feasible and better.

> On Mon, Aug 26, 2013 at 12:33 PM, Henning Thielemann <
> schlepptop at> wrote:
> > What you propose is, to let the compiler infer: "If it is something
> > string-like (imposed by the string literal syntax in the presence of
> > OverloadedStrings) and it is a list (imposed by 'length'), then it must be
> > a String".

To clarify, I was thinking of something more like appending String to the
default defaulting list, and IsString to the list of classes that
trigger defaulting. I'm not sure OTTOMH if String actually being [Char]
causes any problems.


More information about the Libraries mailing list