<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-12-29 17:27 GMT+01:00 Joey Hess <span dir="ltr"><<a href="mailto:id@joeyh.name" target="_blank">id@joeyh.name</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[...] It would perhaps be good for the documentation for threadDelay to point<br>
out that it can delay for a maximum of 71 minutes on 32 bit systems, and<br>
point to the unbounded-delays package.<br></blockquote><div><br></div><div>... or even better: Absorb the functions from unbounded-delays into base. In their current state, I would consider both threadDelay and timeout API bugs, see <a href="http://www.aristeia.com/Papers/IEEE_Software_JulAug_2004_revised.htm">http://www.aristeia.com/Papers/IEEE_Software_JulAug_2004_revised.htm</a> (<i>"</i><em style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px;text-align:center">Make interfaces easy to use correctly and hard to use incorrectly."). </em><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px;text-align:center">Perhaps we should add:</span></div><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px;text-align:center"><br></span></div><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px;text-align:center">   </span><a name="v:threadDelay" class="gmail-def" style="font-size:13px;margin:0px;padding:0px;font-weight:bold;color:rgb(0,0,0);font-family:monospace">genericThreadDelay</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> :: </span><a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#t:Integral" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace">Integral</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> i => i </span><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)">-> </span><a href="https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace">IO</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> ()</span></div><div><font color="#000000" face="monospace"><span style="background-color:rgb(240,240,240)">  </span></font><a name="v:timeout" class="gmail-def" style="font-size:13px;margin:0px;padding:0px;font-weight:bold;color:rgb(0,0,0);font-family:monospace">genericTimeout</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> :: </span><a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#t:Integral" style="font-size:13px;color:rgb(171,105,84);margin:0px;padding:0px;text-decoration:none;font-family:monospace">Integral</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> i => i </span><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)">-> </span><a href="https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace">IO</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> a -> </span><a href="https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace">IO</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> (</span><a href="https://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Maybe.html#t:Maybe" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace">Maybe</a><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"> a)</span></div><div><span style="font-size:13px;color:rgb(0,0,0);font-family:monospace;background-color:rgb(240,240,240)"><br></span></div><div><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px;text-align:center">to their respective modules, following Data.List's example. The *real* fix IMHO would be having the equivalent of C++'s <chrono> facilities in base, so we could use a duration data type here.</span></div></div></div></div></div>