[Haskell] Injecting stateful computations into pure Haskell code.