The changes
function has type Frameworks t => Behavior t a -> Moment t (Event t (Future a))
. Future
is abstract and there is only one function that consumes it (reactimate'
).
However, I can easily write the following function:
changes' :: Frameworks t => Behavior t a -> Moment t (Event t a)
changes' b = fmap (fmap const b <@>) (changes b)
to get a normal (non-Future
) event.
Is something wrong with that function? If not, why does the original changes
function have a more restrictive type?