<div dir="auto">The existence of a workaround doesn't make it not a bug! Definitely report it anyway. Worst case, the bug is actually in Windows but is now known and centrally documented. For that matter, GCH could build the <span style="font-family:sans-serif">replicateM </span>trick into the implementation on a platform-specific basis.</div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 29, 2016 5:21 AM, "Lian Hung Hon" <<a href="mailto:hon.lianhung@gmail.com">hon.lianhung@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Dear Tom,</p>
<p dir="ltr">That is a good workaround, now I'm using divMod with the max value of Int, and things are working again :) So it really is because of int overflow somewhere..</p>
<p dir="ltr">Since a workaround is available I guess I won't file a bug report yet. Thomas' comment also got me second guessing myself..</p>
<p dir="ltr">Thank you everyone for your help and guidance!</p>
<p dir="ltr">Regards, <br>
Hon</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 29 Dec 2016 09:47, <<a href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If their supplied code sample is failing, couldn't that indicate a bug in the Windows threadDelay implementation for very large values?<br>
<br>
Hon: if you're looking for a short-term solution you can always:<br>
<br>
replicateM 48 $ threadDelay $<br>
(half an hour)<br>
<br>
This way you only have to wait half an hour to be sure there's no overflow or incorrect timing.<br>
<br>
Tom<br>
<br>
<br>
> El 28 dic 2016, a las 18:47, Thomas DuBuisson <<a href="mailto:thomas.dubuisson@gmail.com" target="_blank">thomas.dubuisson@gmail.com</a>> escribió:<br>
><br>
> Not to be infuriating, but I think you should check and re-check your<br>
> tooling is not using 32 bit values at any particular point.<br>
><br>
> Notice:<br>
><br>
> (fromIntegral (86400000000 `mod` 2^32)) / 10^6 ~ 500 seconds which is<br>
> your observation. Any time you depend on `Int` to represent numbers<br>
> near or greater than 2^28, or perhaps 2^31 in practice, you should<br>
> think hard about bounds and implications regarding portability anyway.<br>
><br>
> -Thomas<br>
><br>
>> On Wed, Dec 28, 2016 at 4:05 PM, Lian Hung Hon <<a href="mailto:hon.lianhung@gmail.com" target="_blank">hon.lianhung@gmail.com</a>> wrote:<br>
>> Dear Tom/Yitz,<br>
>><br>
>> Just tested, returns False. I'm on 64 bit by the way. What should I do from<br>
>> here?<br>
>><br>
>> Regards,<br>
>> Hon<br>
>><br>
>><br>
>>> On 29 Dec 2016 03:47, "Yitzchak Gale" <<a href="mailto:gale@sefer.org" target="_blank">gale@sefer.org</a>> wrote:<br>
>>><br>
>>> Tom wrote:<br>
>>>> (86400000000 :: Integer) > (fromIntegral (maxBound :: Int))<br>
>>>><br>
>>>> If True, your machine (32-bit?) is probably overflowing the Int<br>
>>><br>
>>> Good point. Even if False on Lian's Windows machine, it could<br>
>>> be there is some 32-bit value somewhere in the Windows<br>
>>> implementation that causes this.<br>
>>><br>
>>> Yitz<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Haskell-Cafe mailing list<br>
>> To (un)subscribe, modify options or view archives go to:<br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
>> Only members subscribed via the mailman list are allowed to post.<br>
> ______________________________<wbr>_________________<br>
> Haskell-Cafe mailing list<br>
> To (un)subscribe, modify options or view archives go to:<br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
> Only members subscribed via the mailman list are allowed to post.<br>
</blockquote></div></div>
<br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div></div>