[Haskell-cafe] Reactive and 'real live' problem
Maciej Piechotka
uzytkownik2 at gmail.com
Mon Jun 14 23:22:43 EDT 2010
I tried to experiment with reactive[1] and rewrite NeHe tutorials using
reactive-glut. However I run into problems.
I tried to write first tutorial and exit on escape. However there were 2
problems:
1. Optimized constant functions
2. Continuous behaviour
In reactive the final step is Behaviour which is 'function' from time to
something a. Here a = IO (). The problem is that it is not indifferent
how many time the same IO () was returned (we don't want to write to
file twice etc.).
I tried to workaround it in various ways but all I came up to was to
switch after switch with time + * where * is the difference between
times (unfortunately there is no function which give the next float).
As with every tick everything is executed -- unless everything gets
optimized to constant function.
Am I failing to find proper docs? How solve those problems? If they are
not easily solvable is there any general-purpose FRP library that allows
to use IO inside?
Regards
[1] http://hackage.haskell.org/package/reactive
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100614/90ebbf52/attachment.bin
More information about the Haskell-Cafe
mailing list