Bump `base` version to 4.9.0.0 (closes #11026)
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail203.hs
1 -- trac #2806
2
3 {-# LANGUAGE MagicHash, UnboxedTuples, BangPatterns #-}
4
5 module Foo where
6
7 import GHC.Base
8
9 pass1 = 'a'
10 where !x = 5#
11
12 pass2 = 'a'
13 where !(I# x) = 5
14
15 pass3 = 'a'
16 where !(b, I# x) = (True, 5)
17
18 pass4 = 'a'
19 where !(# b, I# x #) = (# True, 5 #)
20
21 pass5 = 'a'
22 where !(# b, x #) = (# True, 5# #)
23
24 fail1 = 'a'
25 where x = 5#
26
27 fail2 = 'a'
28 where (I# x) = 5
29
30 fail3 = 'a'
31 where (b, I# x) = (True, 5)
32
33 fail4 = 'a'
34 where (# b, I# x #) = (# True, 5 #)
35
36 fail5 = 'a'
37 where (# b, x #) = (# True, 5# #)
38
39 fail6 = 'a'
40 where (I# !x) = 5
41
42 fail7 = 'a'
43 where (b, !(I# x)) = (True, 5)
44
45 fail8 = 'a'
46 where (# b, !(I# x) #) = (# True, 5 #)
47
48 fail9 = 'a'
49 where (# b, !x #) = (# True, 5# #)
50 {-
51 -- Now in tcfail203a.hs, because it's an error
52 fail10 = 'a'
53 where !(b, ~(c, (I# x))) = (True, (False, 5))
54 -}