Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make recursion and RULES interact better
See Trac #683 This patch improves the interaction of recursion and RULES; at least I hope it does. The problem was that a RULE was being treated uniformly like an "extra RHS". This worked badly when you have a non-recursive definition that is made recursive only by RULE. This patch maeks the occurrence analyser know whether a binder is referred to only from RULES (the RulesOnly constructor in OccInfo). Then we can ignore such edges when deciding on the order of bindings in a letrec, and when setting the LoopBreaker flag. The remaining potential problem is this: rec{ f = ...g... ; g = ...f... RULE g True = ... } The RULE for g may not be visible in f's rhs. This is fixable, but not today.
- Loading branch information
simonpj@microsoft.com
committed
Oct 3, 2006
1 parent
f297dea
commit c248518
Showing
4 changed files
with
45 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters