natefaubion / purescript-spork

Elm-like for PureScript
MIT License
157 stars 9 forks source link

Subscriptions don't tick when empty #8

Closed natefaubion closed 6 years ago

natefaubion commented 6 years ago

Right now, if you add a subscription, and then remove it, the old subscription won't be removed because it's event queue doesn't tick (since it hasn't received an input). This is because we have a distinction of Step vs Loop in the EventQueue machine. By changing it to just Loop, which we are already kind of doing with looped, we can tick (or commit) the machine when no inputs are provided.