summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs
blob: 56b9f356da5be5f493878691f1075b864b06ab78 (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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module ExtraConstraints3 where

import qualified Prelude as P

import Prelude (Bool, Bounded, Char, Either, Enum, Eq, FilePath, Floating,
                Fractional, Functor, IO, IOError, Int, Integer, Integral,
                Maybe, Monad, Num, Ord, Ordering, Rational, Read, ReadS, Real,
                RealFloat, RealFrac, Show, ShowS, String)

-- Proof by enumeration! jk :p
-- All of Prelude typechecks given the dummy type signature `_ => _`,
-- which is the same as omitting the type signature entirely.

(!!) :: _ => _
(!!) = (P.!!)
($!) :: _ => _
($!) = (P.$!)
($) :: _ => _
($) = (P.$)
(&&) :: _ => _
(&&) = (P.&&)
(*) :: _ => _
(*) = (P.*)
(**) :: _ => _
(**) = (P.**)
(+) :: _ => _
(+) = (P.+)
(++) :: _ => _
(++) = (P.++)
(-) :: _ => _
(-) = (P.-)
(.) :: _ => _
(.) = (P..)
(/) :: _ => _
(/) = (P./)
(/=) :: _ => _
(/=) = (P./=)
(<) :: _ => _
(<) = (P.<)
(<=) :: _ => _
(<=) = (P.<=)
(=<<) :: _ => _
(=<<) = (P.=<<)
(==) :: _ => _
(==) = (P.==)
(>) :: _ => _
(>) = (P.>)
(>=) :: _ => _
(>=) = (P.>=)
(>>) :: _ => _
(>>) = (P.>>)
(>>=) :: _ => _
(>>=) = (P.>>=)
(^) :: _ => _
(^) = (P.^)
(^^) :: _ => _
(^^) = (P.^^)
(||) :: _ => _
(||) = (P.||)
abs :: _ => _
abs = P.abs
acos :: _ => _
acos = P.acos
acosh :: _ => _
acosh = P.acosh
all :: _ => _
all = P.all
and :: _ => _
and = P.and
any :: _ => _
any = P.any
appendFile :: _ => _
appendFile = P.appendFile
asTypeOf :: _ => _
asTypeOf = P.asTypeOf
asin :: _ => _
asin = P.asin
asinh :: _ => _
asinh = P.asinh
atan :: _ => _
atan = P.atan
atan2 :: _ => _
atan2 = P.atan2
atanh :: _ => _
atanh = P.atanh
break :: _ => _
break = P.break
ceiling :: _ => _
ceiling = P.ceiling
compare :: _ => _
compare = P.compare
concat :: _ => _
concat = P.concat
concatMap :: _ => _
concatMap = P.concatMap
const :: _ => _
const = P.const
cos :: _ => _
cos = P.cos
cosh :: _ => _
cosh = P.cosh
curry :: _ => _
curry = P.curry
cycle :: _ => _
cycle = P.cycle
decodeFloat :: _ => _
decodeFloat = P.decodeFloat
div :: _ => _
div = P.div
divMod :: _ => _
divMod = P.divMod
drop :: _ => _
drop = P.drop
dropWhile :: _ => _
dropWhile = P.dropWhile
either :: _ => _
either = P.either
elem :: _ => _
elem = P.elem
encodeFloat :: _ => _
encodeFloat = P.encodeFloat
enumFrom :: _ => _
enumFrom = P.enumFrom
enumFromThen :: _ => _
enumFromThen = P.enumFromThen
enumFromThenTo :: _ => _
enumFromThenTo = P.enumFromThenTo
enumFromTo :: _ => _
enumFromTo = P.enumFromTo
error :: _ => _
error = P.error
even :: _ => _
even = P.even
exp :: _ => _
exp = P.exp
exponent :: _ => _
exponent = P.exponent
fail :: _ => _
fail = P.fail
filter :: _ => _
filter = P.filter
flip :: _ => _
flip = P.flip
floatDigits :: _ => _
floatDigits = P.floatDigits
floatRadix :: _ => _
floatRadix = P.floatRadix
floatRange :: _ => _
floatRange = P.floatRange
floor :: _ => _
floor = P.floor
fmap :: _ => _
fmap = P.fmap
foldl :: _ => _
foldl = P.foldl
foldl1 :: _ => _
foldl1 = P.foldl1
foldr :: _ => _
foldr = P.foldr
foldr1 :: _ => _
foldr1 = P.foldr1
fromEnum :: _ => _
fromEnum = P.fromEnum
fromInteger :: _ => _
fromInteger = P.fromInteger
fromIntegral :: _ => _
fromIntegral = P.fromIntegral
fromRational :: _ => _
fromRational = P.fromRational
fst :: _ => _
fst = P.fst
gcd :: _ => _
gcd = P.gcd
getChar :: _ => _
getChar = P.getChar
getContents :: _ => _
getContents = P.getContents
getLine :: _ => _
getLine = P.getLine
head :: _ => _
head = P.head
id :: _ => _
id = P.id
init :: _ => _
init = P.init
interact :: _ => _
interact = P.interact
ioError :: _ => _
ioError = P.ioError
isDenormalized :: _ => _
isDenormalized = P.isDenormalized
isIEEE :: _ => _
isIEEE = P.isIEEE
isInfinite :: _ => _
isInfinite = P.isInfinite
isNaN :: _ => _
isNaN = P.isNaN
isNegativeZero :: _ => _
isNegativeZero = P.isNegativeZero
iterate :: _ => _
iterate = P.iterate
last :: _ => _
last = P.last
lcm :: _ => _
lcm = P.lcm
length :: _ => _
length = P.length
lex :: _ => _
lex = P.lex
lines :: _ => _
lines = P.lines
log :: _ => _
log = P.log
logBase :: _ => _
logBase = P.logBase
lookup :: _ => _
lookup = P.lookup
map :: _ => _
map = P.map
mapM :: _ => _
mapM = P.mapM
mapM_ :: _ => _
mapM_ = P.mapM_
max :: _ => _
max = P.max
maxBound :: _ => _
maxBound = P.maxBound
maximum :: _ => _
maximum = P.maximum
maybe :: _ => _
maybe = P.maybe
min :: _ => _
min = P.min
minBound :: _ => _
minBound = P.minBound
minimum :: _ => _
minimum = P.minimum
mod :: _ => _
mod = P.mod
negate :: _ => _
negate = P.negate
not :: _ => _
not = P.not
notElem :: _ => _
notElem = P.notElem
null :: _ => _
null = P.null
odd :: _ => _
odd = P.odd
or :: _ => _
or = P.or
otherwise :: _ => _
otherwise = P.otherwise
pi :: _ => _
pi = P.pi
pred :: _ => _
pred = P.pred
print :: _ => _
print = P.print
product :: _ => _
product = P.product
properFraction :: _ => _
properFraction = P.properFraction
putChar :: _ => _
putChar = P.putChar
putStr :: _ => _
putStr = P.putStr
putStrLn :: _ => _
putStrLn = P.putStrLn
quot :: _ => _
quot = P.quot
quotRem :: _ => _
quotRem = P.quotRem
read :: _ => _
read = P.read
readFile :: _ => _
readFile = P.readFile
readIO :: _ => _
readIO = P.readIO
readList :: _ => _
readList = P.readList
readLn :: _ => _
readLn = P.readLn
readParen :: _ => _
readParen = P.readParen
reads :: _ => _
reads = P.reads
readsPrec :: _ => _
readsPrec = P.readsPrec
realToFrac :: _ => _
realToFrac = P.realToFrac
recip :: _ => _
recip = P.recip
rem :: _ => _
rem = P.rem
repeat :: _ => _
repeat = P.repeat
replicate :: _ => _
replicate = P.replicate
return :: _ => _
return = P.return
reverse :: _ => _
reverse = P.reverse
round :: _ => _
round = P.round
scaleFloat :: _ => _
scaleFloat = P.scaleFloat
scanl :: _ => _
scanl = P.scanl
scanl1 :: _ => _
scanl1 = P.scanl1
scanr :: _ => _
scanr = P.scanr
scanr1 :: _ => _
scanr1 = P.scanr1
seq :: _ => _
seq = P.seq
sequence :: _ => _
sequence = P.sequence
sequence_ :: _ => _
sequence_ = P.sequence_
show :: _ => _
show = P.show
showChar :: _ => _
showChar = P.showChar
showList :: _ => _
showList = P.showList
showParen :: _ => _
showParen = P.showParen
showString :: _ => _
showString = P.showString
shows :: _ => _
shows = P.shows
showsPrec :: _ => _
showsPrec = P.showsPrec
significand :: _ => _
significand = P.significand
signum :: _ => _
signum = P.signum
sin :: _ => _
sin = P.sin
sinh :: _ => _
sinh = P.sinh
snd :: _ => _
snd = P.snd
span :: _ => _
span = P.span
splitAt :: _ => _
splitAt = P.splitAt
sqrt :: _ => _
sqrt = P.sqrt
subtract :: _ => _
subtract = P.subtract
succ :: _ => _
succ = P.succ
sum :: _ => _
sum = P.sum
tail :: _ => _
tail = P.tail
take :: _ => _
take = P.take
takeWhile :: _ => _
takeWhile = P.takeWhile
tan :: _ => _
tan = P.tan
tanh :: _ => _
tanh = P.tanh
toEnum :: _ => _
toEnum = P.toEnum
toInteger :: _ => _
toInteger = P.toInteger
toRational :: _ => _
toRational = P.toRational
truncate :: _ => _
truncate = P.truncate
uncurry :: _ => _
uncurry = P.uncurry
undefined :: _ => _
undefined = P.undefined
unlines :: _ => _
unlines = P.unlines
until :: _ => _
until = P.until
unwords :: _ => _
unwords = P.unwords
unzip :: _ => _
unzip = P.unzip
unzip3 :: _ => _
unzip3 = P.unzip3
userError :: _ => _
userError = P.userError
words :: _ => _
words = P.words
writeFile :: _ => _
writeFile = P.writeFile
zip :: _ => _
zip = P.zip
zip3 :: _ => _
zip3 = P.zip3
zipWith :: _ => _
zipWith = P.zipWith
zipWith3 :: _ => _
zipWith3 = P.zipWith3