1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
tcfail068.hs:14:9:
Could not deduce (s1 ~ s)
from the context (Constructed a)
bound by the type signature for
itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
at tcfail068.hs:11:10-55
‛s1’ is a rigid type variable bound by
a type expected by the context: GHC.ST.ST s1 (IndTree s a)
at tcfail068.hs:13:9
‛s’ is a rigid type variable bound by
the type signature for
itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
at tcfail068.hs:11:10
Expected type: GHC.ST.ST s1 (IndTree s a)
Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
Relevant bindings include
itgen :: (Int, Int) -> a -> IndTree s a
(bound at tcfail068.hs:12:1)
In the first argument of ‛runST’, namely
‛(newSTArray ((1, 1), n) x)’
In the expression: runST (newSTArray ((1, 1), n) x)
tcfail068.hs:19:21:
Could not deduce (s ~ s1)
from the context (Constructed a)
bound by the type signature for
itiap :: Constructed a =>
(Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
at tcfail068.hs:16:10-75
‛s’ is a rigid type variable bound by
the type signature for
itiap :: Constructed a =>
(Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
at tcfail068.hs:16:10
‛s1’ is a rigid type variable bound by
a type expected by the context: GHC.ST.ST s1 (IndTree s a)
at tcfail068.hs:18:9
Expected type: STArray s1 (Int, Int) a
Actual type: IndTree s a
Relevant bindings include
arr :: IndTree s a (bound at tcfail068.hs:17:11)
itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
(bound at tcfail068.hs:17:1)
In the first argument of ‛readSTArray’, namely ‛arr’
In the first argument of ‛(>>=)’, namely ‛readSTArray arr i’
tcfail068.hs:24:35:
Could not deduce (s ~ s1)
from the context (Constructed a)
bound by the type signature for
itrap :: Constructed a =>
((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
at tcfail068.hs:23:10-87
‛s’ is a rigid type variable bound by
the type signature for
itrap :: Constructed a =>
((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
at tcfail068.hs:23:10
‛s1’ is a rigid type variable bound by
a type expected by the context: GHC.ST.ST s1 (IndTree s a)
at tcfail068.hs:24:29
Expected type: GHC.ST.ST s1 (IndTree s a)
Actual type: GHC.ST.ST s (IndTree s a)
Relevant bindings include
itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
(bound at tcfail068.hs:26:9)
itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
(bound at tcfail068.hs:29:9)
arr :: IndTree s a (bound at tcfail068.hs:24:23)
itrap :: ((Int, Int), (Int, Int))
-> (a -> a) -> IndTree s a -> IndTree s a
(bound at tcfail068.hs:24:1)
In the first argument of ‛runST’, namely ‛(itrap' i k)’
In the expression: runST (itrap' i k)
tcfail068.hs:36:46:
Could not deduce (s ~ s1)
from the context (Constructed b)
bound by the type signature for
itrapstate :: Constructed b =>
((Int, Int), (Int, Int))
-> (a -> b -> (a, b))
-> ((Int, Int) -> c -> a)
-> (a -> c)
-> c
-> IndTree s b
-> (c, IndTree s b)
at tcfail068.hs:(34,15)-(35,62)
‛s’ is a rigid type variable bound by
the type signature for
itrapstate :: Constructed b =>
((Int, Int), (Int, Int))
-> (a -> b -> (a, b))
-> ((Int, Int) -> c -> a)
-> (a -> c)
-> c
-> IndTree s b
-> (c, IndTree s b)
at tcfail068.hs:34:15
‛s1’ is a rigid type variable bound by
a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
at tcfail068.hs:36:40
Expected type: GHC.ST.ST s1 (c, IndTree s b)
Actual type: GHC.ST.ST s (c, IndTree s b)
Relevant bindings include
itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
(bound at tcfail068.hs:38:9)
itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
(bound at tcfail068.hs:41:9)
arr :: IndTree s b (bound at tcfail068.hs:36:34)
itrapstate :: ((Int, Int), (Int, Int))
-> (a -> b -> (a, b))
-> ((Int, Int) -> c -> a)
-> (a -> c)
-> c
-> IndTree s b
-> (c, IndTree s b)
(bound at tcfail068.hs:36:1)
In the first argument of ‛runST’, namely ‛(itrapstate' i k s)’
In the expression: runST (itrapstate' i k s)
|