-- we might get out-of-scope variables
idUnfoldingVars id
= case realIdUnfolding id of
- CoreUnfolding { uf_tmpl = rhs, uf_guidance = InlineRule {} }
- -> exprFreeVars rhs
- DFunUnfolding _ args -> exprsFreeVars args
- _ -> emptyVarSet
+ CoreUnfolding { uf_tmpl = rhs, uf_src = src }
+ | isInlineRuleSource src
+ -> exprFreeVars rhs
+ DFunUnfolding _ _ args -> exprsFreeVars args
+ _ -> emptyVarSet
\end{code}