RE: Re[4]: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Simon Peyton-Jones

|  | ps: you successfully going through all the standard Haskell
troubles
|  in
|  | this area :)  seems that making FAQ about using ST monad will be a
|  | good idea :)
| 
|  Indeed. If someone would like to start one, a good place for it
would be
|  GHC's collaborative-documentation Wiki
| 
http://haskell.org/haskellwiki/GHC#Collaborative_documentation
| 
| they are not ghc-specific, afaik

Some aspects are -- e.g. the behaviour of higher-rank types.   But by
all means attach it somewhere else

S


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[4]: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Chad Scherrer

The IO monad hasn't given me too much trouble, but I want to be sure
to structure things the way they should be. If I get everything
running using IO first and then have type-checking problems with ST,
it will be tempting to just slap on an unsafePerformIO and call it
good. Sure, it's really doing the same thing anyway, but it just comes
out looking like a hack.

On 7/20/06, Bulat Ziganshin [EMAIL PROTECTED] wrote:

Hello Chad,

Friday, July 21, 2006, 12:26:58 AM, you wrote:

 Ok, I see now why the return is necessary.

btw, it may be helpful to read IO inside material. ST monad is not
very different from IO monad - it only limited to operations on STRef
and STArray, so that it can't have side-effects visible outside of
runST statement used to run ST computation


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe