[Haskell-cafe] Trouble with the ST monad
Andre Nathan
andre at digirati.com.br
Sun Dec 21 19:14:00 EST 2008
Hello,
I'm trying to write a function that would take an STArray and and
shuffle its elements. I'm having trouble with the ST monad, though, and
couldn't find out how fix this issue.
The problem happens when I use runST to extract the shuffled array from
the ST monad. I'm getting the following error:
Inferred type is less polymorphic than expected
Quantified type variable `s' is mentioned in the environment:
a :: STArray s Int a
The full code is at
http://hpaste.org/13240#a1
Any help would be appreciated.
Thanks,
Andre
More information about the Haskell-Cafe
mailing list