
| 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. Currently, without -O GHC puts the absolute minimum in interface files to get the clients to compile: just the exports and their types. For example, if you have f x = x GHC will not put that unfolding in the interface file, tiny though it is. 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. 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. Simon | -----Original Message----- | From: Duncan Coutts [mailto:duncan.coutts@worc.ox.ac.uk] | Sent: 16 October 2008 05:57 | To: Henning Thielemann | Cc: Simon Peyton-Jones; libraries@haskell.org | Subject: RE: 2008-10-11 Hackage status with GHC 6.10 | | On Wed, 2008-10-15 at 20:47 +0200, Henning Thielemann wrote: | | > I found it just confusing to switch on two features (namely 'optimization | > including application of rules' and 'parsing, checking and storing new | > rules') with one option (namely -O). It remains confusing for me also if | > one of the two features can be enabled separately with | > -fno-omit-interface-pragmas, but the other feature cannot. Also the option | > sounds like it also applies not only to RULES. I also find the doubled | > negation in 'no omit' confusing. What about | > '-finclude-all-interface-pragmas'? | > What concerns documentation: The description of an option for enabling | > parsing of RULES I would expect in ghc-doc/users_guide/rewrite-rules.html. | | While it used to be more complex, the situation now is quite simple: | | 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. | | RULES get used/applied with -O. Again, there is an option to turn off | the use of rules (without affecting other optimisations). | | This seems pretty sane and easy to explain. | | Duncan |