Add 'dumpAction' and 'traceAction' hooks
- add 2 hooks into DynFlags (
dumpActionandtraceAction) that can be used with GHC API to capture dumped messages with intermediate representations and traces - the default implementations of these hooks keep the current behavior
- replace
dumpSDocwith a call todumpAction - add dump type argument ("Core", "STG", "Text", etc.) useful for syntax highlighting
- fix some traces that were always displayed on stdout even with
-ddump-to-file
Edited by Sylvain Henry