Add -ddump-ds-preopt
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 1 Feb 2018 09:19:30 +0000 (09:19 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 1 Feb 2018 12:19:52 +0000 (12:19 +0000)
commitefce943ca20b55b18f948681e6b44fd892dbddd2
tree5d06b346b23ff054ee4970528d2a45f2aedf1688
parentdb5a4b83b14bf4f1adb417b7664347fdaf637fd6
Add -ddump-ds-preopt

This allows you to see the output immediately after desugaring
but before any optimisation.

I've wanted this for some time, but I was triggered into action
by Trac #13032 comment:9.

Interestingly, the change means that with -dcore-lint we will
now Lint the output before the very simple optimiser;
and this showed up Trac #14749.  But that's not the fault
of -ddump-ds-preopt!
compiler/coreSyn/CoreLint.hs
compiler/deSugar/Desugar.hs
compiler/main/DynFlags.hs
docs/users_guide/debugging.rst
testsuite/tests/typecheck/should_compile/all.T