Am Sonntag, 24. August 2008 17:21 schrieb Yitzchak Gale: > 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 > monad.
No, return (fn particle) :: ST s (IO ()) , so that's fine. Indeed, filling in a few dummies, the code compiles with the 6.8 branch. > > Regards, > Yitz Cheers, Daniel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe