summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
blob: 77e108dfbd6ccb591c4fc23ad3c80d833e76438b (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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
[1 of 2] Compiling ValidSubs        ( ValidSubs.hs, ValidSubs.o )
[2 of 2] Compiling Foo              ( valid_substitutions.hs, valid_substitutions.o )

valid_substitutions.hs:9:6: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
    • Variable not in scope: putStrLn :: String -> IO ()
    • Perhaps you meant one of these:
        ‘System.IO.putStrLn’ (imported from System.IO),
        ‘System.IO.putStr’ (imported from System.IO)
      Perhaps you want to remove ‘putStrLn’ from the explicit hiding list
      in the import of ‘Prelude’ (valid_substitutions.hs:3:1-40).

valid_substitutions.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Int -> IO Int
    • In the expression: _
      In a stmt of a 'do' block: y <- _ x
      In the expression:
        do x <- a 0
           y <- _ x
           return y
    • Relevant bindings include
        x :: Int (bound at valid_substitutions.hs:16:12)
        c :: Int -> IO Int (bound at valid_substitutions.hs:16:1)
      Valid substitutions include
        a :: Int -> IO Int (defined at valid_substitutions.hs:12:1)
        b :: Int -> IO Int (defined at valid_substitutions.hs:14:1)
        c :: Int -> IO Int (defined at valid_substitutions.hs:16:1)
        return :: forall (m :: * -> *). Monad m => forall a. a -> m a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))

valid_substitutions.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: [Maybe a] -> [a]
      Where: ‘a’ is a rigid type variable bound by
               the type signature for:
                 test :: forall a. [Maybe a] -> [a]
               at valid_substitutions.hs:20:1-24
    • In the expression: _
      In an equation for ‘test’: test = _
    • Relevant bindings include
        test :: [Maybe a] -> [a] (bound at valid_substitutions.hs:21:1)
      Valid substitutions include
        test :: forall a. [Maybe a] -> [a]
          (defined at valid_substitutions.hs:21:1)
        catMaybes :: forall a. [Maybe a] -> [a]
          (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17)
        mempty :: forall a. Monoid a => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))

valid_substitutions.hs:24:9: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Integer -> ValidSubs.Moo
    • In the expression: _
      In an equation for ‘test2’: test2 = _
    • Relevant bindings include
        test2 :: Integer -> ValidSubs.Moo
          (bound at valid_substitutions.hs:24:1)
      Valid substitutions include
        test2 :: Integer -> ValidSubs.Moo
          (defined at valid_substitutions.hs:24:1)
        ValidSubs.Moo :: Integer -> ValidSubs.Moo
          (imported qualified from ‘ValidSubs’ at valid_substitutions.hs:6:1-26
           (and originally defined at ValidSubs.hs:4:12-22))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))

valid_substitutions.hs:27:5: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Integer -> Maybe Integer
    • In the expression: _
      In the expression: _ 2
      In an equation for ‘k’: k = _ 2
    • Relevant bindings include
        k :: Maybe Integer (bound at valid_substitutions.hs:27:1)
      Valid substitutions include
        Just :: forall a. a -> Maybe a
          (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17
           (and originally defined in ‘GHC.Base’))
        return :: forall (m :: * -> *). Monad m => forall a. a -> m a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))

valid_substitutions.hs:30:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
    • Ambiguous type variable ‘a1’ arising from a use of ‘show’
      prevents the constraint ‘(Show a1)’ from being solved.
      Probable fix: use a type annotation to specify what ‘a1’ should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ‘Data.Either’
        instance Show Ordering -- Defined in ‘GHC.Show’
        instance Show Integer -- Defined in ‘GHC.Show’
        ...plus 23 others
        ...plus 67 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: show _
      In an equation for ‘f’: f = show _

valid_substitutions.hs:30:10: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: a1
      Where: ‘a1’ is an ambiguous type variable
    • In the first argument of ‘show’, namely ‘_’
      In the expression: show _
      In an equation for ‘f’: f = show _
    • Relevant bindings include
        f :: String (bound at valid_substitutions.hs:30:1)
      Valid substitutions include
        f :: String (defined at valid_substitutions.hs:30:1)
        h :: String (defined at valid_substitutions.hs:34:1)
        k :: Maybe Integer (defined at valid_substitutions.hs:27:1)
        EQ :: Ordering
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        LT :: Ordering
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        GT :: Ordering
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        pi :: forall a. Floating a => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Float’))
        otherwise :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        False :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        True :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))

valid_substitutions.hs:34:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
    • Ambiguous type variable ‘a0’ arising from a use of ‘show’
      prevents the constraint ‘(Show a0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘a0’ should be.
      These potential instances exist:
        instance (Show a, Show b) => Show (Either a b)
          -- Defined in ‘Data.Either’
        instance Show Ordering -- Defined in ‘GHC.Show’
        instance Show Integer -- Defined in ‘GHC.Show’
        ...plus 23 others
        ...plus 67 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: show (_ (_ :: Bool))
      In an equation for ‘h’: h = show (_ (_ :: Bool))

valid_substitutions.hs:34:11: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Bool -> a0
      Where: ‘a0’ is an ambiguous type variable
    • In the expression: _
      In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
      In the expression: show (_ (_ :: Bool))
    • Relevant bindings include
        h :: String (bound at valid_substitutions.hs:34:1)
      Valid substitutions include
        show :: forall a. Show a => a -> String
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Show’))
        fromEnum :: forall a. Enum a => a -> Int
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        not :: Bool -> Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Classes’))
        pred :: forall a. Enum a => a -> a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        succ :: forall a. Enum a => a -> a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        id :: forall a. a -> a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        Just :: forall a. a -> Maybe a
          (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17
           (and originally defined in ‘GHC.Base’))
        enumFrom :: forall a. Enum a => a -> [a]
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        repeat :: forall a. a -> [a]
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.List’))

valid_substitutions.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Bool
    • In the first argument of ‘_’, namely ‘(_ :: Bool)’
      In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
      In the expression: show (_ (_ :: Bool))
    • Relevant bindings include
        h :: String (bound at valid_substitutions.hs:34:1)
      Valid substitutions include
        otherwise :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        False :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        True :: Bool
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        maxBound :: forall a. Bounded a => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        minBound :: forall a. Bounded a => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))

valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: [Char] -> IO ()
    • In the expression: _
      In the expression: _ "hello, world"
      In an equation for ‘main’: main = _ "hello, world"
    • Relevant bindings include
        main :: IO () (bound at valid_substitutions.hs:37:1)
      Valid substitutions include
        ps :: String -> IO () (defined at valid_substitutions.hs:9:1)
        System.IO.putStr :: String -> IO ()
          (imported qualified from ‘System.IO’ at valid_substitutions.hs:4:29-34)
        System.IO.putStrLn :: String -> IO ()
          (imported qualified from ‘System.IO’ at valid_substitutions.hs:4:37-44)
        readIO :: forall a. Read a => String -> IO a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘System.IO’))
        fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        error :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))
        errorWithoutStackTrace :: forall a. [Char] -> a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))
        print :: forall a. Show a => a -> IO ()
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘System.IO’))
        mempty :: forall a. Monoid a => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        undefined :: forall a. GHC.Stack.Types.HasCallStack => a
          (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
           (and originally defined in ‘GHC.Err’))