This is mentioned a lot in the code to do with inlining. How is an unfolding different from the definition of a function, are they the same thing?
An unfolding is the expression which will be inlined in a function's call-sites. It is important to note that unfoldings are not simplified by the simplifier since this simplification may hide optimization opportunities that might arise when the unfolding is inlined into a call-site.
Unfoldings are attached to Ids in their IdInfo during desugaring by DsBinds.makeCorePair.