Generalized phase control for GHC
batterseapower at hotmail.com
Sat Jul 5 13:03:30 EDT 2008
> If you don't need a dependency and it can be ignored anyway, why would you
> want to specify it in the first place? I just can't quite imagine a
> situation in which I would use this.
I think it makes sense because many of the inter-pass dependencies we
have in the GHC pipeline today are actually somewhat lenient. For
example, something quite sensible will happen if we do CSE before full
laziness, it will simply lead to less efficient code. In contrast,
it's imperative that we perform strictness analysis before applying
worker-wrapper based on the annotations it adds.
> Yeah, I'd prefer the class/instance model. An example: suppose you have two
> independent libraries which implement two optimisations and you want one of
> them to run before another. I think we really need this if we want to
> compose optimisations.
This is an interesting observation. So, you imagine that the >user
program itself< might import the compiler plugins and add a constraint
between the phases they export. I'm not sure how many users would
really want to do this, but I can see it being useful.
Thanks for your input: I've got a lot to think about now.
More information about the Glasgow-haskell-users