blob: a7b83080246e1c23a240304f22d618a03c3b954b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE MagicHash #-}
module Main where
import GHC.Exts
import GHC.Prim.Exception
import Control.Exception
main :: IO ()
main = do
let
printE :: ArithException -> IO ()
printE = print
catch raiseUnderflow printE
catch raiseOverflow printE
catch raiseDivZero printE
|