summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/Defer02.stderr
blob: 83e9f7d157cab26d79742711f0de1ae46be2c040 (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

../../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: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)) arising from the literal ‘1’
        (maybe you haven't applied a function to enough arguments?)
    • 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’
    • 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'
    • Relevant bindings include
        f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)

../../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 :: forall a. a -> (Char, Char)
        at ../../typecheck/should_run/Defer01.hs:33:6
    • In the expression: x
      In the expression: (x, 'c')
    • 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)

../../typecheck/should_run/Defer01.hs:39:17: warning:
    • Couldn't match expected type ‘Bool’ with actual type ‘T a’
    • In the first argument of ‘not’, namely ‘(K a)’
      In the expression: (not (K 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)

../../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:
    • Ambiguous type variable ‘a1’ arising from the literal ‘23’
      prevents the constraint ‘(Num a1)’ from being solved.
      Probable fix: use a type annotation to specify what ‘a1’ should be.
      These potential instances exist:
        instance Num Integer -- Defined in ‘GHC.Num’
        instance Num Double -- Defined in ‘GHC.Float’
        instance Num Float -- Defined in ‘GHC.Float’
        ...plus two others
        (use -fprint-potential-instances to see them all)
    • 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:1: 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: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 ‘k’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      In the type signature:
        k :: (Int ~ Bool) => Int -> Bool

../../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: error:
    • 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: error:
    • 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: error:
    • 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>:7:11: error:
    • 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: error:
    • No instance for (Num (a -> a)) arising from the literal ‘1’
        (maybe you haven't applied a function to enough arguments?)
    • In the expression: 1
      In an equation for ‘d’: d = 1
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:31:5: error:
    • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
    • 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'
    • Relevant bindings include
        f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:34:8: error:
    • Couldn't match expected type ‘Char’ with actual type ‘a’
      ‘a’ is a rigid type variable bound by
        the type signature for:
          h :: forall a. a -> (Char, Char)
        at ../../typecheck/should_run/Defer01.hs:33:6
    • In the expression: x
      In the expression: (x, 'c')
    • 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)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:39:17: error:
    • Couldn't match expected type ‘Bool’ with actual type ‘T a’
    • In the first argument of ‘not’, namely ‘(K a)’
      In the expression: (not (K 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)
(deferred type error)
*** Exception: ../../typecheck/should_run/Defer01.hs:43:5: error:
    • 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>:13:8: error:
    • 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: error:
    • 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)