At the moment we emit trace messages in the select pass in a pretty randomly-chosen order:
let ...
in ( unitSelect
, selectStatusMsgs
-- If there were no predicate matches we issue a warning to the user.
++ [ SelectNoDeclarationsMatched | Set.null rootIds ]
++ getDelayedMsgs selectedIndex
Ideally we sort the messages, for example by declaration ID.