summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/should_run/enum03.stdout
blob: d6db561a720b58c96e3e9e5fb907a4218480cbad (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
Testing Enum Word8:
    (succ (0::Word8)) = 1
    (succ (minBound::Word8)) = 1
    (succ (maxBound::Word8)) = error "Enum.succ{Word8}: tried to take `succ' of maxBound"
    pred (1::Word8) = 0
    pred (maxBound::Word8) = 254
    pred (minBound::Word8) = error "Enum.pred{Word8}: tried to take `pred' of minBound"
    (map (toEnum::Int->Word8) [1, fromIntegral (minBound::Word8)::Int, fromIntegral (maxBound::Word8)::Int]) = [1,0,255]
    (toEnum (maxBound::Int))::Word8 = error "Enum.toEnum{Word8}: tag (2147483647) is outside of bounds (0,255)"
    (map fromEnum [(1::Word8),minBound,maxBound]) = [1,0,255]
    (take 7 [(1::Word8)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Word8)-5)..]) = [250,251,252,253,254,255]
    (take 7 [(1::Word8),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Word8),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Word8),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Word8),0..]) = [1,0]
    (take 7 [(5::Word8),2..]) = [5,2]
    (take 7 [x, x-1 ..]) = [1,0]
    (take 7 [x, x-1 ..]) = [5,4,3,2,1,0]
    (take 7 [x, (x+1) ..]) = [250,251,252,253,254,255]
    (take 7 ([(1::Word8) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Word8) .. 1])) = [1]
    (take 7 ([(1::Word8) .. 0])) = []
    (take 7 ([(5::Word8) .. 0])) = []
    (take 7 ([(maxBound-(5::Word8)) .. maxBound])) = [250,251,252,253,254,255]
    (take 7 ([(minBound+(5::Word8)) .. minBound])) = []
    (take 7 [(5::Word8),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Word8),3..1]) = [5,3,1]
    (take 7 [(5::Word8),3..2]) = [5,3]
    (take 7 [(1::Word8),2..1]) = [1]
    (take 7 [(2::Word8),1..2]) = [2]
    (take 7 [(2::Word8),1..1]) = [2,1]
    (take 7 [(2::Word8),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [251,252,253,254,255]
    (take 7 [x,(x-1)..minBound]) = [5,4,3,2,1,0]
Testing Enum Word16:
    (succ (0::Word16)) = 1
    (succ (minBound::Word16)) = 1
    (succ (maxBound::Word16)) = error "Enum.succ{Word16}: tried to take `succ' of maxBound"
    pred (1::Word16) = 0
    pred (maxBound::Word16) = 65534
    pred (minBound::Word16) = error "Enum.pred{Word16}: tried to take `pred' of minBound"
    (map (toEnum::Int->Word16) [1, fromIntegral (minBound::Word16)::Int, fromIntegral (maxBound::Word16)::Int]) = [1,0,65535]
    (toEnum (maxBound::Int))::Word16 = error "Enum.toEnum{Word16}: tag (2147483647) is outside of bounds (0,65535)"
    (map fromEnum [(1::Word16),minBound,maxBound]) = [1,0,65535]
    (take 7 [(1::Word16)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Word16)-5)..]) = [65530,65531,65532,65533,65534,65535]
    (take 7 [(1::Word16),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Word16),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Word16),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Word16),0..]) = [1,0]
    (take 7 [(5::Word16),2..]) = [5,2]
    (take 7 [x, x-1 ..]) = [1,0]
    (take 7 [x, x-1 ..]) = [5,4,3,2,1,0]
    (take 7 [x, (x+1) ..]) = [65530,65531,65532,65533,65534,65535]
    (take 7 ([(1::Word16) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Word16) .. 1])) = [1]
    (take 7 ([(1::Word16) .. 0])) = []
    (take 7 ([(5::Word16) .. 0])) = []
    (take 7 ([(maxBound-(5::Word16)) .. maxBound])) = [65530,65531,65532,65533,65534,65535]
    (take 7 ([(minBound+(5::Word16)) .. minBound])) = []
    (take 7 [(5::Word16),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Word16),3..1]) = [5,3,1]
    (take 7 [(5::Word16),3..2]) = [5,3]
    (take 7 [(1::Word16),2..1]) = [1]
    (take 7 [(2::Word16),1..2]) = [2]
    (take 7 [(2::Word16),1..1]) = [2,1]
    (take 7 [(2::Word16),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [65531,65532,65533,65534,65535]
    (take 7 [x,(x-1)..minBound]) = [5,4,3,2,1,0]
Testing Enum Word32:
    (succ (0::Word32)) = 1
    (succ (minBound::Word32)) = 1
    (succ (maxBound::Word32)) = error "Enum.succ{Word32}: tried to take `succ' of maxBound"
    pred (1::Word32) = 0
    pred (maxBound::Word32) = 4294967294
    pred (minBound::Word32) = error "Enum.pred{Word32}: tried to take `pred' of minBound"
    (map (toEnum::Int->Word32) [1, fromIntegral (minBound::Word32)::Int, fromIntegral (maxBound::Int32)::Int]) = [1,0,2147483647]
    (toEnum (maxBound::Int))::Word32 = 2147483647
    (map fromEnum [(1::Word32),minBound,fromIntegral (maxBound::Int)]) = [1,0,2147483647]
    fromEnum (maxBound::Word32) = error "Enum.fromEnum{Word32}: value (4294967295) is outside of Int's bounds (-2147483648,2147483647)"
    (take 7 [(1::Word32)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Word32)-5)..]) = [4294967290,4294967291,4294967292,4294967293,4294967294,4294967295]
    (take 7 [(1::Word32),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Word32),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Word32),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Word32),0..]) = [1,0]
    (take 7 [(5::Word32),2..]) = [5,2]
    (take 7 [x, x-1 ..]) = [1,0]
    (take 7 [x, x-1 ..]) = [5,4,3,2,1,0]
    (take 7 [x, (x+1) ..]) = [4294967290,4294967291,4294967292,4294967293,4294967294,4294967295]
    (take 7 ([(1::Word32) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Word32) .. 1])) = [1]
    (take 7 ([(1::Word32) .. 0])) = []
    (take 7 ([(5::Word32) .. 0])) = []
    (take 7 ([(maxBound-(5::Word32)) .. maxBound])) = [4294967290,4294967291,4294967292,4294967293,4294967294,4294967295]
    (take 7 ([(minBound+(5::Word32)) .. minBound])) = []
    (take 7 [(5::Word32),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Word32),3..1]) = [5,3,1]
    (take 7 [(5::Word32),3..2]) = [5,3]
    (take 7 [(1::Word32),2..1]) = [1]
    (take 7 [(2::Word32),1..2]) = [2]
    (take 7 [(2::Word32),1..1]) = [2,1]
    (take 7 [(2::Word32),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [4294967291,4294967292,4294967293,4294967294,4294967295]
    (take 7 [x,(x-1)..minBound]) = [5,4,3,2,1,0]
Testing Enum Word64:
    (succ (0::Word64)) = 1
    (succ (minBound::Word64)) = 1
    (succ (maxBound::Word64)) = error "Enum.succ{Word64}: tried to take `succ' of maxBound"
    pred (1::Word64) = 0
    pred (maxBound::Word64) = 18446744073709551614
    pred (minBound::Word64) = error "Enum.pred{Word64}: tried to take `pred' of minBound"
    (map (toEnum::Int->Word64) [1, fromIntegral (minBound::Word64)::Int, maxBound::Int]) = [1,0,2147483647]
    (toEnum (maxBound::Int))::Word64 = 2147483647
    (map fromEnum [(1::Word64),minBound,fromIntegral (maxBound::Int)]) = [1,0,2147483647]
    fromEnum (maxBound::Word64) = error "Enum.fromEnum{Word64}: value (18446744073709551615) is outside of Int's bounds (-2147483648,2147483647)"
    (take 7 [(1::Word64)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Word64)-5)..]) = [18446744073709551610,18446744073709551611,18446744073709551612,18446744073709551613,18446744073709551614,18446744073709551615]
    (take 7 [(1::Word64),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Word64),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Word64),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Word64),0..]) = [1,0]
    (take 7 [(5::Word64),2..]) = [5,2]
    (take 7 [x, x-1 ..]) = [1,0]
    (take 7 [x, x-1 ..]) = [5,4,3,2,1,0]
    (take 7 [x, (x+1) ..]) = [18446744073709551610,18446744073709551611,18446744073709551612,18446744073709551613,18446744073709551614,18446744073709551615]
    (take 7 ([(1::Word64) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Word64) .. 1])) = [1]
    (take 7 ([(1::Word64) .. 0])) = []
    (take 7 ([(5::Word64) .. 0])) = []
    (take 7 ([(maxBound-(5::Word64)) .. maxBound])) = [18446744073709551610,18446744073709551611,18446744073709551612,18446744073709551613,18446744073709551614,18446744073709551615]
    (take 7 ([(minBound+(5::Word64)) .. minBound])) = []
    (take 7 [(5::Word64),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Word64),3..1]) = [5,3,1]
    (take 7 [(5::Word64),3..2]) = [5,3]
    (take 7 [(1::Word64),2..1]) = [1]
    (take 7 [(2::Word64),1..2]) = [2]
    (take 7 [(2::Word64),1..1]) = [2,1]
    (take 7 [(2::Word64),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [18446744073709551611,18446744073709551612,18446744073709551613,18446744073709551614,18446744073709551615]
    (take 7 [x,(x-1)..minBound]) = [5,4,3,2,1,0]