ST Monad and all that
Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place where I can get a comprehensive explanation of what's what? Its a bit fustrating trying to figure out how these concepts relate to each other by reading snippets of information on different web sites and papers (e.g. "State in Haskell"). Thanks for your help
Am Freitag, 8. Juli 2005 12:48 schrieb Srinivas Nedunuri:
Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place where I can get a comprehensive explanation of what's what? Its a bit fustrating trying to figure out how these concepts relate to each other by reading snippets of information on different web sites and papers (e.g. "State in Haskell").
Thanks for your help
Hello Srinivas, some of these identifiers are just outdated and replaces by more current ones. For example, as far as I know, STRef is the new name for MutVar. You might want to have a look at GHC's library documentation at http://haskell.org/ghc/docs/latest/html/libraries/index.html although this might not give enough information for you. Best wishes, Wolfgang
"Srinivas Nedunuri" <nedunuri@cs.utexas.edu> writes:
Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place where I can get a comprehensive explanation of what's what?
Well, a page on the Haskell Wiki tries to be that, but is in need of a lot more exampels and explanation. It gives examples of uses of the ST monad. The page very appropriately named http://haskell.org/hawiki/ImperativeHaskell Hopes, it can be of some help. Regards Peter
Am Freitag, 8. Juli 2005 18:50 schrieb Peter Eriksen:
"Srinivas Nedunuri" <nedunuri@cs.utexas.edu> writes:
Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place where I can get a comprehensive explanation of what's what?
Well, a page on the Haskell Wiki tries to be that, but is in need of a lot more exampels and explanation. It gives examples of uses of the ST monad. The page very appropriately named
http://haskell.org/hawiki/ImperativeHaskell
Hopes, it can be of some help. Regards
Peter
It would probably a good thing if this wiki page would also cover the differences between LazyST and StrictST. Best wishes, Wolfgang
participants (3)
-
Peter Eriksen -
Srinivas Nedunuri -
Wolfgang Jeltsch