add assertion to check that UniqFM is only passed "positive" uniques
authordias@eecs.harvard.edu <unknown>
Thu, 4 Sep 2008 13:51:55 +0000 (13:51 +0000)
committerdias@eecs.harvard.edu <unknown>
Thu, 4 Sep 2008 13:51:55 +0000 (13:51 +0000)
commit8b7a0a10076db88d9b20ca1cd0138a2ca7a3fec1
tree7650d838253f942e84fa8e53c43a9f6c5b3ac4af
parent7674431d6b34087d663734880ebf9bf247fe2e93
add assertion to check that UniqFM is only passed "positive" uniques
The insertion code in UniqFM fails if a unique key
produces a negative FastInt. I've added an assertion to check
that each insertion uses a positive Unique.

Where do the negative uniques come from? Both Simom M and
I have run into this problem when computing hashes for data structures.
In both cases, we have avoided the problem by ensuring that
the hashes remain positive.
compiler/utils/UniqFM.lhs