Simplifier does not preserve dependency ordering of the program
I noticed this some time ago, but I thought this is expected, because there's a comment in CoreLint that mentions this:
lintCoreBindings dflags pass local_in_scope binds = initL dflags flags in_scope_set $ addLoc TopLevelBindings $ lintLetBndrs TopLevel binders $ -- Put all the top-level binders in scope at the start -- This is because transformation rules can bring something -- into use 'unexpectedly' ...
However talking to SPJ today he mentioned that in Core we should actually preserve dependency ordering, hence this ticket.
I'll update with a reproducer.