[Haskell-cafe] ST and Transformers
J. Garrett Morris
trevion at gmail.com
Fri Dec 22 12:26:30 EST 2006
I recently found myself attempting to use ST at the base of a stack of
type Test t r = ErrorT String (ST t) r
I imagined, given the type of ST, that I would need a run function
along the lines of:
runTest :: (forall t. Test t r) -> Either String r
(which was, in fact, exactly what I wanted). Unfortunately, even with
that type signature, I can't find a way to convince the compiler that
the state thread is properly universal in the call to runST. Is it
possible to write this function, or is ST (and other monads that use
its style of threading) not transformable?
It is myself I have never met, whose face is pasted on the underside of my mind.
More information about the Haskell-Cafe