[Haskell-cafe] Arrow laws of Netwire

Ertugrul Söylemez esz at posteo.de
Sun Feb 18 22:26:01 UTC 2018

Hi Ivan,

> Given then that what I said about classic FRP and many variants of FRP
> should apply to wires too, how would programming in a classic FRP library
> be any different from using Wires, Dunai, Varying, etc., all of which are
> based on the same construct? (Performance aside.)

the main difference between AFRP and first-class FRP is that in the
latter behaviours and events are, well, *first-class*.  For example in
reflex when you construct a (Behavior t Integer), this is an actual
value that is not tied to any particular monad or arrow.  It can be
stored in data structures and is subject to garbage-collection like
every other value.

Some operations still require a certain monad, but that is only
necessary because those are bound to an instant in time.  For example
you can't 'hold' an event in a pure function, holding requires a notion
of "now", which a pure function cannot provide.

In AFRP all behaviours and events are "virtual" in a sense.  Though
arrow notation can make it look like they are actual values this is
really just an illusion.  That's why you can't sensibly communicate an
event out of the wire/SF/MSF/MealyT/…

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180218/f380c1bc/attachment.sig>

More information about the Haskell-Cafe mailing list