[Ur] signal monad semantics

Adam Chlipala adamc at impredicative.com
Thu Nov 10 08:31:40 EST 2011


Gergely Buday wrote:
> the manual says
>
> "By
>   using signal on a source, you implicitly subscribe to change
> notications for that source. That is, your signal
>   will automatically be recomputed as that source changes"
>
> My question is: does this simply mean that upon "set"-ting a source
> triggers the signal monad to fire, or a comparison is done whether the
> new value is different from the previous?
>    

Your question has an impact on performance, but not on the functional 
behavior of a program, since the [signal] monad does not allow side 
effects.  At the moment, the runtime system performs a simple 
scalar/pointer comparison to see if reexecutions can be avoided.



More information about the Ur mailing list