-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug.lhs
More file actions
26 lines (22 loc) · 1009 Bytes
/
bug.lhs
File metadata and controls
26 lines (22 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
There are three possible behaviours I observed:
1) program crashes instantly, and prints error message
2) program starts, but upon close prints same error
3) program starts and closes fine
error message = Segmentation fault/access violation in generated code
when amount of buttons (see below) is one, (1) never occurs
upon increase of amount of buttons, (2) seems to occure less, than before
amount of [(1) or (2)] is estimated to be about 30-40 %
> {-# LANGUAGE ScopedTypeVariables #-}
> import Control.Monad (replicateM, mapM_, void)
> import Graphics.UI.WX hiding (Event)
> import Reactive.Banana
> import Reactive.Banana.WX
> main = start $ do
> pad <- frame [ ]
> buttons <- replicateM 2
> $ button pad []
> let network :: forall t. Frameworks t => Moment t ()
> network = void $ mapM_ (`event0` command) buttons
> -- ^ crash inside ^
> net <- compile network
> actuate net