tcfail068.hs:45: A type signature is more polymorphic than the inferred type Can't for-all the type variable(s) `a1jl' in the type `ST a1jl a1jh' In the first argument of `runST', namely `(itrapstate' i k s)' In an equation for function `itrapstate': itrapstate ((i, k), (j, l)) f c d s arr = runST (itrapstate' i k s) where itrapstatesnd i k s = if i > j then return (s, (arr)) else ((readArray arr (i, (k))) >>= (\ val -> let (newstate, newval) = f (c (i, (k)) s) val in (...) >> (...))) itrapstate' i k s = if k > l then return (s, (arr)) else ((itrapstatesnd i k s) >>= (\ (s, arr) -> itrapstate' i (k + 1) s)) tcfail068.hs:32: A type signature is more polymorphic than the inferred type Can't for-all the type variable(s) `a1m6' in the type `ST a1m6 a1m2' In the first argument of `runST', namely `(itrap' i k)' In an equation for function `itrap': itrap ((i, k), (j, l)) f arr = runST (itrap' i k) where itrapsnd i k = if i > j then return arr else ((readArray arr (i, (k))) >>= (\ val -> (writeArray arr (i, (k)) (f val)) >> (itrapsnd (... + 1) k))) itrap' i k = if k > l then return arr else ((itrapsnd i k) >> (itrap' i (k + 1))) tcfail068.hs:21: A type signature is more polymorphic than the inferred type Can't for-all the type variable(s) `a1mB' in the type `ST a1mB a1mr' In the first argument of `runST', namely `((readArray arr i) >>= (\ val -> (writeArray arr i (f val)) >> (return arr)))' In an equation for function `itiap': itiap i f arr = runST ((readArray arr i) >>= (\ val -> (writeArray arr i (f val)) >> (return arr))) tcfail068.hs:14: A type signature is more polymorphic than the inferred type Can't for-all the type variable(s) `a1nB' in the type `ST a1nB a1nx' In the first argument of `runST', namely `(newArray ((1, (1)), (n)) x)' In an equation for function `itgen': itgen n x = runST (newArray ((1, (1)), (n)) x) Compilation had errors