[Haskell-cafe] ArrowLoop and streamprocessors

Patai Gergely patai_gergely at fastmail.fm
Thu Mar 31 00:12:53 CEST 2011


> So loop really doesn't seem to help here, but I couldn't find another
> way either to feed outputs back into the system.
> What I need is:
> Either A B ~> Either C B -> A ~> C
> 
> Does such a thing exist?
At this point you don't really have enough structure to define such a
feedback loop. Since you have streams of different rates, you need to
find some common ground to merge them. The path taken by Reactive is to
assign a timestamp to events, and ensure that merging preserves time
ordering. Of course you'll immediately run into the problem of
simultaneous occurrences, and it depends on the context how you want to
resolve them.

Also, what you're trying to achieve looks similar to Peakachu, so you
might want to check it out, especially the Program abstraction [1]. It
even has a feedback combinator with a slightly different signature.

Gergely

[1]
http://hackage.haskell.org/packages/archive/peakachu/0.3.0/doc/html/FRP-Peakachu-Program.html

-- 
http://www.fastmail.fm - mmm... Fastmail...




More information about the Haskell-Cafe mailing list