[reactive] Simple Example ..

Tom Poliquin poliquin at softcomp.com
Mon Mar 23 19:04:45 EDT 2009


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

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





More information about the Reactive mailing list