1 2 3 4 5 6 7 8 9
{-# LANGUAGE MagicHash #-} import GHC.Exts import Control.Exception f :: ArithException -> Int# f x = raise# (toException x) main = print (I# (f Overflow))