Hey,
the problem is with eta-expansion in this case, I believe, or rather the
lack there-of.
Your recursive `f` is always bottoming out, which makes GHC not want to
eta-expand the RealWorld# parameter (Note [State hack and bottoming
functions] in CoreArity.hs is probably related).
If you change
Hi,
In this program
{-# LANGUAGE MagicHash #-}
module Lib where
import Control.Exception
import GHC.Exts
import GHC.IO
data Err = Err
deriving (Show)
instance Exception Err
f :: Int -> Int -> IO Int
f x y | x > 0 = IO (raiseIO# (toException Err))