<p>I don&#39;t think there is any kind of consensus for removing it.</p>
<div class="gmail_quote">Am 12.06.2011 13:21 schrieb &quot;Yitzchak Gale&quot; &lt;<a href="mailto:gale@sefer.org">gale@sefer.org</a>&gt;:<br type="attribution">&gt; John Millikin wrote:<br>&gt;&gt; To me, the choice is between raising an exception<br>
&gt;&gt; or removing IsString.<br>&gt; <br>&gt; That would be a shame, but removing it may be the<br>&gt; only way out of this conundrum.<br>&gt; <br>&gt;&gt; IsString without namespaces is pointless.<br>&gt; <br>&gt; I am making good use of it in a project that doesn&#39;t<br>
&gt; involve namespaces at all. It would actually be<br>&gt; a lot of work to back out at this point.<br>&gt; <br>&gt;&gt; IsString without input checking is dangerous. If fromString cannot<br>&gt;&gt; fail on invalid input, then it shouldn&#39;t be defined.<br>
&gt; <br>&gt; I appreciate your concerns, but Haskell has other means of<br>&gt; providing such guarantees. Raising an asynchronous exception<br>&gt; is just not an option in an IsString instance.<br>&gt; <br>&gt;&gt;&gt; The Name type already produces invalid XML.<br>
&gt; <br>&gt;&gt; You&#39;re right -- it is already possible for Names to be invalid. There<br>&gt;&gt; should probably be stricter input checking on names, to ensure they<br>&gt;&gt; match the XML spec. Something like this...<br>
&gt; <br>&gt; Yes, as I mentioned earlier, newtype wrappers with hidden<br>&gt; constructors is the way we would do that if we wanted to<br>&gt; guarantee those kinds of things at the type level.<br>&gt; You could then provide several constructor functions that<br>
&gt; either do or do not raise exceptions. See, for example,<br>&gt; Data.Text.Encoding, Neil Mitchell&#39;s Safe library, Michael&#39;s<br>&gt; xml-enumerator.<br>&gt; <br>&gt; But you certainly could not use the version that raises an<br>
&gt; exception for an IsString instance.<br>&gt; <br>&gt; In fact, I don&#39;t think an IsString instance makes sense at<br>&gt; all for a validating type. So maybe just removing it<br>&gt; really is the right thing to do after all.<br>
&gt; <br>&gt; Thanks,<br>&gt; Yitz<br>&gt; <br>&gt; _______________________________________________<br>&gt; web-devel mailing list<br>&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
</div>