[Haskell-cafe] problem using ST monad
ninegua at gmail.com
Sun Oct 26 08:17:43 EDT 2008
Thanks very much for the explanation, I now have a better understanding.
On 10/26/08, David Menendez <dave at zednenem.com> wrote:
> It may be helpful to rewrite the types with a more explicit notation.
> For example,
> runST :: (a :: *) -> ((s :: *) -> ST s a) -> a
> mapST_wrong :: (a :: *) -> (b :: *) -> (s :: *) -> (f :: a -> ST s b) -> [a] -> [b]
> mapST_right :: (a :: *) -> (b :: *) -> (f :: (s :: *) -> a -> ST s b) -> [a] -> [b]
Is this the kind syntax? Very cool indeed!
On 10/26/08, Henning Thielemann <lemming at henning-thielemann.de> wrote:
> I think mapM with subsequent runST should work.
Ha, glad that you mentioned it, the purpose I was trying at mapST is to
eventually use `par` to enable parallel evalation of a set of ST monads
instead of, let's say, using thread with IO monads.
Yale Haskell Group
More information about the Haskell-Cafe