
3 Jan
2006
3 Jan
'06
5:47 a.m.
Bulat Ziganshin wrote: the following code can't go through typechecking
import Control.Monad.ST import Data.Array.ST main = print $ runST $ do arr <- newArray (1,10) 127 a <- readArray arr 1 writeArray arr 1 216 b <- readArray arr 1 return (a,b)
Indeed. The short answer: use runST (long expression) rather than runST $ long expression when it comes to higher-ranked functions such as runST. A longer answer: http://www.haskell.org/pipermail/haskell-cafe/2004-December/008062.html
let me know what i need to read to fix it myself MLF (see Daan Leijen, A. Loeh, `Qualified types for MLF', ICFP05)
7078
Age (days ago)
7078
Last active (days ago)
0 comments
1 participants
participants (1)
-
oleg@pobox.com