RE: [Haskell-cafe] Re: :t main
I've not been following this thread, but I wanted to check: you do know about Tarmo Uustalu's stuff about comonads, don't you? http://www.cs.helsinki.fi/u/ekarttun/comonad/ summarises (link to "The essence of dataflow programming" at the bottom) Simon | -----Original Message----- | From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of | David Menendez | Sent: 06 December 2005 07:13 | To: Scherrer, Chad | Cc: haskell-cafe@haskell.org | Subject: RE: [Haskell-cafe] Re: :t main | | Scherrer, Chad writes: | | > > From: Cale Gibbard [mailto:cgibbard@gmail.com] | > > See: | > > http://haskell.org/pipermail/haskell-cafe/2003-January/003794.html | > > | > > The OI comonad as previously envisioned breaks referential | > > transparency. I/O just doesn't seem to be something which one | > > can easily do comonadically, since once coeval/extract is | > > applied, you're back to plain values, and there's no | > > imposition of sequencing. | > > | > > - Cale | > | > Hmm, I hadn't seen that. The asymmetry is pretty frustrating in that | > case. | > | > After poking around a bit more, I (re)discovered some discussion of | > this on Hawiki: | > http://www.haskell.org/hawiki/CoMonad | > | > After reading Dave Menendez's comments, I'm wondering... | > If we consider | > IO a = Realworld -> (Realworld, a) | > then wouldn't we dually have something like | > OI a = (Realworld, Realworld -> a)? | > | > Could this be what screws things up? Right now it seems like OI is | > acting like it has the same type as IO, with a different name. | | Aside from the product comonad and the exponent (reader) monad, I don't | think we'll find much overlap between monad and comonad functionality. | It's been said that monads describe effects that propagate outwards, | whereas comonads describe effects that propagate inwards. | | My guess is that comonadic IO would look more like dataflow programming. | -- | David Menendez <zednenem@psualum.com> | "In this house, we obey the laws | <http://www.eyrie.org/~zednenem> | of thermodynamics!" | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe
I wrote:
| My guess is that comonadic IO would look more like dataflow | programming.
Simon Peyton-Jones writes:
I've not been following this thread, but I wanted to check: you do know about Tarmo Uustalu's stuff about comonads, don't you?
http://www.cs.helsinki.fi/u/ekarttun/comonad/ summarises (link to "The essence of dataflow programming" at the bottom)
You caught me. That paper was the reason I thought comonadic IO might resemble dataflow programming. I should have provided a link, but I was lazy. I also recommend "Comonadic functional attribute evaluation"[1] and "The dual of substitution is redecoration"[2], which have nothing to do with IO but do describe some applications of comonads. [1] <http://cs.ioc.ee/~tarmo/papers/tfp05-book.pdf> [2] <http://cs.ioc.ee/~tarmo/papers/sfp01-book.ps.gz> -- David Menendez <zednenem@psualum.com> | "In this house, we obey the laws <http://www.eyrie.org/~zednenem> | of thermodynamics!"
participants (2)
-
David Menendez -
Simon Peyton-Jones