<div>The essence of data flow programming describes how you can use comonads to model the semantics of dataflow languages.</div><div><br></div><div>One of the best stops from there is probably, Dave Menendez&#39;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&#39;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.</div>
<div><br></div><div><a href="http://www.haskell.org/pipermail/haskell/2005-September/016502.html">http://www.haskell.org/pipermail/haskell/2005-September/016502.html</a></div><div><br></div><div>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&#39;s email, but there are packages on hackage that can do much of the heavy lifting for you:</div>
<div><br></div><div>I have a &#39;comonad&#39; package on hackage that provides the basic Comonad type they use:</div><div><br></div><div><a href="http://hackage.haskell.org/packages/archive/comonad/1.1.0/doc/html/Control-Comonad.html">http://hackage.haskell.org/packages/archive/comonad/1.1.0/doc/html/Control-Comonad.html</a></div>
<div><br></div><div>The Apply class from the &#39;semigroupoids&#39; 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):</div>
<div><br></div><div><a href="http://hackage.haskell.org/packages/archive/semigroupoids/1.2.2/doc/html/Data-Functor-Apply.html">http://hackage.haskell.org/packages/archive/semigroupoids/1.2.2/doc/html/Data-Functor-Apply.html</a></div>
<div><br></div><div>The Future causal comonadic stream type used by Uustalu and Vene is packaged in &#39;streams&#39; as Data.Stream.Future:</div><div><br></div><div><a href="http://hackage.haskell.org/packages/archive/streams/0.8.0/doc/html/Data-Stream-Future.html">http://hackage.haskell.org/packages/archive/streams/0.8.0/doc/html/Data-Stream-Future.html</a></div>
<div><br></div><div><br></div><div><br></div><div>-Edward Kmett</div><div><br></div><div><br><div class="gmail_quote">On Mon, Jun 20, 2011 at 10:45 AM, Richard Senington <span dir="ltr">&lt;<a href="mailto:sc06r2s@leeds.ac.uk">sc06r2s@leeds.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
I have recently become interested in Dataflow programming and how it related to functional languages.<br>
I am wondering if the community has any advice on reading matter or other directions to look at.<br>
<br>
So far I have been looking through the FRP libraries, using Haskell functions with lazy lists for co-routines and<br>
the Essence of Dataflow Programming by Uustalu and Vene where they propose using co-monads.<br>
<br>
It looks as though Iteratees are also relevant but I have not got round to looking at them in detail yet.<br>
<br>
Have I missed anything?<br>
<br>
Regards<br>
<br>
RS<br>
<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>