<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>I'm +1 on any proposal that disallows or warns on an empty string, and -1 otherwise.</div><div><br></div><div>Tom</div><div><br></div><div><br>El 3 sept 2017, a las 09:24, Artyom Kazak <<a href="mailto:yom@artyom.me">yom@artyom.me</a>> escribió:<br><br></div><blockquote type="cite"><div><div dir="auto">The IsString1 solution seems okay, though it requires writing an IsString1 instance for all types which have an IsString instance now, and I'm not sure that the breakage is worth it. </div><div class="gmail_extra"><br><div class="gmail_quote">On 3 Sep 2017 4:33 p.m., "Henning Thielemann" <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Sun, 3 Sep 2017, Tony Morris wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why not:<br>
<br>
class isString1 a where fromString1 :: NonEmpty Char -> a<br>
</blockquote>
<br>
This would be a clean solution. GHC could reject empty string literals. (Though I do not know how difficult or sensible it is to extend GHC this way.)<br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
</blockquote></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Libraries mailing list</span><br><span><a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a></span><br><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a></span><br></div></blockquote></body></html>