import CoreSyn
import CoreFVs
import CoreUtils
-import NewDemand
+import Demand
import TyCon ( isRecursiveTyCon )
import qualified CoreSubst
import CoreSubst ( Subst, substBndr, substBndrs, substExpr
1 + go res (arity-1)
else WARN( arity > 0, ppr arity ) 0
-}
- | otherwise = WARN( arity > 0, ppr arity ) 0
+ | otherwise = WARN( arity > 0, ppr arity <+> ppr ty) 0
\end{code}
Note [State hack and bottoming functions]
---------------------------
arityType :: Bool -> CoreExpr -> ArityType
arityType _ (Var v)
- | Just strict_sig <- idNewStrictness_maybe v
+ | Just strict_sig <- idStrictness_maybe v
, (ds, res) <- splitStrictSig strict_sig
, isBotRes res
= AT (length ds) ABot -- Function diverges
ty' = substTy subst ty
eta_id' = uniqAway (getTvInScope subst) $
mkSysLocal (fsLit "eta") (mkBuiltinUnique n) ty'
- subst' = extendTvInScope subst [eta_id']
+ subst' = extendTvInScope subst eta_id'
\end{code}