FIX part of #1959: declaration versions were not being incremented correctly
authorSimon Marlow <simonmar@microsoft.com>
Thu, 6 Dec 2007 08:45:56 +0000 (08:45 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 6 Dec 2007 08:45:56 +0000 (08:45 +0000)
commit89cc39884310a8d1d60681a9c64f89f17848f17e
tree7d251e8cfd75e02b435e4978b8d3f1ab29482c79
parentd0864f52edcea75484b9adcd2ca9df316266f492
FIX part of #1959: declaration versions were not being incremented correctly
We were building a mapping from ModuleName to [Occ] from the usage
list, using the usg_mod field as the key.  Unfortunately, due to a
very poor naming decision, usg_mod is actually the module version, not
the ModuleName.  usg_name is the ModuleName.  Since Version is also an
instance of Uniquable, there was no type error: all that happened was
lookups in the map never succeeded.  I shall rename the fields of
Usage in a separate patch.

This doesn't completely fix #1959, but it gets part of the way there.

I have to take partial blame as the person who wrote this fragment of
code in late 2006 (patch "Interface file optimisation and removal of
nameParent").
compiler/iface/MkIface.lhs