summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/Defer02.stderr
blob: 4f58b026953d86775cb1bf329129d8f41b55311b (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

../../typecheck/should_run/Defer01.hs:11:40: Warning:
    Couldn't match type ‘Char’ with ‘[Char]’
    Expected type: String
      Actual type: Char
    In the first argument of ‘putStr’, namely ‘','’
    In the second argument of ‘(>>)’, namely ‘putStr ','’
    In the expression: putStr "Hello World" >> putStr ','

../../typecheck/should_run/Defer01.hs:14:5: Warning:
    Couldn't match expected type ‘Int’ with actual type ‘Char’
    In the expression: 'p'
    In an equation for ‘a’: a = 'p'

../../typecheck/should_run/Defer01.hs:18:9: Warning:
    No instance for (Eq B) arising from a use of ‘==’
    In the expression: x == x
    In an equation for ‘b’: b x = x == x

../../typecheck/should_run/Defer01.hs:25:4: Warning:
    Couldn't match type ‘Int’ with ‘Bool’
    Inaccessible code in
      a pattern with constructor
        C2 :: Bool -> C Bool,
      in an equation for ‘c’
    In the pattern: C2 x
    In an equation for ‘c’: c (C2 x) = True

../../typecheck/should_run/Defer01.hs:28:5: Warning:
    No instance for (Num (a -> a))
      (maybe you haven't applied enough arguments to a function?)
      arising from the literal ‘1’
    In the expression: 1
    In an equation for ‘d’: d = 1

../../typecheck/should_run/Defer01.hs:31:5: Warning:
    Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
    Relevant bindings include
      f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
    The function ‘e’ is applied to one argument,
    but its type ‘Char’ has none
    In the expression: e 'q'
    In an equation for ‘f’: f = e 'q'

../../typecheck/should_run/Defer01.hs:34:8: Warning:
    Couldn't match expected type ‘Char’ with actual type ‘a’
      ‘a’ is a rigid type variable bound by
          the type signature for h :: a -> (Char, Char)
          at ../../typecheck/should_run/Defer01.hs:33:6
    Relevant bindings include
      x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
      h :: a -> (Char, Char)
        (bound at ../../typecheck/should_run/Defer01.hs:34:1)
    In the expression: x
    In the expression: (x, 'c')

../../typecheck/should_run/Defer01.hs:39:17: Warning:
    Couldn't match expected type ‘Bool’ with actual type ‘T a’
    Relevant bindings include
      a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
      i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
    In the first argument of ‘not’, namely ‘(K a)’
    In the expression: (not (K a))

../../typecheck/should_run/Defer01.hs:43:5: Warning:
    No instance for (MyClass a1) arising from a use of ‘myOp’
    In the expression: myOp 23
    In an equation for ‘j’: j = myOp 23

../../typecheck/should_run/Defer01.hs:43:10: Warning:
    No instance for (Num a1) arising from the literal ‘23’
    The type variable ‘a1’ is ambiguous
    Note: there are several potential instances:
      instance Num Integer -- Defined in ‘GHC.Num’
      instance Num Double -- Defined in ‘GHC.Float’
      instance Num Float -- Defined in ‘GHC.Float’
      ...plus two others
    In the first argument of ‘myOp’, namely ‘23’
    In the expression: myOp 23
    In an equation for ‘j’: j = myOp 23

../../typecheck/should_run/Defer01.hs:45:6: Warning:
    Couldn't match type ‘Int’ with ‘Bool’
    Inaccessible code in
      the type signature for k :: (Int ~ Bool) => Int -> Bool
    In the ambiguity check for: (Int ~ Bool) => Int -> Bool
    To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
    In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool

../../typecheck/should_run/Defer01.hs:45:6: Warning:
    Couldn't match expected type ‘Bool’ with actual type ‘Int’
    In the ambiguity check for: (Int ~ Bool) => Int -> Bool
    To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
    In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool

../../typecheck/should_run/Defer01.hs:45:6: Warning:
    Couldn't match type ‘Int’ with ‘Bool’
    Inaccessible code in
      the type signature for k :: (Int ~ Bool) => Int -> Bool

../../typecheck/should_run/Defer01.hs:46:7: Warning:
    Couldn't match expected type ‘Bool’ with actual type ‘Int’
    In the expression: x
    In an equation for ‘k’: k x = x

../../typecheck/should_run/Defer01.hs:49:5: Warning:
    Couldn't match expected type ‘IO a0’
                with actual type ‘Char -> IO ()’
    Probable cause: ‘putChar’ is applied to too few arguments
    In the first argument of ‘(>>)’, namely ‘putChar’
    In the expression: putChar >> putChar 'p'
*** Exception: ../../typecheck/should_run/Defer01.hs:11:40:
    Couldn't match type ‘Char’ with ‘[Char]’
    Expected type: String
      Actual type: Char
    In the first argument of ‘putStr’, namely ‘','’
    In the second argument of ‘(>>)’, namely ‘putStr ','’
    In the expression: putStr "Hello World" >> putStr ','
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:14:5:
    Couldn't match expected type ‘Int’ with actual type ‘Char’
    In the expression: 'p'
    In an equation for ‘a’: a = 'p'
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:18:9:
    No instance for (Eq B) arising from a use of ‘==’
    In the expression: x == x
    In an equation for ‘b’: b x = x == x
(deferred type error)

<interactive>:8:11:
    Couldn't match type ‘Bool’ with ‘Int’
    Expected type: C Int
      Actual type: C Bool
    In the first argument of ‘c’, namely ‘(C2 True)’
    In the first argument of ‘print’, namely ‘(c (C2 True))’
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
    No instance for (Num (a -> a))
      (maybe you haven't applied enough arguments to a function?)
      arising from the literal ‘1’
    In the expression: 1
    In an equation for ‘d’: d = 1
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:31:5:
    Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
    Relevant bindings include
      f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
    The function ‘e’ is applied to one argument,
    but its type ‘Char’ has none
    In the expression: e 'q'
    In an equation for ‘f’: f = e 'q'
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:34:8:
    Couldn't match expected type ‘Char’ with actual type ‘a’
      ‘a’ is a rigid type variable bound by
          the type signature for h :: a -> (Char, Char)
          at ../../typecheck/should_run/Defer01.hs:33:6
    Relevant bindings include
      x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
      h :: a -> (Char, Char)
        (bound at ../../typecheck/should_run/Defer01.hs:34:1)
    In the expression: x
    In the expression: (x, 'c')
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:39:17:
    Couldn't match expected type ‘Bool’ with actual type ‘T a’
    Relevant bindings include
      a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
      i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1)
    In the first argument of ‘not’, namely ‘(K a)’
    In the expression: (not (K a))
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:43:5:
    No instance for (MyClass a1) arising from a use of ‘myOp’
    In the expression: myOp 23
    In an equation for ‘j’: j = myOp 23
(deferred type error)

<interactive>:14:8:
    Couldn't match expected type ‘Bool’ with actual type ‘Int’
    In the first argument of ‘print’, namely ‘(k 2)’
    In the expression: print (k 2)
    In an equation for ‘it’: it = print (k 2)
*** Exception: ../../typecheck/should_run/Defer01.hs:49:5:
    Couldn't match expected type ‘IO a0’
                with actual type ‘Char -> IO ()’
    Probable cause: ‘putChar’ is applied to too few arguments
    In the first argument of ‘(>>)’, namely ‘putChar’
    In the expression: putChar >> putChar 'p'
(deferred type error)