This probably requires a monad or some other way to store mutable state - don't know of a simpler way right now. That's why I haven't done it yet ((:
Right now, I am doing the full reboot thing too, but I plan on improving this
edit: Actually, I think tidal-lazy might solve this. Will check it out!
edit 2: there's also the mutable haskell package