Ticket #3377: TupleSections-testsuite.patch

File TupleSections-testsuite.patch, 12.0 KB (added by batterseapower, 5 years ago)
Line 
1Fri Jul 17 21:46:59 BST 2009  Max Bolingbroke <batterseapower@hotmail.com>
2  * Tests for basic TupleSections
3
4Fri Jul 17 22:24:43 BST 2009  Max Bolingbroke <batterseapower@hotmail.com>
5  * Tests for unboxed tuple sections
6
7Fri Jul 17 22:42:31 BST 2009  Max Bolingbroke <batterseapower@hotmail.com>
8  * Tweak tests for unboxed tuple sections
9
10New patches:
11
12[Tests for basic TupleSections
13Max Bolingbroke <batterseapower@hotmail.com>**20090717204659
14 Ignore-this: 7bf3a8e08b6b654f5dd9a9fba31f9cbe
15] {
16hunk ./tests/ghc-regress/rename/should_fail/all.T 68
17                   'RnFail055_aux.hi',  'RnFail055_aux.o']),
18      multimod_compile_fail,
19      ['RnFail055','-v0'])
20+test('rnfail056', if_compiler_lt('ghc', '6.11', expect_fail), compile_fail, [''])
21 
22 test('rn_dup', normal, compile_fail, [''])
23 test('T2310', normal, compile_fail, [''])
24addfile ./tests/ghc-regress/rename/should_fail/rnfail056.hs
25hunk ./tests/ghc-regress/rename/should_fail/rnfail056.hs 1
26+-- TupleSections not enabled
27+
28+module Foo where
29+
30+foo = (1,)
31addfile ./tests/ghc-regress/rename/should_fail/rnfail056.stderr
32hunk ./tests/ghc-regress/rename/should_fail/rnfail056.stderr 1
33+
34+rnfail056.hs:5:6: Illegal tuple section: use -XTupleSections
35hunk ./tests/ghc-regress/typecheck/should_fail/all.T 203
36 test('tcfail202', normal, compile_fail, [''])
37 test('tcfail203', expect_broken(2806), compile_fail, [''])
38 test('tcfail204', normal, compile_fail, [''])
39+test('tcfail206', if_compiler_lt('ghc', '6.11', expect_fail), compile_fail, [''])
40 
41 test('T1899', normal, compile_fail, [''])
42 test('T2126', normal, compile_fail, [''])
43addfile ./tests/ghc-regress/typecheck/should_fail/tcfail206.hs
44hunk ./tests/ghc-regress/typecheck/should_fail/tcfail206.hs 1
45-
46+{-# LANGUAGE TupleSections #-}
47+module Main where
48+
49+a :: Bool -> (Int, Bool)
50+a = ( , True)
51+
52+b :: Int -> Bool -> (Int, Bool)
53+b = (1, )
54+
55+c :: a -> (a, Bool)
56+c = (True || False, )
57+
58+main = return ()
59addfile ./tests/ghc-regress/typecheck/should_fail/tcfail206.stderr
60hunk ./tests/ghc-regress/typecheck/should_fail/tcfail206.stderr 1
61+
62+tcfail206.hs:5:4:
63+    Couldn't match expected type `Int' against inferred type `Bool'
64+      Expected type: Bool -> (Int, Bool)
65+      Inferred type: Bool -> (Bool, Bool)
66+    In the expression: (, True)
67+    In the definition of `a': a = (, True)
68+
69+tcfail206.hs:8:4:
70+    Couldn't match expected type `Bool -> (Int, Bool)'
71+           against inferred type `(t, Int)'
72+      Expected type: Int -> Bool -> (Int, Bool)
73+      Inferred type: Int -> (t, Int)
74+    In the expression: (1,)
75+    In the definition of `b': b = (1,)
76+
77+tcfail206.hs:11:4:
78+    Couldn't match expected type `a' against inferred type `Bool'
79+      `a' is a rigid type variable bound by
80+          the type signature for `c' at tcfail206.hs:10:5
81+      Expected type: a -> (a, Bool)
82+      Inferred type: a -> (Bool, a)
83+    In the expression: (True || False,)
84+    In the definition of `c': c = (True || False,)
85hunk ./tests/ghc-regress/typecheck/should_run/all.T 67
86 
87 test('tcrun039', only_compiler_types(['ghc']), compile_and_run, [''])
88 test('tcrun040', normal, compile_and_run, [''])
89+test('tcrun041', if_compiler_lt('ghc', '6.11', expect_fail), compile_and_run, [''])
90+test('tcrun042', if_compiler_lt('ghc', '6.11', expect_fail), compile_and_run, [''])
91 
92 test('church', normal, compile_and_run, [''])
93 test('testeq2', normal, compile_and_run, [''])
94addfile ./tests/ghc-regress/typecheck/should_run/tcrun041.hs
95hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.hs 1
96-
97+{-# LANGUAGE TupleSections #-}
98+module Main where
99+
100+a :: Int -> (Int, Bool)
101+a = ( , True)
102+
103+b :: Bool -> (Int, Bool)
104+b = (1, )
105+
106+c :: a -> (a, Bool)
107+c = (, True || False)
108+
109+d = (,1,)
110+
111+main = print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby")
112addfile ./tests/ghc-regress/typecheck/should_run/tcrun041.stdout
113hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.stdout 1
114+((1,True),(1,False),("Hello",True),(1337,True),("Yeah",1,"Baby"))
115addfile ./tests/ghc-regress/typecheck/should_run/tcrun042.hs
116hunk ./tests/ghc-regress/typecheck/should_run/tcrun042.hs 1
117-
118+{-# LANGUAGE TupleSections, RankNTypes, ImpredicativeTypes #-}
119+module Main where
120+
121+e :: a -> (forall b. b -> b -> b) -> (a, String, forall c. c -> c -> c)
122+e = (,"Hello" ++ "World",)
123+
124+dropFunction :: (a, String, forall c. c -> c -> c) -> (a, String, Int)
125+dropFunction (x, y, z) = (x, y, z 10 20)
126+
127+main = print (dropFunction $ e "Meh" (flip const), dropFunction $ e 10 const)
128addfile ./tests/ghc-regress/typecheck/should_run/tcrun042.stdout
129hunk ./tests/ghc-regress/typecheck/should_run/tcrun042.stdout 1
130+(("Meh","HelloWorld",20),(10,"HelloWorld",10))
131}
132[Tests for unboxed tuple sections
133Max Bolingbroke <batterseapower@hotmail.com>**20090717212443
134 Ignore-this: 3a31b5c69acb53e3f543c8fb92aca38e
135] {
136hunk ./tests/ghc-regress/rename/should_fail/rnfail056.hs 2
137 -- TupleSections not enabled
138+{-# LANGUAGE UnboxedTuples #-}
139 
140 module Foo where
141 
142hunk ./tests/ghc-regress/rename/should_fail/rnfail056.hs 7
143 foo = (1,)
144+
145+bar = (# 1, #)
146hunk ./tests/ghc-regress/rename/should_fail/rnfail056.stderr 2
147 
148-rnfail056.hs:5:6: Illegal tuple section: use -XTupleSections
149+rnfail056.hs:6:6: Illegal tuple section: use -XTupleSections
150+
151+rnfail056.hs:8:6: Illegal tuple section: use -XTupleSections
152hunk ./tests/ghc-regress/typecheck/should_fail/tcfail206.hs 1
153-{-# LANGUAGE TupleSections #-}
154+{-# LANGUAGE TupleSections, UnboxedTuples #-}
155 module Main where
156 
157 a :: Bool -> (Int, Bool)
158hunk ./tests/ghc-regress/typecheck/should_fail/tcfail206.hs 13
159 c :: a -> (a, Bool)
160 c = (True || False, )
161 
162+d :: Bool -> (#Int, Bool#)
163+d = (# , True#)
164+
165+e :: Int -> Bool -> (#Int, Bool#)
166+e = (#1, #)
167+
168+f :: a -> (#a, Bool#)
169+f = (#True || False, #)
170+
171 main = return ()
172hunk ./tests/ghc-regress/typecheck/should_fail/tcfail206.stderr 26
173     In the expression: (True || False,)
174     In the definition of `c': c = (True || False,)
175 
176+tcfail206.hs:14:4:
177+    Couldn't match expected type `Int' against inferred type `Bool'
178+      Expected type: Bool -> (# Int, Bool #)
179+      Inferred type: Bool -> (# Bool, Bool #)
180+    In the expression: (# , True #)
181+    In the definition of `d': d = (# , True #)
182+
183+tcfail206.hs:17:4:
184+    Couldn't match expected type `Bool -> (# Int, Bool #)'
185+           against inferred type `(# t, Int #)'
186+      Expected type: Int -> Bool -> (# Int, Bool #)
187+      Inferred type: Int -> (# t, Int #)
188+    In the expression: (# 1, #)
189+    In the definition of `e': e = (# 1, #)
190+
191+tcfail206.hs:20:4:
192+    Couldn't match expected type `a' against inferred type `Bool'
193+      `a' is a rigid type variable bound by
194+          the type signature for `f' at tcfail206.hs:19:5
195+      Expected type: a -> (# a, Bool #)
196+      Inferred type: a -> (# Bool, a #)
197+    In the expression: (# True || False, #)
198+    In the definition of `f': f = (# True || False, #)
199+
200hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.hs 1
201-{-# LANGUAGE TupleSections #-}
202+{-# LANGUAGE TupleSections, UnboxedTuples #-}
203 module Main where
204 
205 a :: Int -> (Int, Bool)
206hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.hs 14
207 c = (, True || False)
208 
209 d = (,1,)
210+
211+
212+e = (# , True #)
213+
214+f = (# 1, #)
215+
216+g = (# , True || False #)
217+
218+h = (# ,1, #)
219+
220+main = do
221+    print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby")
222+    case e 1 of { (# x1, x2 #) ->
223+    case f False of { (# x3, x4 #) ->
224+    case g "Hello" of { (# x5, x6 #) ->
225+    case g 1337 of { (# x7, x8 #) ->
226+    case h "Yeah" "Baby" of { (# x9, x10, x11 #) ->
227+    print (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) }}}}}
228+
229 
230hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.hs 34
231-main = print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby")
232hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.stdout 2
233 ((1,True),(1,False),("Hello",True),(1337,True),("Yeah",1,"Baby"))
234+(1,True,1,False,"Hello",True,1337,True,"Yeah",1,"Baby")
235}
236[Tweak tests for unboxed tuple sections
237Max Bolingbroke <batterseapower@hotmail.com>**20090717214231
238 Ignore-this: 6abc5631f1028b628f155f0a20ece4da
239] {
240hunk ./tests/ghc-regress/typecheck/should_run/all.T 67
241 
242 test('tcrun039', only_compiler_types(['ghc']), compile_and_run, [''])
243 test('tcrun040', normal, compile_and_run, [''])
244-test('tcrun041', if_compiler_lt('ghc', '6.11', expect_fail), compile_and_run, [''])
245+test('tcrun041', compose(omit_ways(['ghci']), if_compiler_lt('ghc', '6.11', expect_fail)), compile_and_run, [''])
246 test('tcrun042', if_compiler_lt('ghc', '6.11', expect_fail), compile_and_run, [''])
247 
248 test('church', normal, compile_and_run, [''])
249hunk ./tests/ghc-regress/typecheck/should_run/tcrun041.hs 24
250 
251 h = (# ,1, #)
252 
253+
254+unchanged :: a -> (# Int #)
255+unchanged _binding = (# #) 1
256+
257+
258 main = do
259     print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby")
260     case e 1 of { (# x1, x2 #) ->
261}
262
263Context:
264
265[Add test for Trac #3346
266simonpj@microsoft.com**20090717155827
267 Ignore-this: 52203cff9520f0f502612cf5880e660c
268]
269[accept output after changes to dfun naming
270Simon Marlow <marlowsd@gmail.com>**20090716144125
271 Ignore-this: 295a3d8c86c533edb40d077a1fbdf2e5
272]
273[Update mode001
274Ian Lynagh <igloo@earth.li>**20090716000721
275 The earlier of --help and --version now determines the behaviour
276]
277[add utf8_bom codec
278Simon Marlow <marlowsd@gmail.com>**20090715131505
279 Ignore-this: 27a198bd9ed3112005c43551109acd58
280]
281[Test derived Foldable instance
282m.niloc@gmail.com**20090711130821
283 Ignore-this: 830f4b824bd469df0de947f32b4f9c1c
284]
285[Add a test for #1074
286Ian Lynagh <igloo@earth.li>**20090711191937]
287[Add a test for #1792
288Ian Lynagh <igloo@earth.li>**20090711191508]
289[TFs: Added T2203b
290Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710064638
291 Ignore-this: 8d0c3101f03a76b2fd13e1032aefeffe
292]
293[TFs: fixed should_compile/Simple8 & wibbles
294Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710035536
295 Ignore-this: 66b4c2ad6a5f594f2fd6fcf51be78d6a
296]
297[T3016: skip_if_fast, and omit optc too.
298Simon Marlow <marlowsd@gmail.com>**20090709144504
299 Ignore-this: 26d695f84bf0393da3f1e1862140384f
300]
301[disable T3016(profc), gcc takes ages
302Simon Marlow <marlowsd@gmail.com>**20090709104147
303 Ignore-this: 4accafb20b11f18bb389be86aa84a331
304]
305[Tests for unused imports
306simonpj@microsoft.com**20090706111329
307 Ignore-this: 477db02945a12e468d0adc9181ece35d
308]
309[TFs: T2677
310Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090707054749
311 Ignore-this: 8ca0fd55918fc3b5a7cd2b7407b7195a
312]
313[Update cabal01 test for Cabal change
314Ian Lynagh <igloo@earth.li>**20090705194639]
315[Make changes to -fwarn-unused-do-bind and -fwarn-wrong-do-bind suggested by SPJ
316Max Bolingbroke <batterseapower@hotmail.com>**20090702150957
317 Ignore-this: a79f826df7152b7b5a253a05f90d4128
318]
319[Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
320Max Bolingbroke <batterseapower@hotmail.com>**20090701200441
321 Ignore-this: b762c27276c3e1e3aff614640f27903d
322]
323[Test Trac #3342
324simonpj@microsoft.com**20090702124700
325 Ignore-this: 3d47a4e0c60d0ad4db266869cdb74ec9
326]
327[Track error message change
328simonpj@microsoft.com**20090702095512
329 Ignore-this: 47db428ab8f9a6e2f0903fc84c1d547b
330]
331[NonLinearSigErr is actually OK
332simonpj@microsoft.com**20090702095452
333 Ignore-this: ef3db790608ce2d9b4a26cbc450b93c1
334]
335[Track change in record syntax for GADTs
336simonpj@microsoft.com**20090702095341
337 Ignore-this: f566b1130a4dff0a81d92a262d794d
338]
339[TFs: nullary families are ok
340Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090702093629
341 Ignore-this: ef5783432881e51f4f88b806aaacc1cf
342]
343[add readwrite003 (from bug #679)
344Simon Marlow <marlowsd@gmail.com>**20090701104449
345 Ignore-this: 657cea9c9506a5f961877cdb77313ab7
346]
347[Remove hacky GCC setting
348Simon Marlow <marlowsd@gmail.com>**20090626140827
349 Ignore-this: 698a64c4f09be46340d04aeb0f9be8d
350 It isn't necessary now that Cabal can find gcc in the new layout, and
351 it was taking a long time (2.5s on Windows every time you start up
352 make in the testsuite)
353]
354[accept output after fixes to FFI declaration pretty-printing
355Simon Marlow <marlowsd@gmail.com>**20090626103342
356 Ignore-this: 34d49ce46f4fac185e110ae6c27e8c35
357]
358[add test for #3319
359Simon Marlow <marlowsd@gmail.com>**20090626103159
360 Ignore-this: 7b77c0bb4137b9174e76c6c5aa9a9bd4
361]
362[TAG 2009-06-25
363Ian Lynagh <igloo@earth.li>**20090625160429]
364Patch bundle hash:
36509befce4606de2050e74e46eb33e5ffffcda9eca