3 Inferred type is less polymorphic than expected
4 Quantified type variable `s' escapes
5 It is reachable from the type variable(s) `a'
6 which is free in the signature
7 Signature type: forall s. ST s a
8 Type to generalise: ST s1 (IndTree s1 a1)
9 When checking an expression type signature
10 In the first argument of `runST', namely
11 `(newSTArray ((1, 1), n) x)'
12 in the definition of function `itgen':
13 runST (newSTArray ((1, 1), n) x)
16 Inferred type is less polymorphic than expected
17 Quantified type variable `s' escapes
18 It unifies with `s1', which is mentioned in the environment
19 The following variables in the environment mention `s1'
21 Signature type: forall s. ST s a1
22 Type to generalise: ST s1 (IndTree s1 a)
23 When checking an expression type signature
24 In the first argument of `runST', namely
26 >>= (\ val -> (writeSTArray arr i (f val)) >> (return arr)))'
27 in the definition of function `itiap':
28 runST ((readSTArray arr i)
29 >>= (\ val -> (writeSTArray arr i (f val)) >> (return arr)))
32 Inferred type is less polymorphic than expected
33 Quantified type variable `s' escapes
34 It unifies with `s1', which is mentioned in the environment
35 The following variables in the environment mention `s1'
36 itrap' :: Int -> Int -> ST s1 (IndTree s1 a)
37 itrapsnd :: Int -> Int -> ST s1 (IndTree s1 a)
39 Signature type: forall s. ST s a1
40 Type to generalise: ST s1 (IndTree s1 a)
41 When checking an expression type signature
42 In the first argument of `runST', namely `(itrap' i k)'
43 in the definition of function `itrap': runST (itrap' i k)
46 Inferred type is less polymorphic than expected
47 Quantified type variable `s' escapes
48 It unifies with `s1', which is mentioned in the environment
49 The following variables in the environment mention `s1'
50 itrapstate' :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
51 itrapstatesnd :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
53 Signature type: forall s. ST s a
54 Type to generalise: ST s1 (c, IndTree s1 b)
55 When checking an expression type signature
56 In the first argument of `runST', namely `(itrapstate' i k s)'
57 in the definition of function `itrapstate':
58 runST (itrapstate' i k s)