Wiki page for rewrite rules tips, types and tricks

After suggesting solutions based on rewrite rules to three different questions this week, I though maybe we better have a wiki page on using rewrite rules for non-traditional ad-hoc tricks. http://haskell.org/haskellwiki/Playing_by_the_rules If you've used rewrite rules for something fun (other than implementing a major deforestation system), please add it to the page. -- Don

Great page, I especially like the phrase:
[...] changing a non-terminating program [...] into a much faster one [...]
On Sat, 18 Nov 2006 06:27:34 +0100, Donald Bruce Stewart
After suggesting solutions based on rewrite rules to three different questions this week, I though maybe we better have a wiki page on using rewrite rules for non-traditional ad-hoc tricks.
http://haskell.org/haskellwiki/Playing_by_the_rules
If you've used rewrite rules for something fun (other than implementing a major deforestation system), please add it to the page.
-- Don
-- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433

Hi
Great page, I especially like the phrase: [...] changing a non-terminating program [...] into a much faster one [...]
And one important point: In general its a bad idea for rules to change the semantics (meaning) of your code in such a way. Consider someone using reverse . reverse to demand strictness of an IO action (I've seen this in conjunction with interact), this code would no longer work with the above rule. Thanks Neil

Don | After suggesting solutions based on rewrite rules to three different | questions this week, I though maybe we better have a wiki page on using | rewrite rules for non-traditional ad-hoc tricks. | | http://haskell.org/haskellwiki/Playing_by_the_rules Great stuff. Would it be possible to combine it with http://haskell.org/haskellwiki/GHC/Using_Rules which is linked from http://haskell.org/haskellwiki/GHC It seems a pity to have two pages with the same purpose! (Mind you, obviously the former is not easily findable. Perhaps we could improve that?) Simon | -----Original Message----- | From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of | Donald Bruce Stewart | Sent: 18 November 2006 05:28 | To: haskell-cafe@haskell.org | Subject: [Haskell-cafe] Wiki page for rewrite rules tips, types and tricks | | After suggesting solutions based on rewrite rules to three different | questions this week, I though maybe we better have a wiki page on using | rewrite rules for non-traditional ad-hoc tricks. | | http://haskell.org/haskellwiki/Playing_by_the_rules | | If you've used rewrite rules for something fun (other than implementing | a major deforestation system), please add it to the page. | | -- Don | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
dons@cse.unsw.edu.au
-
Henk-Jan van Tuyl
-
Neil Mitchell
-
Simon Peyton-Jones