A monad transformer version of the ST monad

Latest on Hackage:0.4.4

See all snapshots STMonadTrans appears in

BSD-3-Clause licensed by Josef Svenningsson
Maintained by [email protected]

Module documentation for 0.4.3

This version can be pinned in stack with:[email protected]:1514ba33ae57dbf0bab7d959395feed00909b8c40926d2e36d1a7aa2d2ce7826,1506

A monad transformer version of the ST monad Warning! This monad transformer should not be used with monads that can contain multiple answers, like the list monad. The reason is that the state token will be duplicated across the different answers and this causes Bad Things to happen (such as loss of referential transparency). Safe monads include the monads State, Reader, Writer, Maybe and combinations of their corresponding monad transformers.



  • Fix compilation for GHC 7.6.3. Thanks to Andrés Sicard-Ramírez.
  • Export unsafe array operations


  • Deprecate runST and unsafeSTToIO in favor of runSTT and unsafeSTTToIO.
  • Added INLINE pragmas


  • Add Applicative constraints to be compatible with GHC 7.8.4
  • Add changelog


  • New library structure, based on liftST. It reuses more code and types from the standard ST monad. Thanks to @wyager for liftST.
  • Instances for MArray
Depends on 3 packages(full list with versions):
Used by 1 package in lts-12.26(full list with versions):