[Haskell] ST vs State

Dan Weston westondan at imageworks.com
Thu May 31 13:23:02 EDT 2007

I thought the types were *existentially* quantified because the 
constructor arguments were *universally* quantified. Or did I get it 


Wolfgang Jeltsch wrote:
> Am Mittwoch, 30. Mai 2007 14:09 schrieb Brandon S. Allbery KF8NH:
>> On May 30, 2007, at 5:59 , Federico Squartini wrote:
>>> I suppose there is something "under the hood" which makes them
>>> different, but I cannot figure out what.
>> For one thing, ST uses existential types to prevent values from
>> leaking outside the monad.
> ST uses universally-quantified types.
> Also note that an important difference between State and ST is that State can 
> be implemented in pure Haskell while ST has to be hard-wired into the 
> compiler/interpreter or implemented in Haskell using unsafe features.
> Best wishes,
> Wolfgang
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

More information about the Haskell mailing list