<div dir="ltr">+1 from me. Let's resolve to do something about the situation before 7.12 ships.<div><br></div><div>I'd definitely prefer some kind of smarter defaulting, because that'd also potentially address the <font face="monospace, monospace">length "foo" </font><font face="arial, helvetica, sans-serif">overloaded string problem that got worse with the Foldable/Traversable Proposal, but even just the </font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">instance (a ~ Char) => IsString [a]</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">solution goes a long way and has the benefit that it could be implemented today without having to figure out and test complex defaulting rules.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">-Edward</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 18, 2015 at 10:08 AM, Dan Doel <span dir="ltr"><<a href="mailto:dan.doel@gmail.com" target="_blank">dan.doel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Greetings,<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Today, someone came into #haskell and asked why they couldn't type the equivalent of:<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> > "hi" ++ "bye"<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">into GHCi with OverloadedStrings enabled. The answer is that it's ambiguous, because (++) only determines the strings to be [a], and not [Char].<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I noticed that this could actually be solved by making the instance:<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> instance (a ~ Char) => IsString [a] where ...<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Which causes [Char] to be inferred as soon as [a] is. I then searched my libraries mail and noticed that we'd discussed this two years ago. The proposal for this instance change was rejected based on ExtendedDefaultRules being beefed up to solve this case. But then no one actually implemented the better defaulting.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So, I'm proposing that the issue be fixed for real. I'm not terribly concerned with how it gets fixed, but there's not a great reason for this to not behave better than it currently does. If someone steps up and makes defaulting better, than that's great. But if not, then the libraries committee can fix this very easily for GHC 7.12, and I think it's better to do so than to wait if there are no signs that the alternative is going to happen.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I don't think we need to nail down which of the two solutions we're going to choose right now, but it'd be good to resolve that we're going to fix it, one way or another, by some well defined date.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Here's a link to the previous discussion:<br><br> <a href="http://comments.gmane.org/gmane.comp.lang.haskell.libraries/20088" target="_blank">http://comments.gmane.org/gmane.comp.lang.haskell.libraries/20088</a><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Discussion period: 2 weeks<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">-- Dan<br></div></font></span></div>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>