---------- Forwarded message ----------
From:
David Sorokin <david.sorokin@gmail.com>Date: Wed, Sep 2, 2015 at 9:39 AM
Subject: Re: [Haskell-cafe] How to combine simulations
To: martin <
martin.drautzburg@web.de>
Hi Martin,
Nevertheless, regarding Aivika, did you look at the Signal type (inspired by the IObservable interface of .NET)? This type is quite composable. If I understood you correctly, the Signal is what you call Event.
Moreover, if you need a mutable state, then you could use the Ref reference and its signal refChanged. For example, the reference could be used to decide whether to emit a signal based on the intermediate state.
Furthermore, if you want to build a computation with linear-looking signal processing then you could use the Process monad (inspired by the Async workflow of F#) and the processAwait function that suspends the
current discontinuous process waiting for a signal to come.
I hope it helps. In case of need, these ideas can be re-implemented.
Thanks,
David