I decided to create a separate package aivika-transformers instead of including the monad transformers in the main library. Unfortunately, I cannot rewrite the core library based on those transformers and achieve the same speed of simulation. It was near, very near but not always. I had to play much with the optimization pragmas, too much, but that was not worth my time.