[project @ 1997-12-16 16:27:38 by simonm]
[ghc-hetmet.git] / ghc / tests / typecheck / should_fail / tcfail068.stderr
1  
2 tcfail068.hs:45: A type signature is more polymorphic than the inferred type
3                      Can't for-all the type variable(s) `ta16y'
4                      in the inferred type `ST ta16y (ta16r, IndTree ta16y ta16o)'
5     In a polymorphic function argument `(itrapstate' i k s)'
6     In the first argument of `runST', namely `(itrapstate' i k s)'
7     In an equation for function `itrapstate':
8         `itrapstate ((i, k), (j, l)) f c d s arr
9                     = runST (itrapstate' i k s)
10                     where
11                         itrapstatesnd i k s
12                                       = if i > j then
13                                             return (s, (arr))
14                                         else
15                                             ((readArray arr (i, (k)))
16                                              >>= (\ val
17                                                     -> let (newstate, newval) = f (c (i, (k)) s) val
18                                                        in
19                                                          (writeArray arr (i, (k)) newval)
20                                                          >> (itrapstatesnd (i + 1) k (d newstate))))
21                         itrapstate' i k s
22                                     = if k > l then
23                                           return (s, (arr))
24                                       else
25                                           ((itrapstatesnd i k s)
26                                            >>= (\ (s, arr) -> itrapstate' i (k + 1) s))'
27  
28 tcfail068.hs:32: A type signature is more polymorphic than the inferred type
29                      Can't for-all the type variable(s) `ta19A'
30                      in the inferred type `ST ta19A (IndTree ta19A ta19x)'
31     In a polymorphic function argument `(itrap' i k)'
32     In the first argument of `runST', namely `(itrap' i k)'
33     In an equation for function `itrap':
34         `itrap ((i, k), (j, l)) f arr
35                = runST (itrap' i k)
36                where
37                    itrapsnd i k
38                             = if i > j then
39                                   return arr
40                               else
41                                   ((readArray arr (i, (k)))
42                                    >>= (\ val
43                                           -> (writeArray arr (i, (k)) (f val))
44                                              >> (itrapsnd (i + 1) k)))
45                    itrap' i k
46                           = if k > l then
47                                 return arr
48                             else
49                                 ((itrapsnd i k) >> (itrap' i (k + 1)))'
50  
51 tcfail068.hs:21: A type signature is more polymorphic than the inferred type
52                      Can't for-all the type variable(s) `ta1bT'
53                      in the inferred type `ST ta1bT (IndTree ta1bT ta1bE)'
54     In a polymorphic function argument `((readArray arr i)
55                                          >>= (\ val -> (writeArray arr i (f val)) >> (return arr)))'
56     In the first argument of `runST', namely
57         `((readArray arr i)
58           >>= (\ val -> (writeArray arr i (f val)) >> (return arr)))'
59     In an equation for function `itiap':
60         `itiap i f arr
61                = runST ((readArray arr i)
62                         >>= (\ val -> (writeArray arr i (f val)) >> (return arr)))'
63  
64 tcfail068.hs:14: A type signature is more polymorphic than the inferred type
65                      Can't for-all the type variable(s) `ta1cM'
66                      in the inferred type `ST ta1cM (IndTree ta1cM ta1cF)'
67     In a polymorphic function argument `(newArray ((1, (1)), (n)) x)'
68     In the first argument of `runST', namely
69         `(newArray ((1, (1)), (n)) x)'
70     In an equation for function `itgen':
71         `itgen n x = runST (newArray ((1, (1)), (n)) x)'
72
73 Compilation had errors