summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_run/arith014.hs
blob: 92fc362ee8d11fefd14d7865d6ce194e0c615582 (plain)
1
2
3
4
5
6
7
8
9
10
11
-- Test behaviour of fromInteger when the target type is out of range.

main :: IO ()
main = 
  print [
    fromInteger maxInt2 :: Int,
    fromInteger minInt2 :: Int
  ]  

maxInt2 = fromIntegral (maxBound :: Int)     * 2 :: Integer
minInt2 = fromIntegral (minBound + 1 :: Int) * 2 :: Integer