Typo
[packages/base.git] / tests / tup001.hs
1 -- Test instances for tuples up to 15
2 -- For Read, Show, Eq, Ord, Bounded
3
4 module Main where
5
6 data T = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
7 deriving( Eq, Ord, Show, Read, Bounded )
8
9 t15 = (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O)
10 t14 = (A,B,C,D,E,F,G,H,I,J,K,L,M,N)
11 t13 = (A,B,C,D,E,F,G,H,I,J,K,L,M)
12 t12 = (A,B,C,D,E,F,G,H,I,J,K,L)
13 t11 = (A,B,C,D,E,F,G,H,I,J,K)
14 t10 = (A,B,C,D,E,F,G,H,I,J)
15 t9 = (A,B,C,D,E,F,G,H,I)
16 t8 = (A,B,C,D,E,F,G,H)
17 t7 = (A,B,C,D,E,F,G)
18 t6 = (A,B,C,D,E,F)
19 t5 = (A,B,C,D,E)
20 t4 = (A,B,C,D)
21 t3 = (A,B,C)
22 t2 = (A,B)
23 t0 = ()
24
25 big = (t0,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15)
26
27 main = do print big
28 print (read (show big) `asTypeOf` big)
29 print (big == big)
30 print (big < big)
31 print (big > big)
32 print (minBound `asTypeOf` big)
33 print (maxBound `asTypeOf` big)