From 6c37c24ac325506476119eec0a9956092a96284d Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 2 Apr 2001 21:20:07 +0000 Subject: [PATCH] [project @ 2001-04-02 21:20:07 by panne] fromInt/toInt is dead, long live fromIntegral! --- ghc/tests/lib/should_run/enum03.stdout | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghc/tests/lib/should_run/enum03.stdout b/ghc/tests/lib/should_run/enum03.stdout index 0f99033..2cd3f4d 100644 --- a/ghc/tests/lib/should_run/enum03.stdout +++ b/ghc/tests/lib/should_run/enum03.stdout @@ -5,7 +5,7 @@ Testing Enum Word8: 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, toInt (minBound::Word8), toInt (maxBound::Word8)]) = [1,0,255] + (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] @@ -40,7 +40,7 @@ Testing Enum Word16: 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, toInt (minBound::Word16), toInt (maxBound::Word16)]) = [1,0,65535] + (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] @@ -75,9 +75,9 @@ Testing Enum Word32: 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, toInt (minBound::Word32), maxBound::Int]) = [1,0,2147483647] + (map (toEnum::Int->Word32) [1, fromIntegral (minBound::Word32)::Int, maxBound::Int]) = [1,0,2147483647] (toEnum (maxBound::Int))::Word32 = 2147483647 - (map fromEnum [(1::Word32),minBound,fromInt (maxBound::Int)]) = [1,0,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] @@ -111,9 +111,9 @@ Testing Enum Word64: 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, toInt (minBound::Word64), maxBound::Int]) = [1,0,2147483647] + (map (toEnum::Int->Word64) [1, fromIntegral (minBound::Word64)::Int, maxBound::Int]) = [1,0,2147483647] (toEnum (maxBound::Int))::Word64 = 2147483647 - (map fromEnum [(1::Word64),minBound,fromInt (maxBound::Int)]) = [1,0,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] -- 1.7.10.4