)
import IdInfo ( OccInfo(..), isDeadOcc, isLoopBreaker,
setArityInfo,
- setUnfoldingInfo, atLeastArity,
+ setUnfoldingInfo,
occInfo
)
import Demand ( isStrict )
-- We make new IdInfo for the new binder by starting from the old binder,
-- doing appropriate substitutions.
-- Then we add arity and unfolding info to get the new binder
- new_bndr_info = idInfo new_bndr `setArityInfo` arity_info
+ new_bndr_info = idInfo new_bndr `setArityInfo` arity
-- Add the unfolding *only* for non-loop-breakers
-- Making loop breakers not have an unfolding at all
loop_breaker = isLoopBreaker occ_info
trivial_rhs = exprIsTrivial new_rhs
must_keep_binding = black_listed || loop_breaker || isExportedId old_bndr
- arity_info = atLeastArity (exprArity new_rhs)
+ arity = exprArity new_rhs
\end{code}