+ | CompulsoryUnfolding { -- There is /no original definition/, so you'd better unfold.
+ uf_tmpl :: CoreExpr -- The unfolding is guaranteed to have no free variables
+ } -- so no need to think about it during dependency analysis
+
+ | InlineRule { -- The function has an INLINE pragma, with the specified (original) RHS
+ -- (The inline phase, if any, is in the InlinePragInfo for this Id.)
+ -- Inline when (a) applied to at least this number of args
+ -- (b) if there is something interesting about args or context
+ uf_tmpl :: CoreExpr, -- The *original* RHS; occurrence info is correct
+ -- (The actual RHS of the function may be different by now,
+ -- but what we inline is still the original RHS (kept in the InlineRule).)
+ uf_is_top :: Bool,
+
+ uf_arity :: Arity, -- Don't inline unless applied to this number of *value* args
+ uf_is_value :: Bool, -- True <=> exprIsHNF is true; save to discard a `seq`
+ uf_worker :: Maybe Id -- Just wrk_id <=> this unfolding is a the wrapper in a worker/wrapper
+ -- split from the strictness analyser
+ -- Used to abbreviate the uf_tmpl in interface files
+ -- In the Just case, interface files don't actually
+ -- need to contain the RHS; it can be derived from
+ -- the strictness info
+ -- Also used in CoreUnfold to guide inlining decisions
+ }