Right. There are two things here:
1) -frewrite-rules
enables rules to fire.
2) -fglasgow-exts
enables parsing of RULES pragmas, and their interpretation.
You need both if you wish to both write your own rules, and have them
fire.
nope!-) -fglasgow-exts is sufficient for the RULE to be parsed
and applied in Lennart's code, -frewrite-rules doesn't seem to
serve any noticable purpose.
but i see now this is under re-evaluation, aptly titled:
"Confusing flags for rewrite rules"
http://hackage.haskell.org/trac/ghc/ticket/2213
(see simonpj's comment at the end)
claus
$ head -1 Rules.hs
{-# OPTIONS_GHC -O2 -Wall -fglasgow-exts #-}
$ /cygdrive/c/fptools/ghc/ghc-6.9.20080514/bin/ghc -fno-method-sharing
-ddump-simpl-stats -c Rules.
hs
==================== FloatOut stats: ====================
0 Lets floated to top level; 0 Lets floated elsewhere; from 3 Lambda groups
==================== FloatOut stats: ====================
0 Lets floated to top level; 0 Lets floated elsewhere; from 3 Lambda groups
==================== Grand total simplifier statistics ====================
Total ticks: 60
18 PreInlineUnconditionally
11 PostInlineUnconditionally
5 UnfoldingDone
1 RuleFired
1 toInt/fromInt
2 EtaReduction
22 BetaReduction
1 KnownBranch
11 SimplifierDone
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users