| Okay, let me rephrase this more succinctly. I think that the following | would be a useful principle (even though it's not how things work | right now): An External Core file that was generated by GHC cannot | refer to any names defined in standard library files that I would not | be allowed to refer to in a Haskell program. Further, I claim that | External Core isn't useful as an implementation-independent format if | it doesn't uphold this principle. Do you agree?
It depends what you want it for. If you generate a bunch of ExtCore files together, they'll refer to each other nicely, just like .o files. Then everything is fine and you can do your frobbing to your hearts content. 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. However, using -fignore-interface-pragmas should let you try this, so you can see how big an effect it is. So the question is: is ExtCore like .hs or .o? I think different people would give different answers. So a flag is probably the right thing. Simon _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
