[Haskell-cafe] Why doesn't this work?
Alfonso Acosta
alfonso.acosta at gmail.com
Sun Aug 24 09:36:52 EDT 2008
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.
On Sun, Aug 24, 2008 at 3:25 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> colour_grid :: (Particle -> IO ()) -> Grid ph -> IO ()
> colour_grid fn g = sequence_ $ runST $ do
> ps <- grid_coords g
>
> mapM
> (\pix -> do
> particle <- read_grid g pix
> return $ fn particle
> )
> ps
>
> When I attempt to run this, GHCi just gives me a very cryptic type checker
> error. I can't figure out what's wrong here. As far as I can tell, this
> should run...
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list