This patch introduces "SourceNote" tickishs that carry a reference to the
original source code. They are meant to be passed along the compilation
pipeline with as little disturbance to optimization processes as possible.
Generation is triggered by command line parameter "-g". The flag is free and
fits with the intended end result (generation of DWARF). Internally we
say that we compile with "debugging", which is probably at least
slightly confusing given the plethora of other debugging options we have.
Keeping ticks from getting into the way of transformations is
tricky, but doable. The changes in this patch produce identical Core
in all cases I tested - we now even have a linting pass that makes
sure of it.
I have migrated the detailed design notes to the Haskell Wiki: