summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
blob: 4ef63821ca17b9c688a51f85b7348e1bf0d230f4 (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
259
[1 of 2] Compiling ValidHoleFits    ( ValidHoleFits.hs, ValidHoleFits.o )
[2 of 2] Compiling Foo              ( valid_hole_fits.hs, valid_hole_fits.o )

valid_hole_fits.hs:9:6: warning: [GHC-88464] [-Wdeferred-out-of-scope-variables (in -Wdefault)]
    Variable not in scope: putStrLn :: String -> IO ()
    Suggested fixes:
      • Perhaps use 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_hole_fits.hs:3:1-40).

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

valid_hole_fits.hs:21:8: warning: [GHC-88464] [-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_hole_fits.hs:20:1-24
    • In an equation for ‘test’: test = _
    • Relevant bindings include
        test :: [Maybe a] -> [a] (bound at valid_hole_fits.hs:21:1)
      Valid hole fits include
        test :: [Maybe a] -> [a] (bound at valid_hole_fits.hs:21:1)
        catMaybes :: forall a. [Maybe a] -> [a]
          with catMaybes @a
          (imported from ‘Data.Maybe’ at valid_hole_fits.hs:5:1-17)
        mempty :: forall a. Monoid a => a
          with mempty @([Maybe a] -> [a])
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))

valid_hole_fits.hs:24:9: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: Integer -> ValidHoleFits.Moo
    • In an equation for ‘test2’: test2 = _
    • Relevant bindings include
        test2 :: Integer -> ValidHoleFits.Moo
          (bound at valid_hole_fits.hs:24:1)
      Valid hole fits include
        test2 :: Integer -> ValidHoleFits.Moo
          (bound at valid_hole_fits.hs:24:1)
        ValidHoleFits.Moo :: Integer -> ValidHoleFits.Moo
          (imported qualified from ‘ValidHoleFits’ at valid_hole_fits.hs:6:1-30
           (and originally defined at ValidHoleFits.hs:4:12-22))

valid_hole_fits.hs:27:5: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: t0 -> Maybe Integer
      Where: ‘t0’ is an ambiguous type variable
    • In the expression: _ 2
      In an equation for ‘k’: k = _ 2
    • Relevant bindings include
        k :: Maybe Integer (bound at valid_hole_fits.hs:27:1)
      Valid hole fits include
        Just :: forall a. a -> Maybe a
          with Just @Integer
          (imported from ‘Data.Maybe’ at valid_hole_fits.hs:5:1-17
           (and originally defined in ‘GHC.Maybe’))
        return :: forall (m :: * -> *) a. Monad m => a -> m a
          with return @Maybe @Integer
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        pure :: forall (f :: * -> *) a. Applicative f => a -> f a
          with pure @Maybe @Integer
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))

valid_hole_fits.hs:30:10: warning: [GHC-88464] [-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_hole_fits.hs:30:1)
      Valid hole fits include
        f :: String (bound at valid_hole_fits.hs:30:1)
        k :: Maybe Integer (defined at valid_hole_fits.hs:27:1)
        h :: String (bound at valid_hole_fits.hs:34:1)
        otherwise :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        False :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        True :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        LT :: Ordering
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        EQ :: Ordering
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        GT :: Ordering
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        () :: () (bound at <wired into compiler>)
        pi :: forall a. Floating a => a
          with pi @Double
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Float’))

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

valid_hole_fits.hs:34:14: warning: [GHC-88464] [-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_hole_fits.hs:34:1)
      Valid hole fits include
        otherwise :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        False :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        True :: Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Types’))
        maxBound :: forall a. Bounded a => a
          with maxBound @Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))
        minBound :: forall a. Bounded a => a
          with minBound @Bool
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Enum’))

valid_hole_fits.hs:38:10: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: a -> [a] -> [a]
      Where: ‘a’ is a rigid type variable bound by
               the type signature for:
                 myCons :: forall a. a -> [a] -> [a]
               at valid_hole_fits.hs:37:1-25
    • In an equation for ‘myCons’: myCons = _
    • Relevant bindings include
        myCons :: a -> [a] -> [a] (bound at valid_hole_fits.hs:38:1)
      Valid hole fits include
        myCons :: a -> [a] -> [a] (bound at valid_hole_fits.hs:38:1)
        (:) :: forall a. a -> [a] -> [a]
          with (:) @a
          (bound at <wired into compiler>)
        (<$) :: forall (f :: * -> *) a b. Functor f => a -> f b -> f a
          with (<$) @[] @a @a
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))
        seq :: forall a b. a -> b -> b
          with seq @a @[a]
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Prim’))
        mempty :: forall a. Monoid a => a
          with mempty @(a -> [a] -> [a])
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))

valid_hole_fits.hs:41:8: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    • Found hole: _ :: String -> IO ()
    • In the expression: _ "hello, world"
      In an equation for ‘main’: main = _ "hello, world"
    • Relevant bindings include
        main :: IO () (bound at valid_hole_fits.hs:41:1)
      Valid hole fits include
        ps :: String -> IO () (defined at valid_hole_fits.hs:9:1)
        System.IO.putStr :: String -> IO ()
          (imported qualified from ‘System.IO’ at valid_hole_fits.hs:4:29-34)
        System.IO.putStrLn :: String -> IO ()
          (imported qualified from ‘System.IO’ at valid_hole_fits.hs:4:37-44)
        readIO :: forall a. Read a => String -> IO a
          with readIO @()
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘System.IO’))
        print :: forall a. Show a => a -> IO ()
          with print @String
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘System.IO’))
        fail :: forall (m :: * -> *) a. MonadFail m => String -> m a
          with fail @IO @()
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘Control.Monad.Fail’))
        mempty :: forall a. Monoid a => a
          with mempty @(String -> IO ())
          (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
           (and originally defined in ‘GHC.Base’))