summaryrefslogtreecommitdiff
path: root/testsuite/tests/primops/should_run/T14664.hs
blob: 4c29d327d0cf190253b28813c4f5342f20d58479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE MagicHash #-}

module Main where

import GHC.Exts
import Control.Exception

main :: IO ()
main = do

   let
      printE :: ArithException -> IO ()
      printE = print

   catch (raiseUnderflow# void#) printE
   catch (raiseOverflow#  void#) printE
   catch (raiseDivZero#   void#) printE