[Haskell-cafe] Re: FRP for game programming / artifical life
simulation
Peter Gammie
peteg42 at gmail.com
Thu Apr 29 00:58:48 EDT 2010
Ben,
On 29/04/2010, at 6:16 AM, Ben wrote:
> [...]
>
> newtype STAuto s a b = STAuto { unSTAuto : (a, s) -> (b, s) }
As Felipe observes in detail, this can be made to work. He uses Read and Show for serialisation, but clearly you can use whatever you like instead.
I just wanted to add that one can go to town with the approach: after you understand Felipe's stuff, take a look at Caspi and Pouzet's coalgebraic streams stuff. (I'd recommend looking at both the tech report and the published paper, and there is some Haskell code too.)
BTW I was referring (off-list) to the original Arrows paper by John Hughes.
cheers
peter
--
http://peteg.org/
More information about the Haskell-Cafe
mailing list