This library provides support for strict state threads, as
described in the PLDI '94 paper by John Launchbury and Simon Peyton
Jones [LazyStateThreads]. In addition to the monad ST,
it also provides mutable variables STRef and mutable arrays
STArray.

The operations freezeSTArray and thawSTArray convert mutable
arrays to and from immutable arrays. Semantically, they are identical
to copying the array and they are usually implemented that way. The
operation unsafeFreezeSTArray is a faster version of
freezeSTArray which omits the copying step. It's a safe substitute for
freezeSTArray if you don't modify the mutable array after freezing it.

Hugs provides thenLazyST and thenStrictST so that you can
import LazyST (say) and still use the strict instance in those
places where it matters. GHC implements LazyST and ST using different
types, so this isn't possible.

Operations for coercing an ST action into an IO one, and
vice versa are also provided. Notice that coercing an IO action
into an ST action is 'lossy', since any exception raised within the
IO action will not be caught within the ST monad, as it
doesn't support (monadic) exceptions.