| On 9/8/08, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: | > If you want them (as you suggest) to be more like .hs files, then | indeed you are going to sharply limit the amount of optimisation that | you can do, by nuking all cross-module optimisation. For example | (3::Int + 4) will not turn into an addition instruction any more -- | that relies on "seeing" the Prelude's implementation of (+) at Int. | | Well, I don't think you have to nuke *all* cross-module optimization, | though that would be the easiest thing to implement. In the (+) | example, if you inline aggressively enough, you get down to the +# | primop and there are no references left to anything else.
But the point is that GHC knows *nothing* about (+) except its type and the inlining exposed by GHC.Base.hi. If you changed the definition of (+) at Int, and recompiled GHC.Base.hi, then any ExtCore that had inlined (+) would be wrong -- and might contain references to things that no longer exist. To put it another way, exactly which cross-module inlinings would out nuke, and which would you keep? Are some "trusted" or "stable"? The only simple thing is all or nothing. S _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
