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