
Tom Poliquin wrote:
I've been struggling trying to get a simple Reactive example running ..
I'm a newbie to FRP and few months of Haskell (Scheme before that).
David Sankel previously posted a simple example which I loaded up with great joy .. but I get the error ..
ConsoleAdapter.hs:24:50: Couldn't match expected type `Event Char' against inferred type `FRP.Reactive.Internal.Misc.Sink a' In the first argument of `f', namely `stdinEvent' In the second argument of `fmap', namely `(f stdinEvent)' In the second argument of `forkE', namely `(fmap putChar (f stdinEvent))' Failed, modules loaded: none.
I posted the full details up at, http://www.hpaste.org/fastcgi/hpaste.fcgi/view?id=2810#a2810
Oops. I just found a fix for the EventTut example! It was posted after I did all my searching a few weeks ago .. Patch generated by Koh Wei Jie, -- Inside ConsoleAdapter .. adapt function -- Change (stdinEvent, stdinFeed) <- makeEvent clock -- To (stdinFeed, stdinEvent) <- makeEvent clock I put the full modified source here .. as a follow up. http://www.hpaste.org/fastcgi/hpaste.fcgi/view?id=2810#a2811 Sorry for the false alarm. Now as Koh Jie said .. "Now to figure out how to use this stuff." Tom
I also tried the Example.hs (that comes with the 0.10.5 package) but it fails with many errors even after I replaced the import to what I believed was appropriate.
..... --import Reactive.Reactive import FRP.Reactive ........
Examples.hs:72:19: Not in scope: type constructor or class `Reactive' Examples.hs:76:17: Not in scope: `mkEvent' Examples.hs:81:20: Not in scope: `replace' Examples.hs:85:17: Not in scope: `mkEvent' Examples.hs:94:16: Not in scope: type constructor or class `Sink'
I know Reactive is in the state of flux so I don't expect things to work without a bit of hacking but a little help would be greatly (!!!) appreciated just to get me started. I've tried wandering the web without success.
Thanks,
Tom
_______________________________________________ Reactive mailing list Reactive@haskell.org http://www.haskell.org/mailman/listinfo/reactive