Mechanism for attaching warnings to particular modules or other design elements.
Warnings from the early stages of parsing (e.g., lexing and preprocessing) are created well before we have any modules (or other kinds of descriptions, e.g., interfaces) to attach them to. By convention, we create these warnings so that their first argument is the location. When warnings follow this convention, we can attempt to associate them with modules.
Note: we generally don't expect there to be too many warnings caused during these stages of loading, so our injection code is not particularly efficient.