summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/ds018.hs
blob: 15edeb30064ce2ff64abed4ce48ba0dd22d0fbfe (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
-- !!! ds018 -- explicit lists and tuples (with disabled LARGE tuples!)
--
module ShouldCompile where

-- exprs

f x y z = [x,y,z,x,y,z]
f2 x y  = []

g1 x y  = ()

{- Although GHC *should* provide arbitrary tuples, it currently doesn't
   and probably won't in the near future, so this test is only a reminder.

g x y z = (x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z,
           x,y,z,x,y,z) -- hey, we love big tuples
-}

-- pats

fa [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z] = x

fb [] = []

{- See above
ga (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,
    aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,
    an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az) = x
-}

gb () x = x
gb2 ()  = ()

-- need to think of some better ones...