Dump intermediate representations (-ddump-*) to a file
I would like to extend the -ddump- interface to support dumping our intermediate representations to files. The reasons why this would be useful are manifold:
- In the case of a single file being compiled, directly saving intermediate representations to separate files would allow the user to avoid having to post-process the stdout output of GHC to separate all the different representations they may be interested in.
- In a large, multi-file project (e.g. GHC), a convention for where these files are dumped would make it easier to do a compile with all of the low level debug representations available, aiding manual debugging of compiled GHC code and also perhaps paving the way towards C-- based debuginfo for GHC binaries.
I'm not really sure what such an interface would look like, but my feeling is that these generated files should be analogous to other auxiliary files GHC generates (hi, etc.), with their file extension whatever comes have the -ddump- section of the flag.
What do people think?
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |