packages feed

const-math-ghc-plugin-0.2.0.0: tests/arith014.hs

-- 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