Generating External Core Files

The Glasgow Haskell Compiler User's Guide, Version 5.04
Prev | Chapter 4. Using GHC | Next

# 4.17. Generating External Core Files

GHC can dump its optimized intermediate code (said to be in “Core” format) to a file as a side-effect of compilation. Core files, which are given the suffix `.hcr`, can be read and processed by non-GHC back-end tools. The Core format is formally described in An External Representation for the GHC Core Language, and sample tools (in Haskell) for manipulating Core files are available in the GHC source distribution directory `/fptools/ghc/utils/ext-core`. Note that the format of `.hcr` files is different (though similar) to the Core output format generated for debugging purposes (Section 4.18).

`-fext-core`

  Generate `.hcr` files.

Prev | Home | Next
Running a compiled program | Up | Debugging the compiler