num013.hs 424 Bytes
Newer Older
Ian Lynagh's avatar
Ian Lynagh committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14

-- Test for trac #1042

import Control.Exception
import Data.Int
import Prelude hiding (catch)

main :: IO ()
main = do print ((minBound :: Int) `div` (-1)) `catch` print
          print ((minBound :: Int8) `div` (-1)) `catch` print
          print ((minBound :: Int16) `div` (-1)) `catch` print
          print ((minBound :: Int32) `div` (-1)) `catch` print
          print ((minBound :: Int64) `div` (-1)) `catch` print