[Haskell] threading mutable state through callbacks