<div dir="ltr">If we truly believe that the instance is dangerous for users (and not merely for people who don&#39;t understand floating point arithmetic on computers), then we should add a deprecation pragma to the instance and discourage its use. But what would the deprecation message encourage instead, for users to write an explicit loop that tests against some lower/upper bound? It would have the same problem as enumFromTo. I think the issue here is really that floating point math on computers is hard to think about.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 11, 2013 at 11:18 AM, harry <span dir="ltr">&lt;<a href="mailto:voldermort@hotmail.com" target="_blank">voldermort@hotmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Johan Tibell &lt;johan.tibell@...&gt; writes:<br>
<br>
&gt; I don&#39;t see much gain. It will break previously working code and the<br>
workaround to the breakage will likely be manually reimplementing enumFromTo<br>
in each instance.<br>
<br>
</div>I forgot the main point of my post :-)<br>
<br>
The primary motivation for removing these instances is that they cause<br>
endless confusion for beginners, e.g.<br>
<a href="http://stackoverflow.com/questions/13203471/the-math-behind-1-0999999999999999-in-haskell" target="_blank">http://stackoverflow.com/questions/13203471/the-math-behind-1-0999999999999999-in-haskell</a>,<br>
<a href="http://stackoverflow.com/questions/9810002/floating-point-list-generator" target="_blank">http://stackoverflow.com/questions/9810002/floating-point-list-generator</a>,<br>
<a href="http://stackoverflow.com/questions/7290438/haskell-ranges-and-floats" target="_blank">http://stackoverflow.com/questions/7290438/haskell-ranges-and-floats</a>,<br>
<a href="http://stackoverflow.com/questions/10328435/how-to-solve-floating-point-number-getting-wrong-in-list-haskell" target="_blank">http://stackoverflow.com/questions/10328435/how-to-solve-floating-point-number-getting-wrong-in-list-haskell</a>,<br>


and many more.<br>
<br>
On the other hand, how much working code is there &quot;correctly&quot; using there<br>
instances?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Haskell-prime mailing list<br>
<a href="mailto:Haskell-prime@haskell.org">Haskell-prime@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-prime" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-prime</a><br>
</div></div></blockquote></div><br></div>