[reactive] Re: reactive (-glut) problems?

Balazs Komuves bkomuves at gmail.com
Wed Dec 3 06:38:27 EST 2008


It seems that the function 'justE' caused my problem.
If I remove that, replacing the section at issue with

  exitE = fmap esc ky where
>     esc k = case k of
>       Char '\ESC' -> exitSuccess
>       _           -> nop
>

then the program works. However, there is a large
random delay, sometimes measured in seconds, before
processing the events in the second argument of
`mappend`. And it still leaks space. Any advice?
(all this is with reactive-0.9.6 and ghc 6.10.1)

Thanks,
Balazs

On Tue, Dec 2, 2008 at 1:58 PM, Balazs Komuves <bkomuves at gmail.com> wrote:

>
> Dear All,
>
> I'm trying to get my hands wet with the reactive library,
> but already the simplest example I cooked up is failing
> to work properly (and leaks memory, and uses relatively
> lots of cpu time).
>
> The problem appears when I try to merge my two events
> with `mappend`. One event should exit on pressing ESC,
> the other draws colored circles on pressing the left mouse
> button. They work correctly separately.
>
> Could somebody explain me what's happening, or
> whether I'm making a basic mistake?
>
> The code is below, I hope the formatting survives the
> various email systems. I don't know if that matters or
> not, but I'm using OS X.
>
> Thanks,
> Balazs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/reactive/attachments/20081203/69258a1a/attachment.htm


More information about the Reactive mailing list