The essence of data flow programming describes how you can use comonads to model the semantics of dataflow languages.
One of the best stops from there is probably, Dave Menendez's response on the Haskell mailing list back in 2005 summarized how one can move from building a semantics for dataflow programming using comonads to actually implementing dataflow programming directly using comonads. This is useful if you don't want to write a dataflow language compiler or interpreter, but instead just want to write some dataflow code in the middle of your program as an embedded domain-specific language.
Now, the types that one would use to do either, have changed slightly in the intervening years. You could write everything out by hand from EODP r or Menendez's email, but there are packages on hackage that can do much of the heavy lifting for you:
I have a 'comonad' package on hackage that provides the basic Comonad type they use:
The Apply class from the 'semigroupoids' package plays the role of the ComonadZip class in the presentation of Uustalu and Vene. (There used to be a separate ComonadApply class, but it has since been retired for only introducing a law):
The Future causal comonadic stream type used by Uustalu and Vene is packaged in 'streams' as Data.Stream.Future:
-Edward Kmett
On Mon, Jun 20, 2011 at 10:45 AM, Richard Senington
<sc06r2s@leeds.ac.uk> wrote:
Hi all,
I have recently become interested in Dataflow programming and how it related to functional languages.
I am wondering if the community has any advice on reading matter or other directions to look at.
So far I have been looking through the FRP libraries, using Haskell functions with lazy lists for co-routines and
the Essence of Dataflow Programming by Uustalu and Vene where they propose using co-monads.
It looks as though Iteratees are also relevant but I have not got round to looking at them in detail yet.
Have I missed anything?
Regards
RS
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe