[Haskell-cafe] Why doesn't this work?

Yitzchak Gale gale at sefer.org
Sun Aug 24 11:21:33 EDT 2008

Alfonso Acosta wrote:
> I haven't tried to run the code, but my first bet is that, due to the
> rank-2 polymorphism of ST, you should use parenthesis instead of $ in
> the case of runST.

Perhaps if Andrew is using an old compiler.
That is no longer a problem in recent versions of GHC.

A more basic issue is that fn is in the IO monad,
but its use inside the mapM will need it to be in the ST


More information about the Haskell-Cafe mailing list