| I mean I we don't *get* constant folding until P0. That's might be a bit
| too late as we might miss subsequent optimisations in earlier phases.

That's odd.  The constant-folding rules defined in PrelRules.primOpRules are 
always on (they have no "only in this phase" control) so I don't see why they 
would not fire in earlier phases.

Since divInt# is not a primop, any rules for it should show up in 
PrelRules.builtInRules.

| Hmm... Can built-in and user-defined rules for the same function
| coexist? If so, this would probably work (with a bit more effort than if
| divInt# was a primop, though).

I don't think it's more effort. And yes, they can co-exist I think.

Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to