
2016-12-29 17:27 GMT+01:00 Joey Hess
[...] It would perhaps be good for the documentation for threadDelay to point out that it can delay for a maximum of 71 minutes on 32 bit systems, and point to the unbounded-delays package.
... 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 http://www.aristeia.com/Papers/IEEE_Software_JulAug_2004_revised.htm (*"**Make interfaces easy to use correctly and hard to use incorrectly."). *Perhaps we should add: genericThreadDelay :: Integral https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#t:Integra... i => i -> IO https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO () genericTimeout :: Integral https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#t:Integra... i => i -> IO https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO a -> IO https://hackage.haskell.org/package/base-4.7.0.1/docs/System-IO.html#t:IO (Maybe https://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Maybe.html#t:Mayb... a) 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.