
On Thu, 2008-10-16 at 11:12 +0100, Simon Peyton-Jones wrote:
| RULES are always parsed (no flags or language extensions needed). They | also go into the .hi files (unless you use the obscure option to change | that), so they are exported for all client modules.
The latter isn't true, and I think that's what Henning is objecting to.
Oops. As I read it Henning wants the RULES parsed with or without -O. That bit is now much simpler than it used to be. I didn't read his objection as wanting them always exported even if the defining module was not built without -O, just that they should always be parsed and checked.
Currently, without -O GHC puts the absolute minimum in interface files to get the clients to compile
Right. My mistake.
Currently without -O GHC therefore does *not* put RULES in the interface file. I thought that was consistent, since they are to do with optimisation.
Right.
If, however, there's a consensus that RULES should be persisted even without -O, that'd be easy to arrange. For example, I think that deprecations are persisted unconditionally.
I think the current behaviour is consistent and makes sense. We do want the minimum without -O because it gives more minimal rebuilds if the .hi files do not change so often. I've updated the wiki page on 6.10 upgrading: http://haskell.org/haskellwiki/Upgrading_packages#Changes_to_RULES_parsing Duncan