[Haskell-beginners] [Netwire] Problems constructing a simple Event Wire
fa-ml at ariis.it
Tue Dec 27 07:49:11 UTC 2016
I am learning netwire and decided to write a simple toy program
to get to know the library better. The structure is extremely
1. a MVar is created and an endless loop fills it with Char
2. a Wire is created (using mkGen_) to provide Events (from the
source described in (1))
3. the final Wire performs some basic filtering/merging on (2)
and outputs a behaviour which is then printed on screen.
[[[ I attach a commented .hs, `main` to test, 'x' and C-c to exit ]]]
The final wire `testWire2 = hold . (keyQ &> keyA)` doesn't work as
expected, i.e. it responds to Q keypresses but not to A ones.
I suspect the problem lies in how I used `mkGen_` to create the
'source' wire, but I am not sure to fix it.
Any help appreciated!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2331 bytes
Desc: not available
More information about the Beginners