reflex
reflex copied to clipboard
Should we deprecate `MonadHold (SpiderHost x)`?
Currently, MonadHold
does not have documented laws, but there are some laws people might intuitively expect. For instance:
do a <- hold x y
b <- hold x y
One may expect a
and b
to be equivalent, but in SpiderHost
's instance, it's possible for a frame to occur in between those two lines.
This is even clearer in the case of:
e <- now
b <- hold 0 (1 <$ e)
In most MonadHold
instances, b
will definitely change to value 1. In SpiderHost
, it will always be 0, because the now
will finish firing before the hold
executes.
I'm not fully convinced that MonadHold (SpiderHost x)
is useful, and it may be better not to have it.