Re: [Haskell-cafe] Composing functions with runST

2 Jan
2007
2 Jan
'07
5:25 a.m.
Hi Thomas, You wrote:
How do I "import" Control.Monad.ST so I can experiment with it from ghci and just do runST like you had. Instead of qualifying it in some way.
In GHCi, use the :module command (:m) for built-in modules, and :load and :add for source files. In Hugs, use :load and :also for both. You need to run Hugs with the -98 flag to use Control.Monad.ST.
how do I do runST as fully qualified?
Like this: Prelude> Control.Monad.ST.runST (do {r <- Data.STRef.newSTRef 2007; Data.STRef.readSTRef r}) 2007 Have fun with monads! Regards, Yitz
6713
Age (days ago)
6713
Last active (days ago)
0 comments
1 participants
participants (1)
-
Yitzchak Gale