Generalized phase control for GHC

Max Bolingbroke batterseapower at
Sat Jun 14 21:15:44 EDT 2008


As some of you may know, I'm working on adding support for dynamically
loaded plugins to GHC this summer. As part of this we need a way to
specify ordering on the compiler phases installed, so e.g. you can say
that a phase you install should run after strictness analysis does.

This problem begs for a more modular and principled solution than just
reusing the current system where we use the natural numbers to impose
an ordering on INLINE/RULE activations. I have proposed a system at that replaces
this with one of named compiler phases not only for plugins but for
all activation control in the compiler. The proposal mostly remains
backwards compatible with the most common uses of the numeric format,
with an exception noted on the page and below.

I would be interested in feedback on the design before the
implementation is complete and in the wild. I'm especially interested
in hearing if you believe that loss of support for numeric phase
numbers > 2 is a problem, as this is the only breaking change that I'm


More information about the Glasgow-haskell-users mailing list