Make the occurrence analyser deal correctly with RULES for imported Ids
authorsimonpj@microsoft.com <unknown>
Thu, 7 Oct 2010 09:41:00 +0000 (09:41 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 7 Oct 2010 09:41:00 +0000 (09:41 +0000)
commitd385c64c1684fa7d66027b6e9c6d8e581b46e923
tree82ec202d811bdd884901e4135bbe045002b1954f
parentd815b5b709b08177140f2fa682bfc740ddc8e57f
Make the occurrence analyser deal correctly with RULES for imported Ids

This patch fixes a long-standing lurking bug, but it surfaced when I
was adding specialisation for imported Ids.

See Note [ImpRuleUsage], which explains the issue.   The solution
seems more complicated than the problem really deserves, but I
could not think of a simpler way, so I just bit the bullet and
wrote the code.  Improvements welcome.
compiler/simplCore/OccurAnal.lhs