[Haskell-cafe] Announcement - HGamer3D - 0.2.1 - why netwire
Ertugrul Söylemez
es at ertes.de
Fri Mar 22 21:58:57 CET 2013
Peter Althainz <althainz at gmail.com> wrote:
> - What struck me was introduction of netwire author Ertugrul Söylemez
> on Arrows and the explanations of local state, which can be kept into
> an arrow. Since I was also curious on OOP and FP and game state
> handling, actually this raised some interest. So I think this "Arrows
> keep local state" argument was the killer feature. But also behaviours
> keep local state and maybe I got misguided here.
It's not arrows that keep local state, but it's specifically the
automaton arrows, in particular Auto and Wire. Both are automaton
arrows. One way to express Auto is the following:
data Auto a b = forall s. Auto s ((a, s) -> (b, s))
Similarly Wire can be expressed like that (simplified):
data Wire a b = forall s. Wire s ((a, s) -> (Maybe b, s))
Both contain a local state value and a transition function. That's why
they are called automaton arrows.
> - I then did some trials with netwire and I felt it's a quite
> comprehensive and nice API, so I got started with that.
Thanks. =)
Greets,
Ertugrul
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130322/55b343d3/attachment.pgp>
More information about the Haskell-Cafe
mailing list