[Haskell-cafe] control-timeout with gtk

Judah Jacobson judah.jacobson at gmail.com
Thu Sep 18 13:05:14 EDT 2008

On Thu, Sep 18, 2008 at 9:46 AM, Marco Túlio Gontijo e Silva
<marcot at riseup.net> wrote:
> Hello,
> I've written a simple sequencer[0] using gtk2hs and control-timeout[1].
> In GHCi it works fine, but when I compile it, the timeouts generated by
> control-timeout are not executed.  Actually, when I use the keyboard a
> lot, at some time they got executed.  I thought it could be that these
> two packages are incompatible, but the I wondered why they work in GHCi.
> Any ideas?

Just a guess, but this might be a problem with control-timeout's use
of the unsafePerformIO global variables hack.  It's missing the
standard NOINLINE annotations which prevent multiple copies of the
global variable from being created.  See the haddock docs for
System.IO.Unsafe.unsafePerformIO for more information.


More information about the Haskell-Cafe mailing list