The ST monad, originally devised by Launchbury and Peyton Jones, allows Haskell programmers to write imperative code (with mutable variables, arrays, etc.) while obtaining a pure interface to that code.
More concretely, the polymorphic type of the entry point function
runST :: (forall s. ST s a) -> a
ensures that all side-effects of the ST
computation is contained, and the resulting value is pure.
Has this ever been rigorously (or even formally) proven?