[Haskell-cafe] forall & ST monad

Kim-Ee Yeoh a.biurvOir4 at asuhan.com
Sun Feb 15 14:50:20 EST 2009

Peter Verswyvelen-2 wrote:
> I could try to read the article a couple of times again, but are there any
> other good readings about these existentially quantified types and how the
> ST monad works?

The primary source is if I'm not mistaken, the following 
"State in Haskell" paper:


Having said that, I'm not sure about the statement on page 9
that "readVar v simply does not have type forall s. ST s Bool." 
The variable v could be of type "forall s. MutVar s Bool", 
in which case all of "runST (readVar v)" typechecks.

The sticking point really arises from "runST (newVar True)". 
So there isn't really "the other way round", but rather only 
one way.

Am I misreading something? A minor nit, to be sure.

View this message in context: http://www.nabble.com/forall---ST-monad-tp22024677p22026629.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list