control-timeout: deprecated?

Thomas DuBuisson thomas.dubuisson at gmail.com
Tue Jun 9 18:33:47 EDT 2009


Erik,

> There is a different in the function signature between the two
> versions. Control.Timeout has:
>
>    addTimeoutAtomic :: Float -> IO (IO () -> STM TimeoutTag)
>
> while your Control.Event.Timeout has:
>
>    addTimeoutAtomic :: Float -> IO () -> IO (STM TimeoutTag)
>
> Was that intentional? As a relative newbie, I can't immediately see
> how to port code from the first to the second.

No, I intended to match function types to allow a seemless transition.
 This is a bug.  Still, I'm questioning the value in supporting a
compatability API for a depricated package - especially seeing as it
depends on the unsafePeformGlobalBadness hack.   I could add a module
Control.Event.Relative to allow relative times using just forkIO and
threadId (a lighter weight solution than the current bloatware), but
that would just use IO and no STM.  What would be useful for your
network-dns work?

> There is also a little matter of documentation :-).

Documentation for Control.Event.TImeout?  I assumed that people using
the module would be familure with Control.Timeout - perhaps its time
for that assumption to change.

Thomas


More information about the Libraries mailing list